ANCOM Error: --o-visualization option requires an argument

Hi!
I am running an ANCOM test on my samples and recieveing the following mistake:
The command:

for Niche in Niche_list:
        outdir = '%s/By_Niche/%s/ANCOM' % (folder, Niche)
        !mkdir $outdir
        for i in range (3,8):
            table     = '%s/By_Niche/%s/%s_%s_table.qza'% (folder, Niche, folder, Niche)
            table_lev = outdir + '/%s-table-%s.qza'     % (i, Niche)
            comp_lev  = outdir + '/%s-comp-%s.qza'      % (i, Niche)
            Time_lev  = outdir + '/%s-Ancom_TP_%s.qzv'  % (i, Niche)
            
            !qiime taxa collapse \
                --i-table $table \
                --i-taxonomy taxonomy-without-spaces.qza \
                --p-level $i \
                --o-collapsed-table $table_lev
            !qiime composition add-pseudocount \
                --i-table $table_lev \
                --o-composition-table $comp_lev
            !qiime composition ancom \
                --i-table $comp_lev \
                --m-metadata-file $metadata \
                --m-metadata-column TP \
                --o-visualization $Time_lev

Error message:

Saved FeatureTable[Frequency] to: All_Samples/By_Niche/Root/ANCOM/3-table-Root.qza
Saved FeatureTable[Composition] to: All_Samples/By_Niche/Root/ANCOM/3-comp-Root.qza
Error: --o-visualization option requires an argument

As you can see from the message, variables are announced in the right way, since I am successfully getting the first two files, an error only refers to the third one.
So, which argument it is asking for?
Thank you in advance.

Hi @timanix,

It looks like your Time_lev variable isn’t being defined properly and is returning an empty string. I’d double check by using print(Time_lev) (in Python 3) and/or !echo $Time_lev with basThat’s the one place I imagine you’re getting the error.

Do you know if it’s failing on the first iteration, or if it’s failing later?

Best,
Justine

2 Likes

Sorry for the trouble, due to my progressing sclerosis I forgot to declare a metadata file :grimacing:/ Shame on me. Can I delete a post? It is working now
Thank you very much!
Sorry for your time

Ugh! I hope you feel better.

Up to you; Ive made the same mistake with declaring and passing variables I don't know how often. So, it's probably worthwhile because it may be instructive to others.

And, as far as time goes?

XKCD Compiling

2 Likes