Question: Converting ANY blast output file to an alignment fasta file.
4
gravatar for ddusan1
5.4 years ago by
ddusan150
ddusan150 wrote:

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.

tool conversion blast fasta • 8.8k views
ADD COMMENTlink modified 5.4 years ago by hpmcwill1.1k • written 5.4 years ago by ddusan150
4
gravatar for João Rodrigues
5.4 years ago by
João Rodrigues2.5k
Stanford University, U
João Rodrigues2.5k wrote:

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

ADD COMMENTlink written 5.4 years ago by João Rodrigues2.5k
1

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 REPLYlink written 5.4 years ago by ddusan150
2
gravatar for hpmcwill
5.4 years ago by
hpmcwill1.1k
United Kingdom
hpmcwill1.1k wrote:

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 COMMENTlink written 5.4 years ago by hpmcwill1.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1792 users visited in the last hour