bio-ucsc-util 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ Jeweler::Tasks.new do |gem|
18
18
  gem.homepage = "http://github.com/throwern/bio-ucsc-util"
19
19
  gem.license = "MIT"
20
20
  gem.summary = %Q{Ruby binding to the ucsc kent utilities}
21
- gem.description = %Q{Ruby FFI binding and implmentation of the ucsc utilities: bigWigInfo, bigWigSummary and wigToBigWig}
21
+ gem.description = %Q{Ruby FFI binding of the ucsc kent src. Implemented utilities include: bigWigInfo, bigWigSummary and wigToBigWig}
22
22
  gem.email = "throwern@msu.edu"
23
23
  gem.authors = ["throwern"]
24
24
  # dependencies defined in Gemfile
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bio-ucsc-util"
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["throwern"]
12
- s.date = "2012-08-07"
13
- s.description = "Ruby FFI binding and implmentation of the ucsc utilities: bigWigInfo, bigWigSummary and wigToBigWig"
12
+ s.date = "2012-10-02"
13
+ s.description = "Ruby FFI binding of the ucsc kent src. Implemented utilities include: bigWigInfo, bigWigSummary and wigToBigWig"
14
14
  s.email = "throwern@msu.edu"
15
15
  s.extensions = ["ext/ucsc-util/mkrf_conf.rb"]
16
16
  s.extra_rdoc_files = [
@@ -5,20 +5,32 @@ These folders have been extracted into an archive for use by this rubygem.
5
5
  The data was retrieved from:
6
6
  http://hgdownload.cse.ucsc.edu/admin/jksrc.v268.zip
7
7
 
8
- 3 of the original source files have modified code that relies on static (private) methods. New versions need to incorporate these changes.
9
- See bigWigSmooth in:
10
- -inc/bwgInternal.h
11
- -inc/bigWig.h
12
- -lib/bwgCreate.c
13
-
14
- Also converted **environ calls to support OSX shared library in cheapcgi.h/c
15
- #if defined __environ
16
- extern char **environ;
17
- INLINE char **getEnviron() {return environ;}
18
- #else
19
- #include <crt_externs.h>
20
- INLINE char **getEnviron() { return (*_NSGetEnviron()); }
21
- #endif
8
+ Some modifications of the code may be required for this rubygem to operate:
9
+ 1.)
10
+ Some original source files have additional functions defined that rely on static (private) methods. New versions
11
+ need to incorporate these changes. They are required in order to build the additional bigWigSmooth utility.
12
+ bigWigFileSmooth
13
+ bwgSmoothAvg
14
+ bwgSmoothProbe
15
+ testInterval
16
+ setupVariableBigWig
17
+ Files Altered:
18
+ inc/bwgInternal.h
19
+ inc/bigWig.h
20
+ lib/bwgCreate.c
21
+ Additional Utility:
22
+ utils/bigWigSmooth/bigWigSmooth.c
23
+ 2.)
24
+ cheapcgi.h/c has a conditional **environ definition to support shared libraries on OSX
25
+ #ifndef __APPLE__
26
+ extern char **environ;
27
+ INLINE char **getEnviron() {return environ;}
28
+ #else
29
+ #include <crt_externs.h>
30
+ INLINE char **getEnviron() { return (*_NSGetEnviron()); }
31
+ #endif
32
+ 3.)
33
+ added line: 1086 - lineFileClose(&lf); bwgParseBigWig() in bwgCreate.c. Method was leaking open file descriptors
22
34
 
23
35
  ---Original README below
24
36
 
@@ -37,7 +37,15 @@ module Bio
37
37
  end
38
38
  # closes the file
39
39
  def close
40
- Binding::bbiFileClose(bbi_file) if bbi_file
40
+ puts "@bbi_file=#{bbi_file}"
41
+ bound_bbi = Binding::BbiFile.new(bbi_file)
42
+ puts "Binding::BbiFile=#{bound_bbi}"
43
+ puts "Binding::to_ptr=#{bound_bbi.to_ptr}"
44
+ if bbi_file
45
+ bbi_ptr= FFI::MemoryPointer.new(:pointer)
46
+ bbi_ptr.write_pointer(bbi_file)
47
+ Binding::bbiFileClose(bbi_ptr)
48
+ end
41
49
  @bbi_file = nil
42
50
  end
43
51
  # returns the caclulated standard deviation
@@ -106,7 +106,7 @@ module Bio
106
106
  # bbi
107
107
  attach_function :bbiChromList, [:pointer], :pointer # *bbiFile ; BbiChromInfo*
108
108
  attach_function :bbiChromSize, [:pointer,:pointer], :int32 # *bbiFile, chrom ; size
109
- attach_function :bbiFileClose, [:pointer], :void # *bbiFile
109
+ attach_function :bbiFileClose, [:pointer], :void # **bbiFile
110
110
  attach_function :bbiTotalSummary, [:pointer], BbiSummaryElement.by_value # **bbiFile
111
111
  attach_function :bbiSummaryTypeFromString, [:string], BbiSummaryType # summaryType
112
112
  # bigwig
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-ucsc-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-07 00:00:00.000000000 Z
12
+ date: 2012-10-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -75,8 +75,8 @@ dependencies:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
77
  version: 1.8.3
78
- description: ! 'Ruby FFI binding and implmentation of the ucsc utilities: bigWigInfo,
79
- bigWigSummary and wigToBigWig'
78
+ description: ! 'Ruby FFI binding of the ucsc kent src. Implemented utilities include:
79
+ bigWigInfo, bigWigSummary and wigToBigWig'
80
80
  email: throwern@msu.edu
81
81
  executables: []
82
82
  extensions:
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  segments:
128
128
  - 0
129
- hash: -1186691304766418588
129
+ hash: 3159547911850259478
130
130
  required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  none: false
132
132
  requirements: