misshie / bioruby-ucsc-api

Ruby UCSC API: An API for the UCSC Genome Database
MIT License
19 stars 7 forks source link

2bit sequence retrieval broken for all Ns #4

Closed morrifeldman closed 11 years ago

morrifeldman commented 12 years ago

If I try and retrieve a sequence that is all Ns by doing something like

puts hg19ref.find_by_interval("chr1:10-100")

or

puts hg19ref.subseq("chr1:10-100")

I get the following error: ArgumentError: negative argument from /Users/morriwork/.rvm/gems/ruby-1.9.3-p125@methAnalysis/gems/bio-ucsc-api-0.5.1/lib/bio-ucsc/file/twobit.rb:125:in *' from /Users/morriwork/.rvm/gems/ruby-1.9.3-p125@methAnalysis/gems/bio-ucsc-api-0.5.1/lib/bio-ucsc/file/twobit.rb:125:inblock in find_by_interval' from /Users/morriwork/.rvm/gems/ruby-1.9.3-p125@methAnalysis/gems/bio-ucsc-api-0.5.1/lib/bio-ucsc/file/twobit.rb:117:in map' from /Users/morriwork/.rvm/gems/ruby-1.9.3-p125@methAnalysis/gems/bio-ucsc-api-0.5.1/lib/bio-ucsc/file/twobit.rb:117:infind_by_interval' from (irb):9 from /Users/morriwork/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `

'

I am using ruby 1.9.3-p125 and I installed bioruby-ucsc-api from the gem.

misshie commented 12 years ago

I have reproduced the trouble you reported. Thank you and please wait for a while.

misshie commented 11 years ago

Thank you for your patience. The bug is fiexed and new Ruby UCSC API version 0.5.2 has been released.