Metadata path doesn't exist

Hi everyone,

I tried to run diversity core metric for my data. However, this is the problem I have.

(qiime2-2023.5) hando@Cinderellas-MacBook-Pro ~ % qiime diversity core-metrics-phylogenetic
--i-phylogeny rooted_tree.qza
--i-table filtered-feature-table.qza
--p-sampling-depth 1000
--m-metadata-file metadata.txt
--output-dir core-metrics-results
Usage: qiime diversity core-metrics-phylogenetic [OPTIONS]

Applies a collection of diversity metrics (both phylogenetic and non-
phylogenetic) to a feature table.

Inputs:
--i-table ARTIFACT FeatureTable[Frequency]
The feature table containing the samples over which
diversity metrics should be computed. [required]
--i-phylogeny ARTIFACT Phylogenetic tree containing tip identifiers that
Phylogeny[Rooted] correspond to the feature identifiers in the table.
This tree can contain tip ids that are not present
in the table, but all feature ids in the table must
be present in this tree. [required]
Parameters:
--p-sampling-depth INTEGER
Range(1, None) The total frequency that each sample should be
rarefied to prior to computing diversity metrics.
[required]
--m-metadata-file METADATA...
(multiple arguments The sample metadata to use in the emperor plots.
will be merged) [required]
--p-with-replacement / --p-no-with-replacement
Rarefy with replacement by sampling from the
multinomial distribution instead of rarefying
without replacement. [default: False]
--p-n-jobs-or-threads VALUE Int % Range(1, None) | Str % Choices('auto')
[beta/beta-phylogenetic methods only] - The number
of concurrent jobs or CPU threads to use in
performing this calculation. Individual methods will
create jobs/threads as implemented in
q2-diversity-lib dependencies. May not exceed the
number of available physical cores. If
n-jobs-or-threads = 'auto', one thread/job will be
created for each identified CPU core on the host.
[default: 1]
Outputs:
--o-rarefied-table ARTIFACT FeatureTable[Frequency]
The resulting rarefied feature table. [required]
--o-faith-pd-vector ARTIFACT SampleData[AlphaDiversity]
Vector of Faith PD values by sample. [required]
--o-observed-features-vector ARTIFACT SampleData[AlphaDiversity]
Vector of Observed Features values by sample.
[required]
--o-shannon-vector ARTIFACT SampleData[AlphaDiversity]
Vector of Shannon diversity values by sample.
[required]
--o-evenness-vector ARTIFACT SampleData[AlphaDiversity]
Vector of Pielou's evenness values by sample.
[required]
--o-unweighted-unifrac-distance-matrix ARTIFACT
DistanceMatrix Matrix of unweighted UniFrac distances between
pairs of samples. [required]
--o-weighted-unifrac-distance-matrix ARTIFACT
DistanceMatrix Matrix of weighted UniFrac distances between pairs
of samples. [required]
--o-jaccard-distance-matrix ARTIFACT
DistanceMatrix Matrix of Jaccard distances between pairs of
samples. [required]
--o-bray-curtis-distance-matrix ARTIFACT
DistanceMatrix Matrix of Bray-Curtis distances between pairs of
samples. [required]
--o-unweighted-unifrac-pcoa-results ARTIFACT
PCoAResults PCoA matrix computed from unweighted UniFrac
distances between samples. [required]
--o-weighted-unifrac-pcoa-results ARTIFACT
PCoAResults PCoA matrix computed from weighted UniFrac
distances between samples. [required]
--o-jaccard-pcoa-results ARTIFACT
PCoAResults PCoA matrix computed from Jaccard distances between
samples. [required]
--o-bray-curtis-pcoa-results ARTIFACT
PCoAResults PCoA matrix computed from Bray-Curtis distances
between samples. [required]
--o-unweighted-unifrac-emperor VISUALIZATION
Emperor plot of the PCoA matrix computed from
unweighted UniFrac. [required]
--o-weighted-unifrac-emperor VISUALIZATION
Emperor plot of the PCoA matrix computed from
weighted UniFrac. [required]
--o-jaccard-emperor VISUALIZATION
Emperor plot of the PCoA matrix computed from
Jaccard. [required]
--o-bray-curtis-emperor VISUALIZATION
Emperor plot of the PCoA matrix computed from
Bray-Curtis. [required]
Miscellaneous:
--output-dir PATH Output unspecified results to a directory
--verbose / --quiet Display verbose output to stdout and/or stderr
during execution of this action. Or silence output
if execution is successful (silence is golden).
--recycle-pool TEXT Use a cache pool for pipeline resumption. QIIME 2
will cache your results in this pool for reuse by
future invocations. These pool are retained until
deleted by the user. If not provided, QIIME 2 will
create a pool which is automatically reused by
invocations of the same action and removed if the
action is successful. Note: these pools are local to
the cache you are using.
--no-recycle Do not recycle results from a previous failed
pipeline run or save the results from this run for
future recycling.
--parallel Execute your action in parallel. This flag will use
your default parallel config.
--parallel-config FILE Execute your action in parallel using a config at
the indicated path.
--use-cache DIRECTORY Specify the cache to be used for the intermediate
work of this pipeline. If not provided, the default
cache under $TMP/qiime2/ will be used.
IMPORTANT FOR HPC USERS: If you are on an HPC system
and are using parallel execution it is important to
set this to a location that is globally accessible
to all nodes in the cluster.
--example-data PATH Write example data and exit.
--citations Show citations and exit.
--help Show this message and exit.

              There were some problems with the command:                  

