LME on feature-importance output

Hello,

I'm following the tutorial for the longitudinal workflow. I am running QIIME2 v. 2018.11. I successfully used the feature-volatility script on a collapsed taxa file to produce a volatility plot of important features using this command:

qiime longitudinal feature-volatility \
--i-table collapsed_table_lev-6.qza \
--m-metadata-file mapping_cessation.txt \
--p-state-column days_on_risp \
--p-individual-id-column Mouse_num \
--p-n-estimators 80 \
--p-random-state 123 \
--output-dir longitudinal/taxa_volatility_RF_80_est

I found a few taxa that look like they could be interesting for further analysis. I saw in the tutorial that you can look at specific features using LME:

Its average frequency is greater in vaginally born subjects than cesarean-delivered subjects, so could be an interesting candidate for statistical testing, e.g., with linear-mixed-effects .

When I tried to do this I ran into problems. I would appreciate any help in figuring out what I'm doing wrong. To be clear, I'm trying to use an important feature from the feature-volatility command in the LME statistical model. This is the command I tried:

qiime longitudinal linear-mixed-effects \
--m-metadata-file mapping_cessation.txt \
--m-metadata-file longitudinal/taxa_volatility_RF_80_est/feature_importance.qza \
--p-metric k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Ruminococcaceae;g__Oscillospira \
--p-state-column days_on_risp \
--p-individual-id-column Mouse_num \
--p-group-columns treat_group \
--o-visualization longitudinal/vis_LME_Oscillospira.qzv

This gave me an error:
"Cannot merge because there are no IDs shared across metadata "
ValueError: Cannot merge because there are no IDs shared across metadata objects.
-bash: p__Firmicutes: command not found
-bash: c__Clostridia: command not found
-bash: o__Clostridiales: command not found
-bash: f__Ruminococcaceae: command not found
-bash: g__Oscillospira: command not found

I chose that metric by using the TSV file from the Volatility Control Chart and looking at the column titles (the important features I'm interested in). There are values for each sample in that column.

Any help you can give would be great!
Thanks,
Samantha

This is not actually an error from q2-longitudinal — QIIME 2 is raising this error during metadata validation because mapping_cessation.txt and feature_importance.qza do not share any ids. Nor would they: the first is sample metadata, the second is feature metadata. You should not be using feature_importance.qza as an input here — input the feature table instead using the --i-table input.

Let me know if that fixes things!

1 Like

Thanks for the quick response! As per your instructions, I tried using the filtered feature table from the longitudinal output. Unfortunately, I can’t determine the correct metric to use with the --p-metric. The error I’m seeing is that the “metric must be a valid metadata or feature table column.”

To try and find the correct column to use I exported (and converted the biom file) the filtered feature table to see the column names. The one I think I should be using is the “#OTU ID” column, because it contains the important taxa from the feature-volatility script.

I’ve tried many iterations of “OTU ID” to use as the metric:
OTU_ID
#OTU_ID
‘OTU ID’
#OTU ID’

What should I be using as the --p-metric?

Thanks,
Samantha

That's the correct metric (as long as that's one of the feature IDs in your table, e.g., a feature table that has been collapsed on genus-level taxonomy). Enclose the name in single quotes, though — otherwise the semicolons are being interpreted as special characters (by your bash terminal, not QIIME 2).

I see, the error asking for a column threw me. It works perfectly now! Thanks for your help!

~Samantha

1 Like

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