Thank you that worked very well!
Using Blast Command Line to output unaligned FASTA
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?
• 5,441 views
•
link
2 answers
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
• 0 views
•
link
• 0 views
•
link
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.
• 0 views
•
link
Log in to answer this question.