qiime phylogeny align-to-tree-mafft-fasttree: error got unexpected extra argument

I am attempting to build a tree using align-to-tree-mafft-fasttree, but keep getting the same error. Being a novice I created my code using a script editor:

#!/bin/bash

----------------SLURM Parameters----------------

#SBATCH -p normal
#SBATCH -n 1
#SBATCH --mem=15g
#SBATCH -N 1

----------------Load Modules--------------------

module purge
module load QIIME2/2018.11

----------------Commands------------------------

qiime phylogeny align-to-tree-mafft-fasttree
–i-sequences practice-V4_dada2_rep-seq.qza \
–o-alignment practice-V4_rep-seqs_mafft.qza \
–o-masked-alignment practice-V4_rep-seqs_masked-mafft.qza \
–o-tree practice-V4_rep-seqs_fasttree.qza \
–o-rooted-tree practice-V4_rep-seqs_rootedtree.qza

The error I keep receiving is the following:

Usage: qiime phylogeny align-to-tree-mafft-fasttree [OPTIONS]
Try “qiime phylogeny align-to-tree-mafft-fasttree --help” for help.

Error: Got unexpected extra argument ( )
/tmp/slurmd/job1847581/slurm_script: line 13: --o-alignment: command not found
/tmp/slurmd/job1847581/slurm_script: line 14: --o-masked-alignment: command not found
/tmp/slurmd/job1847581/slurm_script: line 15: --o-tree: command not found
/tmp/slurmd/job1847581/slurm_script: line 16: --o-rooted-tree: command not found

As far as I can tell the commands fit with what is listed on the help page. Any help would be most appreciated!

1 Like

Hi there @gondry2! You appear to be missing a trailing slash (\) at the end of the first line of your command:

Should be : qiime phylogeny align-to-tree-mafft-fasttree \

Please note, this isn't a QIIME 2 requirement, but rather, a requirement of your shell (it signals to the shell to keep looking at the next line for more instructions for the current statement).

Thanks! :qiime2:

1 Like

I don’t know how I missed that. Thank you for getting back to me so quickly!

2 Likes

Hello again @thermokarst. I double checked my nano file and it does indeed have the trailing slash:

#!/bin/bash

----------------SLURM Parameters----------------

#SBATCH -p normal
#SBATCH -n 1
#SBATCH --mem=15g
#SBATCH -N 1

----------------Load Modules--------------------

module purge
module load QIIME2/2018.11

----------------Commands------------------------

qiime phylogeny align-to-tree-mafft-fasttree
–i-sequences practice-V4_dada2_rep-seq.qza
–o-alignment tree/ practice-V4_rep-seqs_mafft.qza
–o-masked-alignment tree/practice-V4_rep-seqs_masked-mafft.qza
–o-tree tree/practice-V4_rep-seqs_fasttree.qza
–o-rooted-tree tree/practice-V4_rep-seqs_rootedtree.qza

I reran and received the same error message.

@thermokarst Sorry for the multiple messages. I tried manually retyping all the commands and it appears to be running. Perhaps some kind of error when copying and pasting which is visually showing \ when not actually present. Thanks again!

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