Feature-classifier classify-sklearn

Hi I ran the following commands, and I couldn’t get to run the last 2 commands without # next to it

I ran :module add chpc/python/anaconda/3
source activate qiime2-2018.6
#qiime tools import
–type FeatureData[Sequence]
–input-path sh_refs_qiime_ver7_dynamic_01.12.2017.fasta
–output-path unite-ver7-01.12.2017.qza

#qiime tools import
–type FeatureData[Taxonomy]
–input-path sh_taxonomy_qiime_ver7_dynamic_01.12.2017.txt
–output-path unite-ver7-tax_01.12.2017.qza
–source-format HeaderlessTSVTaxonomyFormat

#qiime feature-classifier extract-reads
–i-sequences unite-ver7-01.12.2017.qza
–p-f-primer TCCGTAGGTGAACCTGCGG
–p-r-primer TCCTCCGCTTATTGATATGC
–p-trunc-len 100
–o-reads ref-seqs.qza

qiime feature-classifier classify-sklearn /
–i-classifier ref-seqs.qza
–i-reads unite-ver7-tax_01.12.2017.qza
–o-classification unite-ver7-dynamic-classifier-01.12.2017.qza

qiime tools import
–type ‘SampleData[SequencesWithQuality]’
–input-path casava-18-paired-end-demultiplexed \
–source-format CasavaOneEightSingleLanePerSampleDirFmt
–output-dir demux-single-end.qza

This is the error I got
var/spool/PBS/mom_priv/jobs/1456395.sched01.SC: line 17: --type: command not found
/var/spool/PBS/mom_priv/jobs/1456395.sched01.SC: line 22: --type: command not found
/var/spool/PBS/mom_priv/jobs/1456395.sched01.SC: line 28: --i-sequences: command not found
Usage: qiime feature-classifier classify-sklearn [OPTIONS]

Error: Got unexpected extra argument (/)
/var/spool/PBS/mom_priv/jobs/1456395.sched01.SC: line 35: --i-classifier: command not found
/var/spool/PBS/mom_priv/jobs/1456395.sched01.SC: line 36: --i-reads: command not found
/var/spool/PBS/mom_priv/jobs/1456395.sched01.SC: line 37: --o-classification: command not found
Usage: qiime tools import [OPTIONS]

Error: Missing option “–output-path”.
/var/spool/PBS/mom_priv/jobs/1456395.sched01.SC: line 42: --source-format: command not found

Hey @kedi!

The issue is the newline escaping, whenever you wrap a single command over multiple lines you have to end the intermediate lines with \. Only the very last line should not have \ at the end.

In a bunch of commands it looks like this is missing, there’s also one where you use / instead of \, which won’t work either.

Whenever you see --some-kind-of-option: command not found that is almost certainly what is going on.

Hope the gets you on your way!

1 Like

Hi @ebolyen, thanks very much !

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