[BioRuby] Problem running HMMER from bioruby
George Githinji
georgkam at gmail.com
Thu Jul 17 17:10:11 UTC 2008
Hi!
What could possibly be wrong with this code for running a hmm search the
bioruby way?
hmmfile = "/home/george/NetBeansProjects/pfvsa/public/hmms/pfVSAs.hmm"
#the bioruby way
seq_to_search ="/home/george/sequences/sequences.fasta"
factory = Bio::HMMER.new('hmmpfam',hmmfile,seq_to_search)
report = factory.query
puts report.class
I am getting this error
/usr/lib/ruby/1.8/shellwords.rb:30:in `shellwords': Argument must be a
string (ArgumentError)
from
/usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/hmmer.rb:70:in
`initialize'
from /home/george/NetBeansProjects/bio_test/lib/blasting.rb:27:in
`new'
from /home/george/NetBeansProjects/bio_test/lib/blasting.rb:27
closer inspection of shellwords shows this code
def shellwords(line)
line = String.new(line) rescue
raise(ArgumentError, "Argument must be a string")
line.lstrip!
words = []
until line.empty?
field = ''
loop do
if line.sub!(/\A"(([^"\\]|\\.)*)"/, '') then
snippet = $1.gsub(/\\(.)/, '\1')
elsif line =~ /\A"/ then
raise ArgumentError, "Unmatched double quote: #{line}"
elsif line.sub!(/\A'([^']*)'/, '') then
snippet = $1
elsif line =~ /\A'/ then
raise ArgumentError, "Unmatched single quote: #{line}"
elsif line.sub!(/\A\\(.)?/, '') then
snippet = $1 || '\\'
elsif line.sub!(/\A([^\s\\'"]+)/, '') then
snippet = $1
else
line.lstrip!
break
end
field.concat(snippet)
end
words.push(field)
end
words
end
--
---------------
Sincerely
George
Skype: george_g2
Website: http://biorelated.wordpress.com/
More information about the BioRuby
mailing list