anvi-script-get-sra-metadata

Ask NCBI what it knows about a set of SRA run accessions, and keep the answers in a TAB-delimited file. Anvi'o workflows that download reads from the SRA need to know whether each run is paired-end or single-end, whether it came off a short-read or a long-read instrument, and how big it is, all before they can start. They will build this file themselves the first time they need it; this program exists so you can build it ahead of time (handy if the computer that runs your workflow has no internet access), and so you can see what anvi'o thinks before it acts on it.

🔙 To the main page of anvi’o programs and artifacts.

Authors

Requires

samples-txt

Provides

sra-metadata-txt

Usage

This program asks NCBI what it knows about a set of SRA run accessions and writes the answers into a sra-metadata-txt.

You do not have to run it. Any anvi’o workflow that downloads reads from the SRA builds this file itself the first time it needs one. This program exists for the two cases where doing it by hand is better: when the computer that runs your workflows cannot reach the internet, and when you would like to look over what anvi’o concluded before it acts on it.

Starting from a list of accessions

anvi-script-get-sra-metadata --accession-list SRA_accession_list.txt \ -o SRA-METADATA.txt

where SRA_accession_list.txt is a file with one SRA run accession per line.

Starting from a samples-txt

If you already have a samples-txt with an sra_accession column in it, point this program at that instead and it will pick the accessions out for you:

anvi-script-get-sra-metadata --samples-txt samples-txt \ -o SRA-METADATA.txt

What it tells you

Along with the file itself you get a summary of what is in it: how many runs are paired-end short reads and how many are long reads, and how much disk space they would take up if you downloaded every one of them at once. That last number is a useful sanity check before setting max_disk_gb in your workflow-config.

You will also hear about anything that needs your attention — long-read runs whose sequencing chemistry could not be determined from NCBI’s description, and single-end short-read runs, which the metagenomics workflow cannot process.

Running it again

Running this program a second time on the same output file does not start over. Anvi’o reads what is already there, looks up only the accessions that are missing, and appends them. Rows you have corrected by hand are left exactly as you wrote them, which is what makes this file a reasonable place to fix NCBI metadata that is wrong.

Edit this file to update this information.

Additional Resources

Are you aware of resources that may help users better understand the utility of this program? Please feel free to edit this file on GitHub. If you are not sure how to do that, find the __resources__ tag in this file to see an example.