Converting ANY blast output file to an alignment fasta file.
2
4
Entering edit mode
10.5 years ago
ddusan1 ▴ 50

Hey there guys.

We use the Blast Command Line toolkit to Blast populations against each other. We created a database of transcriptomes of one population and then used the blast command line kit to compare the transcriptome of the other species. I should mention we got the longest ORFs from each transcriptome and compared those, not just the transcriptome. Anyway, when we do this we attain a text file with the results and % identity and such. I was wondering if there is any way to convert this to an alignment fasta file. Like the following format,

>title
ATCGCTGCATCGATCGACTTTTCGATCGATC---CGCGCGCGTAGAGCTAGCTAGCT
>title2
ATCGCTGCATCGATCGACTTTTCGATCGATCTTTCGCGCGCGTAGAGCTAGCTAGCT
>title3
GTAGATGATAGATAGATGAAGATAGATAGATAG-GTAGATCGATC----GTCATGAC
>title4
GTAGATGATAGATAGATGAAGATAGATAGATAG-GTAGATCGATC-GC-GTCATGAC

You have a single ORF (from the database) and the matching query hit second. I need it in this specific format because I need to be able to retrieve the dn/ds ratio using a script I edited. The script works and everything but it requires that format and I have no idea how to get that from an blast outformats. So in summation or TL:DR How do I convert ANY blast outfmt to an alignment fasta as shown above (sequence, similar sequence, sequence, similar sequence, etc.) If someone could walk me through, this I'd greatly appreciate it.

blast fasta conversion • 14k views
ADD COMMENT
4
Entering edit mode
10.5 years ago
João Rodrigues ★ 2.5k

Try having a look at Bio* projects. In Biopython you can easily do so.

ADD COMMENT
1
Entering edit mode

Brilliant! I was able to research the SearchIO module and was able to create a script to do it and this post led me there!

Thank you very much!

ADD REPLY
2
Entering edit mode
10.5 years ago
hpmcwill ★ 1.2k

Try having a look at MView, it supports generation of multiple sequence alignments from BLAST or FASTA output, including support for multiple HSPs per hit. As well as providing options for HTML outputs, you can get the resulting alignment in plain old fasta/Pearson format.

The EMBL-EBI provides a service for MView, which might be useful for experimentation with the various options.

ADD COMMENT

Login before adding your answer.

Traffic: 1232 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