(1/22) Invalid value for '--i-phylogeny': rooted_tree.qza does not exist.
(2/22) Missing option '--i-table'.
(3/22) Missing option '--p-sampling-depth'.
(4/22) Missing option '--m-metadata-file'.
(5/22) Missing option '--o-rarefied-table'. ("--output-dir" may also be used)
(6/22) Missing option '--o-faith-pd-vector'. ("--output-dir" may also be
used)
(7/22) Missing option '--o-observed-features-vector'. ("--output-dir" may
also be used)
(8/22) Missing option '--o-shannon-vector'. ("--output-dir" may also be used)
(9/22) Missing option '--o-evenness-vector'. ("--output-dir" may also be
used)
(10/22) Missing option '--o-unweighted-unifrac-distance-matrix'. ("--output-
dir" may also be used)
(11/22) Missing option '--o-weighted-unifrac-distance-matrix'. ("--output-
dir" may also be used)
(12/22) Missing option '--o-jaccard-distance-matrix'. ("--output-dir" may
also be used)
(13/22) Missing option '--o-bray-curtis-distance-matrix'. ("--output-dir" may
also be used)
(14/22) Missing option '--o-unweighted-unifrac-pcoa-results'. ("--output-dir"
may also be used)
(15/22) Missing option '--o-weighted-unifrac-pcoa-results'. ("--output-dir"
may also be used)
(16/22) Missing option '--o-jaccard-pcoa-results'. ("--output-dir" may also
be used)
(17/22) Missing option '--o-bray-curtis-pcoa-results'. ("--output-dir" may
also be used)
(18/22) Missing option '--o-unweighted-unifrac-emperor'. ("--output-dir" may
also be used)
(19/22) Missing option '--o-weighted-unifrac-emperor'. ("--output-dir" may
also be used)
(20/22) Missing option '--o-jaccard-emperor'. ("--output-dir" may also be
used)
(21/22) Missing option '--o-bray-curtis-emperor'. ("--output-dir" may also be
used)
(22/22) Got unexpected extra argument ( )
zsh: command not found: --i-table
zsh: command not found: --output-dir

Hi @Han_Do,

It looks like there's an issue with your bash command structure. You need to use a "\" character to wrap the lines. That's the reason you're getting a whole series of warnings about probelms with the command at the end.

If you reformat the command like this, the computer will read it as a single, wrapped block

qiime diversity core-metrics-phylogenetic \
--i-phylogeny rooted_tree.qza \
--i-table filtered-feature-table.qza \
--p-sampling-depth 1000 \
--m-metadata-file metadata.txt \
--output-dir core-metrics-results

If you dont include the line break characters, then the computer reads each line individually. It sees the qiime diversity core-metrics-phylogenetic and know you're supposed to have more arguments, but can't find them. Then, it sees the --i-table bit and knows it's an argument, but can't find a command. It's an easy mistake to make (I ruined an embarrassing number of jobs last week forgetting this.)

Try again with the return character, and see if you can get it to work.

Best,
Justine

1 Like

Hello Han_Do,

Welcome to the forums. :qiime2:

Justine has already offered great advice. If you are looking for more guidance on using Linux and the terminal, try this tutorial, and this discussion.

Let us know what you try next!

Thank you for your quick responses, @jwdebelius @colinbrislawn! I'm able to get the code to work. I run into another issue.

In the figure below, my data appear as CaseAYes, CaseBYes, ControlAYes, and ControlBYes.
However, I want them to be rearranged as ControlAYes, CaseAYes, ControlBYes, and CaseBYes. I changed the data order following this setup in metadata.tsv file. But the result remains the same.

Can you give me suggestions on how I can change this?

It's in alphabetical order, so there's not much you can do. You can use another program to customize the graphs more, and I often use R and the Tidyverse to make these graphs.

1 Like

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