Including file name of database into blast output
1
0
Entering edit mode
2.1 years ago
tariela • 0

Hi everyone, can you please advise me on how to include the file name of my database into the output of blast while using outfmt 6?

The example below - I need the ${file} included in every ${file}.blast output file, so I could merge all the ${file}.blast files into one and still know which database ${file} did the sequence come from.

makeblastdb -in ${file}.fa -dbtype nucl -out ${file}

blastn -query query.fasta -db ${file} -out ${file}.blast -outfmt "6 qseqid sseqid pident length qstart qend sstart send evalue bitscore sseq" -num_threads 36 -max_target_seqs 5 -task blastn

Perhaps I am missing some obvious way. I'd prefer not to rename all the sequences in the database files and I'd rather not use outfmt 7 where I could get the database file name in the comment.

Thank you all so much, this is my first post.

outfmt blast makeblastdb database dbtype firstpost • 911 views
ADD COMMENT
0
Entering edit mode
2.1 years ago

As far as I know, the database name is not available as an outfmt template parameter.

As a workaround you could prepend that information in your script:

echo "# dbname=${file}.fa > results.txt
blastn .... >> results.txt

interestingly there are other pieces of information that are only available with outfmt 7, not getting a hit with a query is mentioned in the comments of format 7 but not in format 6

ADD COMMENT

Login before adding your answer.

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