[BioRuby] Wu-blast report parsing issue

Yannick Wurm Yannick.Wurm at unil.ch
Tue Apr 24 15:03:56 EDT 2007


Hello,

I've generated a blast report using wu-blastall with -m7 to get xml  
output.
It should be easy to get this into ruby, but I'm having a hard time.

Here's the error I get:
#~/ruby/dotGraphOfStrongHits.rb simple.xml simple.xml.dot 1.0e-5
/sw/lib/ruby/site_ruby/1.8/bio/appl/blast/xmlparser.rb:158:in  
`clone': can't clone NilClass (TypeError)
         from /sw/lib/ruby/site_ruby/1.8/bio/appl/blast/xmlparser.rb: 
158:in `xmlparser_parse_hit'
         from /sw/lib/ruby/site_ruby/1.8/bio/appl/blast/xmlparser.rb: 
72:in `xmlparser_parse'
         from /sw/lib/ruby/site_ruby/1.8/bio/appl/blast/xmlparser.rb: 
41:in `xmlparser_parse'
         from /sw/lib/ruby/site_ruby/1.8/bio/appl/blast/report.rb: 
66:in `auto_parse'
         from /sw/lib/ruby/site_ruby/1.8/bio/appl/blast/report.rb: 
89:in `initialize'
         from /sw/lib/ruby/site_ruby/1.8/bio/appl/blast.rb:115:in  
`reports'
         from /sw/lib/ruby/site_ruby/1.8/bio/appl/blast.rb:109:in  
`reports'
         from /Users/yannickwurm/ruby/wublastReportParser.rb:49:in  
`loadBlastReport'
         from /Users/yannickwurm/ruby/dotGraphOfStrongHits.rb:30:in  
`parseFile'
         from /Users/yannickwurm/ruby/dotGraphOfStrongHits.rb:61

The corresponding lines of wublastReportParser.rb are:
48:		@file = File.open(@blast_report, IO::RDONLY)
49:		@reportsArray = Bio::Blast.reports(@file)


Does wublast not respect the standard blast xml output?
I've tried feeding my script normal (-m0) wublast output too. It  
doesn't crash - but @reportsArray.length == 0).

My xml-ed blast report is here:
http://wwwpeople.unil.ch/yannick.wurm/simple.xml


What am I doing wrong? Do you have ideas how to solve this issue?


My version info:
	wu-blastall 2.2.6
	ruby 1.8.4 (2005-12-24) [powerpc-darwin]
	bio.rb,v 1.84 2007/04/05

Thanks in advance for any pointers!
yannick

--------------------------------------------
          yannick . wurm @ unil . ch
Ant Genomics, Ecology & Evolution @ Lausanne
   http://www.unil.ch/dee/page28685_fr.html




More information about the BioRuby mailing list