misshie / bioruby-ucsc-api

Ruby UCSC API: An API for the UCSC Genome Database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2bit sequence retrieval broken for all Ns

morrifeldman opened this issue · comments

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.

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

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