Site icon EdwardsLab

Submitting a PATRIC genome annotation using the command line

The PATRIC BRC has a great command line interface that allows you to access much of the data remotely. Here is a simple recipe to submit a genome for annotation.

To learn more about the CLI, read the docs or install it. Once you have it installed, you need to login using the command

p3-login username

Then, if you have a fasta file, say phage lenchom, you can use this command to run it.

p3-submit-genome-annotation --contigs-file phage_lencho.fasta --phage -n "Bacteroides phage lencho" -t 196894 -d Virus /redwards@patricbrc.org/home/Bacteroides Bacteroides_phage_lencho

This sets:

Now go submit a few thousand annotations!

Downloading in Bulk

Once those annotations have run, you can download them all in bulk. I’m still using the Bacteroides directory here, and first we get a list of names, and then we get the annotations in GenBank format

p3-ls -l --type /redwards@patricbrc.org/home/PhispyBacteroides  | perl -ne '/job_result (.*)$/ and print "$1\n"' > jobs

cat jobs | while read g; do echo $g; p3-cp ws:"/redwards@patricbrc.org/home/Bacteroides/.$g/$g.gb" genbank/; done

Exit mobile version