qiime longitudinal pairwise differences comparisons using a feature table

Hi User support,
I looked through the forum and could not find an answer for my error, so I hope I did not miss it.
I am trying to run qiime longitudinal pairwise difference comparisons on a feature table to see whether there are specific taxa that change across time.
I use qiime2-2019.10 on an ubuntu machine.
This is the command I used:

qiime longitudinal pairwise-differences --i-table cleaned-L2-rel.qza --m-metadata-file map.txt --p-metric k__Bacteria;p__Actinobacteria --p-group-column Diet --p-state-column Time --p-state-1 1 --p-state-2 3 --p-individual-id-column Pt --p-replicate-handling random --o-visualization pairwise-differences-actino.qzv
This is the error I got:
There were some problems with the command:
(1/5) Missing option “–p-state-column”.
(2/5) Missing option “–p-state-1”.
(3/5) Missing option “–p-state-2”.
(4/5) Missing option “–p-individual-id-column”.
(5/5) Missing option “–o-visualization”. ("–output-dir" may also be used)
p__Actinobacteria: command not found

So I thought that the “;” in k__Bacteria;p__Actinobacteria was creating problems and I tried running this:
qiime longitudinal pairwise-differences --i-table cleaned-L2-rel.qza --m-metadata-file map.txt --p-metric p__Actinobacteria --p-group-column Diet --p-state-column Time --p-state-1 1 --p-state-2 3 --p-individual-id-column Pt --p-replicate-handling random --o-visualization pairwise-differences-Actino.qzv

Plugin error from longitudinal:
metric must be a valid metadata or feature table column.

It seems that like this is not recognizing the feature either. I am sure this is probably a very silly problem but I can’t figure it out, hope you understand where the error is!
Thank you very much
Giada

Hi there, Giada! Thanks for your question and welcome to the forum.

Your suspicion that the first error was due to the ; in the command was correct. ; is a special character in bash:

Command separator [semicolon]. Permits putting two or more commands on the same line.

See Special Characters for more details.

The ; in value you were passing the --p-metric caused your command to terminate early, which explains why qiime didn't register the rest of your command.

One way to avoid this would be to quote the value being passed e.g., --p-metric "k__Bacteria;p__Actinobacteria"

This will make sure bash doesn't interpret the ; as a command separator and I recommend trying this first.

Secondly, make sure the value being passed to --p-metric actually exists as a column in your table. You can check using the inspect-metadata tool. For example, qiime tools inspect-metadata cleaned-L2-rel.qza

1 Like

Thank you Andrew! Indeed was a very silly problem…in all my trials I hadn’t tried that one.
Thank you again for your time!
Giada

3 Likes

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