This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to automate blasting contigs?

I have sequenced a bacterial genome and obtained contigs using de novo assembly. I obtained over 100 contigs, 4 longer than 50 000 bases, 460 above 1000 bp.

Is there a way to automate the blasting of these contings?

Is there a threshold for the length of the valid contigs?

Thank you

assembly contig blast wgs

1 answer

There is nothing to automate if all the contigs are in a single file.

blastn -query contigs.fna -db nr -task blastn -out contigs_vs_nr.txt -evalue 1e-10 -num_threads 10

If you have the contigs in individual files that end in .fna:

for i in *.fna
do
blastn -query $i -db nr -task blastn -out ${i%.fna}_vs_nr.out -evalue 1e-10 -num_threads 10
done

For metagenomes I do not use contigs smaller than 2,000 bp. As you seem to have a pure isolate, a 1,000 cutoff could be used as well.

Log in to answer this question.