Does Biopython Parse Blast -M8 Or -M9 (Aka Blasttable)?
3
1
Entering edit mode
14.0 years ago

I am getting the following error when I try -m9

  File "parseBlast.biopython.py", line 5, in ?
    blast_record = blast_parser.parse(result_handle)
  File "/src/biopython-1.52/build/lib.linux-x86_64-2.4/Bio/Blast/NCBIStandalone.py", line 763, in parse
    self._scanner.feed(handle, self._consumer)
  File "/src/biopython-1.52/build/lib.linux-x86_64-2.4/Bio/Blast/NCBIStandalone.py", line 96, in feed
    self._scan_header(uhandle, consumer)
  File "/src/biopython-1.52/build/lib.linux-x86_64-2.4/Bio/Blast/NCBIStandalone.py", line 213, in _scan_header
    raise ValueError("Invalid header?")
ValueError: Invalid header?
biopython python • 4.2k views
ADD COMMENT
2
Entering edit mode
14.0 years ago

Try with blast's XML output instead. As explained in biopython's FAQs (#17), the XML format is the only one that will be always supported.

ADD COMMENT
0
Entering edit mode

uhhh no thanks xml is way too verbose. I have over 20M alignments.

ADD REPLY
0
Entering edit mode

then either try the latest biopython's release or use another tool. Or write to the biopython's mailing list and explain your use case, maybe they will update the parser for you.

ADD REPLY
2
Entering edit mode
14.0 years ago

ParseBlastTable may do what you want, but it was designed for the output of blastpgp, not blastall. I can't get it to work with the BLASTN blasttable I have to hand.

ADD COMMENT
2
Entering edit mode
14.0 years ago
Darked89 4.6k

Take a look at Biostar question: "How to convert BLAST results to GFF"

There is fairly easy Python solution for parsing blast column output.

ADD COMMENT

Login before adding your answer.

Traffic: 2771 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6