[Biopython] Fwd: BlastParsing gives Value Error: Invalid header?

Martin Mokrejs mmokrejs at fold.natur.cuni.cz
Wed May 9 18:01:08 UTC 2012


Hi Brad,
  I just got bitten by this myself as well. Could be the legacy blast parser
improved to give clearer error message? E.g. that it failed to find the LOCUS
line or whatever was it looking for? With the legacy BLAST documentation being
gone from current Tutorial it is easy to pick the wrong parser. ;)
  And BTW, please do not drop support for legacy BLAST. I just cannot make BLAST+
give me same alignment, no matter what arguments I use to adjust for the (it gives me
wider alignment than wanted and I can make it a look shorter, but shortening it just
a bit like legacy BLAST output .. is not doable).
  And, took me a while to find old biopython-1.52.tar.gz to lookup the old docs.
Could there be a hyperlink from Tutorial to these unpacked, browseable sources? ;)
I am speaking about http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc85 .
Thanks,
Martin
  

Brad Chapman wrote:
> 
> Sar;
> 
>> I am new to both python and biopython.
> 
> Welcome. Thanks for including your code along with the problem report.
> 
>> What I'm trying to do is to parse a blast result xml file (myblast.xml),
>> attached here.
>>
>> The code looks like this:
> [...]
>> blast_parser = NCBIStandalone.BlastParser()
> [...]
>> ValueError: Invalid header?
> 
> You are using NCBIStandalone, which parses plain text blast output. To
> parse the XML output, you should use the NCBIXML parser:
> 
> from Bio.Blast import NCBIXML
> blast_records = NCBIXML.parse(result_handle)
> 
> The tutorial has more details and examples:
> 
> http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc87
> 
> Hope this helps,
> Brad
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
> 
> 



More information about the Biopython mailing list