Help with Abundance Table

Hello,
Currently I have an abundance table which displays the abundance of the feature ids. I am wondering if there is a way to replace those feature ids with the specific taxonomic identifiers they map to?

Thank you

Hi @camth! You can use qiime taxa collapse to create a feature table with taxonomic annotations as its feature IDs. The features within each taxon will have their abundances summed in the resulting table (this is what we mean by “collapsing” at a particular taxonomic level).

Side note: qiime taxa collapse is very similar to summarize_taxa.py in QIIME 1.

1 Like

Hi Thank you for the reply. However upon trying the qiime taxa collapse it output a table without feature ids or taxonomic annotations only abundances. Upon comparing the tutorial files to mine I saw my files lacked the k_,p_,c_,etc before the identifier. I went back in the original files to add these and repeat the classifier training step only now it has been running for six hours instead of the much shorter (less than an hour) original time. I am wondering is this time period normal and would the addition of those k_,p_ rectify the empty table issue?
Thank You

Hi @camth!

Hmm, something doesn't sound quite right here. Can you try the following:

$ qiime taxa collapse \
  --i-table feature-table.qza \
  --i-taxonomy taxonomy.qza \
  --p-level 2 \
  --o-collapse-table collapsed-table.qza
$ qiime feature-table summarize \
  --i-table collapse-table.qza \
  --o-visualization collapsed-table-summary.qzv

The third tab in the resulting visualization ("Feature Detail") has a table of the features, with the Feature ID replaced with the collapsed taxonomic identifier:


Can you provide a little more detail here about this? What reference database are you using? Not all databases use the k_;p_;c_ notation, so it shouldn't be a problem that you don't have that. The only requirement is that the identifiers be ; (semi-colon) delimited.
Thanks!

Hello Good Afternoon,
When trying to run the qiime collapse on the original files I received the following error:
Plugin error from taxa:
Requested level of 2 is larger than the maximum level available in taxonomy data (1).

The reference file is a custom built one for the project so in order to provide identifiers I inserted the k;p;c; notation and attempted to re-train the classifier by I receive the following error:
Plugin error from feature-classifier:
not enough values to unpack (expected 2, got 0)

I am not quite sure how to rectify these errors.

Hi @camth, can you please provide an example of your custom reference file? Just a few lines should be enough. As well, can you provide us with the command you are using to train the classifier using this reference DB? Thanks! :tada:

Hello thank you
The reference fasta files look like this

>PROS91
GAGCAGATAGTTTACTTTAACTGTTATGTGGTTCTGGATGCGGGTGATCACAAAGACCTGAAG....
>A1524
TAGCAGATAGTCTATTTTAACTGCTACGTGGTGCTGGATCCCGGCGACCACAAAGAGCTGAA....

I also have the main sequence fasta file

then the taxonomy file looks like this

SYN20	SYN1
PROS-9-1	SYN1
ROS8604	SYN1
MVIR-18-1	SYN1
WH8020	SYN1

then i am using

qiime feature-classifier fit-classifier-naive-bayes \
  --i-reference-reads ref-seqs.qza \
  --i-reference-taxonomy ref-taxonomy.qza \
  --o-classifier classifier.qza

Hi @camth! It looks like your taxonomy annotations only go one level deep (e.g. SYN1, vs SYN1;foo;bar). You should be able to collapse on level 1:

$ qiime taxa collapse \
  --i-table feature-table.qza \
  --i-taxonomy taxonomy.qza \
  --p-level 1 \
  --o-collapse-table collapsed-table.qza

which will effectively group based on those labels. Let us know how it goes!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.