Hiya,
I am having a nightmare trying to run q2-quality-control using my mock community. Apologies for the length of this post! It's a beast. So, specifically, I am trying to run evaluate-composition
. My command was based on the following:
qiime quality-control evaluate-composition
--i-expected-features qc-mock-3-expected.qza
--i-observed-features qc-mock-3-observed.qza
--o-visualization qc-mock-3-comparison.qzv
My first step was to generate my own versions of qc-mock-3-expected.qza and qc-mock-3-observed.qza. For the observed.qza, I re-imported my mock community reads on their own, and in the manifest file, I called them Mock-community. Then joined them, filtered them and denoised using Deblur and got my table.
For the "expected.qza", I used the Mockrobiota resource that I found mentioned in these forums (great idea! ). At first I downloaded the "expected-sequences" file, as was suggested here, using this link (I checked which mock community was appropriate for me (BEI Resources HM-782D - 20 species, even and low concentration): mockrobiota/data/mock-22/source/expected-sequences.fasta at master ¡ caporaso-lab/mockrobiota ¡ GitHub and tried to run the command, but it threw up an error:
Plugin error from quality-control:
Parameter 'expected_features' received an argument of type FeatureData[Sequence]. An argument of subtype FeatureTable[RelativeFrequency] is required.
No worries, I thought, it wants a table. So I downloaded the forward and reverse reads from Mockrobiota, imported them and called them "mockrobiota-expected", joined and filtered them, ran them through Deblur and got my table. Then I tried running qiime quality-control evaluate-composition
again:
Plugin error from quality-control:
Parameter 'expected_features' received an argument of type FeatureTable[Frequency]. An argument of subtype FeatureTable[RelativeFrequency] is required.
So I converted both my tables to relative frequency as follows:
qiime feature-table relative-frequency
--i-table deblur/mockrobiota-table.qza
--o-relative-frequency-table mockrobiota-relative-frequency.qza
Plugin error from quality-control:
"None of [Index([Mock-community'], dtype='object')] are in the [index]"
At this point I noticed that in the tutorial, it states: "evaluate_composition
compares the feature composition of pairs of observed and expected samples containing the same sample ID in two separate feature tables." I figured this might be the problem, as I had my two feature tables, but called one sample Mock-community and the other mockrobiota-expected, so I set about trying to name them the same thing. Following the advice I found here, I tried using the grouping function as described below:
What you can do is add a new column to your metadata file that contains the new sample IDs. Then, when you run the
group
command, point the--m-metadata-column
to the column containing your new sample IDs. The--p-mode
parameter donât matter (you can pick whatever you want) - because you are âgroupingâ the values into the same âgroupsâ, just with new names, none of the abundances will change. Et voila! Moving forward, just drop the old sample ID column from your metadata and replace it with the new sample ID column.
I made a metadata file featuring just those two samples. It looks like this:
#SampleID Day Treatment Sex Pen NewName
Mock-community Mock-community
mockrobiota-expected Mock-community
I ran the following command:
qiime feature-table group
--i-table deblur/mockrobiota-table.qza
--p-axis sample
--m-metadata-file deblur/mock-and-mockrobiota-metadata.txt
--m-metadata-column NewName
--p-mode sum
--o-grouped-table deblur/mockrobiota-new-table.qza
Thank you so much for sticking with me so far. Now I decided to use Qiime 2 View to have a look at my new table because I couldn't visualise what I was trying to achieve. On inspection, the overview stated "Number of samples: 1, Number of features: 1, Total frequency, 11".
Weird, I thought. I would be expecting the number of features to be 20, no? I wonder if something went wrong. So I viewed the mockrobiota-relative-frequency.qzv file from earlier on, and it says "Number of samples: 1, Number of features: 1, Total frequency, 1". Now I'm really confused!
I don't even know where to go from here. I was originally writing this post to ask advice on where to go next, after adding my metadata column and making a new table, so that I could rename my Mockrobiota sample. But now I've discovered this anomaly, it's a more pressing issue! Should I just give up on q2-quality-control?? All I wanted was a nice graph showing theoretical composition of my mock community vs Qiime 2 output, but I can probably do that myself in Excel and I won't get that from q2-quality-control anyway, will I?!
Thank you so much for reading, for any advice and for maintaining this excellent forum! It has been invaluable to this noob.
Best wishes,
Lindsay