This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Prokka cycles

Hey guys, can you please share with me an idea, how to annotate more than 300 genomes in a for loop, so I can see the output of each one in separate folders named same as each genome? It's hard to orientate in a such huge output... For one genome it works like that:

prokka --kingdom Bacteria --outdir Anotation --addgenes Dataset/Akkermansia_muciniphila_An78.faa for example

Thanks a lot in advance!

prokka annotation multiple

1 answer

Assuming that all your genomes end in .fna and that you use a bash shell:

for i in *.fna
do
prokka --kingdom Bacteria --outdir ${i%.fna} --force --prefix ${i%.fna} --locustag ${i%.fna} --addgenes --cpus # $i
done

For a (t)csh shell:

foreach i ( *.fna )
prokka --kingdom Bacteria --outdir $i:r --force --prefix $i:r --locustag $i:r --addgenes --cpus # $i
end

In both cases instead of # you should enter the actual number of CPUs allocated to this command, and prokka command may need to be customized a bit to match your needs.

Thank you a lot, Mensur, that was extremely helpful!

Log in to answer this question.