Using Blast Command Line to output unaligned FASTA
2
1
Entering edit mode
7.8 years ago
sharabesh97 ▴ 10

I am attempting to search for a set of homologs using BLAST command line. I currently am using the command blastp -db swissprot -query [FASTA_FILE] -evalue 0.005 -out homologs.fasta.

However, I am ideally looking for BLAST to output all the FASTA sequences of the hits to my query sequence in unaligned form. Is there a modification I can make to support this?

BLAST FASTA Homologs • 4.9k views
ADD COMMENT
2
Entering edit mode
7.8 years ago
5heikki 11k

You can do e.g. this:

blastp -db swissprot -query [FASTA_FILE] -evalue 0.005 -outfmt '6 sseqid sseq' \
    | awk 'BEGIN{FS="\t"; OFS="\n"}{gsub(/-/, "", $2); print ">"$1,$2}' \
    > homologs.fasta
ADD COMMENT
0
Entering edit mode

Thank you that worked very well!

ADD REPLY
0
Entering edit mode
7.8 years ago
fred.s.kremer ▴ 110

Please, take a look at this post in SEQanswers:

http://seqanswers.com/forums/showthread.php?t=8805

They basically recommend the construction of a list of IDS for those sequences in the database that matched and than used the blastdbcmd program to extract them from the BLAST database.

ADD COMMENT

Login before adding your answer.

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