This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BioPython : BLAST comparision and parsing output in particular format

I have query sequence, Suppose query: NNNNNNNNNNNNNNNNNN

  • Database 1: Homo sapien
  • Database 2: Mycobacterium tuberculosis

I compared query sequence with above two Databases using Standalone BLAST individually and I got result as ex. Result1.txt and Result 2.txt. Now, I wanted to write a python programme which will store first 10 results of BLAST result from both files (Result1.txt and Result2.txt) in following format.

Query     Homo sapien                    Mycobacterium tuberculosis
gi ID     gi ID  (1st compared seq.)     gi ID (1st compared seq.)
Length    Length                         Length
          E-value                        E-value
          Score                          Score

Somebody have any suggestions to store this information in above format.

Thank you

blast

1 answer

You can have an output in tabular format, that would simplify your work.

Sir, I don't have output in tabular format but i wanted to convert in a tabular format......

You have an option in BLAST to have the output in tabular format. The parameter is -outfmt and you can set it to:

  • 6 = tabular,
  • 7 = tabular with comment lines,

In this way you would have the output in tabular format.

Log in to answer this question.