Classifying picked OTU's

Hi,
I was trying to classify my OTU's, training of classifiers was done successfully and I got the required output. While I was trying to run the classification by using the following script:
echo "LOG $( date ) classify picked OTUs" | tee -a $logfile
qiime feature-classifier classify-sklearn
--i-reads DWNew-rep-seqs-dn-99.qza
--i-classifier silva-132-16S-99-classifier.qza
--o-classification DWNew-taxonomy-classifications.qza

I received the following error:
Usage: qiime feature-classifier classify-sklearn [OPTIONS]

Classify reads by taxon using a fitted classifier.

Inputs:
--i-reads ARTIFACT FeatureData[Sequence]
The feature data to be classified. [required]
--i-classifier ARTIFACT
TaxonomicClassifier The taxonomic classifier for classifying the reads.
[required]
Parameters:
--p-reads-per-batch VALUE Int % Range(1, None) | Str % Choices('auto')
Number of reads to process in each batch. If "auto",
this parameter is autoscaled to min( number of query
sequences / n-jobs, 20000). [default: 'auto']
--p-n-jobs INTEGER The maximum number of concurrently worker processes.
If -1 all CPUs are used. If 1 is given, no parallel
computing code is used at all, which is useful for
debugging. For n-jobs below -1, (n_cpus + 1 + n-jobs)
are used. Thus for n-jobs = -2, all CPUs but one are
used. [default: 1]
--p-pre-dispatch TEXT "all" or expression, as in "3n_jobs". The number of
batches (of tasks) to be pre-dispatched.
[default: '2
n_jobs']
--p-confidence VALUE Float % Range(0, 1, inclusive_end=True) | Str %
Choices('disable') Confidence threshold for limiting taxonomic depth.
Set to "disable" to disable confidence calculation,
or 0 to calculate confidence but not apply it to
limit the taxonomic depth of the assignments.
[default: 0.7]
--p-read-orientation TEXT Choices('same', 'reverse-complement', 'auto')
Direction of reads with respect to reference
sequences. same will cause reads to be classified
unchanged; reverse-complement will cause reads to be
reversed and complemented prior to classification.
"auto" will autodetect orientation based on the
confidence estimates for the first 100 reads.
[default: 'auto']
Outputs:
--o-classification ARTIFACT FeatureData[Taxonomy]
[required]

Please help me in solving this error.

Hello Vinela,

I don't see an error in that message, so I'm not 100% sure what's going on... :thinking:

I wonder if unix is seeing that as separate commands. Try this:

echo "LOG $( date ) classify picked OTUs" | tee -a $logfile
qiime feature-classifier classify-sklearn \
--i-reads DWNew-rep-seqs-dn-99.qza \
--i-classifier silva-132-16S-99-classifier.qza \
--o-classification DWNew-taxonomy-classifications.qza

This is just like your input, but I've added \ backslashes \ at the ends of middle lines to tell the terminal that I'm continuing the same command.

Thank you for the response. I added backslashes in my script but still received the same error.

Please find the attachment for the error I received

Usage: qiime feature-classifier classify-sklearn [OPTIONS]

Classify reads by taxon using a fitted classifier.

Inputs:
--i-reads ARTIFACT FeatureData[Sequence]
The feature data to be classified. [required]
--i-classifier ARTIFACT
TaxonomicClassifier The taxonomic classifier for classifying the reads.
[required]
Parameters:
--p-reads-per-batch VALUE Int % Range(1, None) | Str % Choices('auto')
Number of reads to process in each batch. If "auto",
this parameter is autoscaled to min( number of query
sequences / n-jobs, 20000). [default: 'auto']
--p-n-jobs INTEGER The maximum number of concurrently worker processes.
If -1 all CPUs are used. If 1 is given, no parallel
computing code is used at all, which is useful for
debugging. For n-jobs below -1, (n_cpus + 1 + n-jobs)
are used. Thus for n-jobs = -2, all CPUs but one are
used. [default: 1]
--p-pre-dispatch TEXT "all" or expression, as in "3n_jobs". The number of
batches (of tasks) to be pre-dispatched.
[default: '2
n_jobs']
--p-confidence VALUE Float % Range(0, 1, inclusive_end=True) | Str %
Choices('disable') Confidence threshold for limiting taxonomic depth.
Set to "disable" to disable confidence calculation,
or 0 to calculate confidence but not apply it to
limit the taxonomic depth of the assignments.
[default: 0.7]
--p-read-orientation TEXT Choices('same', 'reverse-complement', 'auto')
Direction of reads with respect to reference
sequences. same will cause reads to be classified
unchanged; reverse-complement will cause reads to be
reversed and complemented prior to classification.
"auto" will autodetect orientation based on the
confidence estimates for the first 100 reads.
[default: 'auto']
Outputs:
--o-classification ARTIFACT FeatureData[Taxonomy]
[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).
--examples Show usage examples and exit.
--citations Show citations and exit.
--help Show this message and exit.

                There was a problem with the command:                     

(1/1) Invalid value for '--i-reads': 'DWNew-rep-seqs-dn-99.qza' is not a
valid filepath
Usage: qiime taxa filter-table [OPTIONS]

This method filters features from a table based on their taxonomic
annotations. Features can be retained in the resulting table by specifying
one or more include search terms, and can be filtered out of the resulting
table by specifying one or more exclude search terms. If both include and
exclude are provided, the inclusion critera will be applied before the
exclusion critera. Either include or exclude terms (or both) must be
provided. Any samples that have a total frequency of zero after filtering
will be removed from the resulting table.

Inputs:
--i-table ARTIFACT FeatureTable[Frequency]
Feature table to be filtered. [required]
--i-taxonomy ARTIFACT FeatureData[Taxonomy]
Taxonomic annotations for features in the provided
feature table. All features in the feature table must
have a corresponding taxonomic annotation. Taxonomic
annotations for features that are not present in the
feature table will be ignored. [required]
Parameters:
--p-include TEXT One or more search terms that indicate which taxa
should be included in the resulting table. If
providing more than one term, terms should be
delimited by the query-delimiter character. By
default, all taxa will be included. [optional]
--p-exclude TEXT One or more search terms that indicate which taxa
should be excluded from the resulting table. If
providing more than one term, terms should be
delimited by the query-delimiter character. By
default, no taxa will be excluded. [optional]
--p-query-delimiter TEXT
The string used to delimit multiple search terms
provided to include or exclude. This parameter should
only need to be modified if the default delimiter (a
comma) is used in the provided taxonomic annotations.
[default: ',']
--p-mode TEXT Choices('exact', 'contains')
Mode for determining if a search term matches a
taxonomic annotation. "contains" requires that the
annotation has the term as a substring; "exact"
requires that the annotation is a perfect match to a
search term. [default: 'contains']
Outputs:
--o-filtered-table ARTIFACT FeatureTable[Frequency]
The taxonomy-filtered feature table. [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).
--examples Show usage examples and exit.
--citations Show citations and exit.
--help Show this message and exit.

                There was a problem with the command:                     

(1/1) Invalid value for '--i-taxonomy': 'DWNew-taxonomy-classifications.qza'
is not a valid filepath
Usage: qiime taxa collapse [OPTIONS]

Collapse groups of features that have the same taxonomic assignment
through the specified level. The frequencies of all features will be
summed when they are collapsed.

Inputs:
--i-table ARTIFACT FeatureTable[Frequency]
Feature table to be collapsed. [required]
--i-taxonomy ARTIFACT FeatureData[Taxonomy]
Taxonomic annotations for features in the provided
feature table. All features in the feature table must
have a corresponding taxonomic annotation. Taxonomic
annotations that are not present in the feature table
will be ignored. [required]
Parameters:
--p-level INTEGER The taxonomic level at which the features should be
collapsed. All ouput features will have exactly this
many levels of taxonomic annotation. [required]
Outputs:
--o-collapsed-table ARTIFACT FeatureTable[Frequency]
The resulting feature table, where all features are
now taxonomic annotations with the user-specified
number of levels. [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).
--examples Show usage examples and exit.
--citations Show citations and exit.
--help Show this message and exit.

              There were some problems with the command:                  

(1/2) Invalid value for '--i-table': 'DWNew-table-no-mitochondria-
chloroplast.qza' is not a valid filepath
(2/2) Invalid value for '--i-taxonomy': 'DWNew-taxonomy-classifications.qza'
is not a valid filepath
Usage: qiime taxa barplot [OPTIONS]

This visualizer produces an interactive barplot visualization of
taxonomies. Interactive features include multi-level sorting, plot
recoloring, sample relabeling, and SVG figure export.

Inputs:
--i-table ARTIFACT FeatureTable[Frequency]
Feature table to visualize at various taxonomic
levels. [required]
--i-taxonomy ARTIFACT FeatureData[Taxonomy]
Taxonomic annotations for features in the provided
feature table. All features in the feature table must
have a corresponding taxonomic annotation. Taxonomic
annotations that are not present in the feature table
will be ignored. [required]
Parameters:
--m-metadata-file METADATA...
(multiple The sample metadata.
arguments will be
merged) [optional]
Outputs:
--o-visualization VISUALIZATION
[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).
--examples Show usage examples and exit.
--citations Show citations and exit.
--help Show this message and exit.

              There were some problems with the command:                  

(1/2) Invalid value for '--i-table': 'DWNew-table-no-mitochondria-
chloroplast.qza' is not a valid filepath
(2/2) Invalid value for '--i-taxonomy': 'DWNew-taxonomy-classifications.qza'
is not a valid filepath
Usage: qiime diversity alpha [OPTIONS]

Computes a user-specified alpha diversity metric for all samples in a
feature table.

Inputs:
--i-table ARTIFACT FeatureTable[Frequency | RelativeFrequency |
PresenceAbsence] The feature table containing the samples for which
alpha diversity should be computed. [required]
Parameters:
--p-metric TEXT Choices('ace', 'doubles', 'singles', 'dominance',
'heip_e', 'margalef', 'enspie', 'shannon', 'brillouin_d',
'observed_features', 'strong', 'michaelis_menten_fit', 'robbins',
'fisher_alpha', 'chao1_ci', 'menhinick', 'simpson_e', 'mcintosh_d',
'goods_coverage', 'chao1', 'osd', 'gini_index', 'simpson', 'lladser_pe',
'pielou_e', 'mcintosh_e', 'esty_ci', 'kempton_taylor_q',
'berger_parker_d') The alpha diversity metric to be computed. Information
about specific metrics is available at
Alpha diversity measures (skbio.diversity.alpha) — scikit-bio 0.5.7 documentation [required]
Outputs:
--o-alpha-diversity ARTIFACT SampleData[AlphaDiversity]
Vector containing per-sample alpha diversities.
[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).
--examples Show usage examples and exit.
--citations Show citations and exit.
--help Show this message and exit.

                There was a problem with the command:                     

(1/1) Invalid value for '--i-table': 'DWNew-table-no-mitochondria-
chloroplast.qza' is not a valid filepath
Usage: qiime diversity alpha-group-significance [OPTIONS]

Visually and statistically compare groups of alpha diversity values.

Inputs:
--i-alpha-diversity ARTIFACT SampleData[AlphaDiversity]
Vector of alpha diversity values by sample. [required]
Parameters:
--m-metadata-file METADATA...
(multiple The sample metadata.
arguments will
be merged) [required]
Outputs:
--o-visualization VISUALIZATION
[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).
--examples Show usage examples and exit.
--citations Show citations and exit.
--help Show this message and exit.

              There were some problems with the command:                  

(1/2) Invalid value for '--i-alpha-diversity': 'DWNew-alpha-
diversity/alpha_diversity.qza' is not a valid filepath
(2/2) Invalid value for '--o-visualization': Directory 'DWNew-alpha-
diversity' does not exist, cannot save 'alpha_diversity.qzv' into it.

Thanks for posting that! Here's your error:

Looks like it can't find the input. Double check your input file paths or the working directory.

Yeah got it the error is due to the input file path. Thank you.
I ran the script completely from the beginning and it went well. I received all my outputs. But my only concern is that I received the following error. Can you please elaborate to me on what it is about?

vsearch v2.7.0_linux_x86_64, 93.9GB RAM, 40 cores

Reading file /tmp/tmp6vf5ri7t 100%
3635452 nt in 14355 seqs, min 250, max 487, avg 253
Sorting by abundance 100%
Counting k-mers 100%
Clustering 100%
Sorting clusters 100%
Writing clusters 100%
Clusters: 11126 Size min 1, max 26, avg 1.3
Singletons: 9450, 65.8% of seqs, 84.9% of clusters

I think you are good!

In unix there are errors, warning, and messages, based on the savairty of the issue. This is a message, which means it's helpful information and not an issue!

Did you see an error message for this command?

I received the following lines in the error file. Other than this there is nothing

vsearch v2.7.0_linux_x86_64, 93.9GB RAM, 40 cores
Reading file /tmp/tmp6vf5ri7t 100%
3635452 nt in 14355 seqs, min 250, max 487, avg 253
Sorting by abundance 100%
Counting k-mers 100%
Clustering 100%
Sorting clusters 100%
Writing clusters 100%
Clusters: 11126 Size min 1, max 26, avg 1.3
Singletons: 9450, 65.8% of seqs, 84.9% of clusters

OK good! That's a helpful message and there's no error.

You are good to go!

Thank you for helping me out. Have a good day :grinning: