Using the MG-RAST API, I can download an abundance table for over a set of 16S amplicon projects... but I don't understand why the only annotations/ids for the taxa seem to be NCBI taxonomy (and not at the strain level) rather than something like greengenes (which is actually the source of the taxonomic assignment).
What I'd like is to pull out the reference sequence for each OTU you get from the biom file. These sequences are available here: ftp://ftp.metagenomics.anl.gov/data/M5nr/20131215/sources/.
The ids in the Greengenes/Greengenes.md52id2func file from the ftp match up with what I see from the MG-RAST analysis toolbox after you send individual strains to the 'workbench' and look at the annotated hits table. You can even count the hits. So it stands to reason that the abundance information associated with these ids should be get-able. But is there a way to instruct the MG-RAST to use these greengenes ids when constructing a biom file?... You don't even see this when using the point-and-click analysis toolbox.
Anybody know a way around this?
Thanks!
0 answers
No answers yet.
Log in to answer this question.
To clarify, are you saying that calling the
profileAPI endpoint with the source set asGreengenesis insufficient?For example http://api.metagenomics.anl.gov/1/profile/mgm4455655.3?source=Greengenes The RDP taxonomy is the default.
I've been using the matrix/ organism interface, such as http://api.metagenomics.anl.gov/1/matrix/organism?id=mgm4455655.3&source=Greengenes&result_type=abundance&taxid=true
Here, taxid are NCBI taxonomies. Is there any way to map OTUs back to the greengenes sequence?
What I seem to be able to do using the website (https://metagenomics.anl.gov/metagenomics.cgi?page=Analysis) is (for example) search for metagenome "4455655.3", change the annotation source to Greengenes and generate the table. Switch 'group table' to the strain level. For the first entry (Acidobacterium capsulatum), click on the checkbox and send it to the workbench. In the workbench window, 'display annotated hits' and I can find the id "3704" associated with that strain ("database source id of the hit").
If you go ahead and download and extract the Greengenes source data from here, ftp://ftp.metagenomics.anl.gov/data/M5nr/20131215/sources/ you can find 3704 in the Greengenes.md52id2func file with the correct taxonomy (i.e., by using
grep)In the biom table from the API, the id for this bug is "33075"... http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=33075
What I want is for the MG-RAST API to give me the greengenes ID (in this case 3704) so I don't have to point and click to get each 'annotated hit' entry for strain associated with a single metagenome.
Thanks for responding and suggesting a reproducible example.
To add... I realize the API has an annotate function: http://api.metagenomics.anl.gov/1/annotation/sequence/mgm4455655.3?type=organism&source=Greengenes but there doesn't seem to be enough information to disambiguate between some of the corresponding entries in the abundance table. For example, some have only higher level taxonomic assignment (though I suppose I could work backwards from the annotated md5sums) and some have multiple entries in the sequence annotation but not in the abundance/biom.
Totally unclassified bacteria that appear in the biom table (77133/ uncultured bacterium) seem to be missing from this annotation. Additionally, it seems inefficient to grab all sequences (when I just need summaries over counts) and for each metagenome at a time if another solution exists I'd love to hear it.