Qiime2 issue: Going from deblur to closed ref

I'm trying to run a deblur command and then use the delburred sequences to run a closed reference command. The command I run is:

qiime vsearch cluster-features-closed-reference \

--i-table table-deblur.qza
--i-sequences rep-seqs-deblur.qza
--i-reference-sequences ggq2.qza
--p-perc-identity 0.99
--o-clustered-table table-cr-99.qza
--o-unmatched-sequences unmatched.qza
--o-clustered-sequences sequences-cr-99.qza

When I try this I get this error:

Plugin error from vsearch:
Argument to parameter 'reference_sequences' is not a subtype of FeatureData[Sequence].

I originally thought that my sequences were incorrect but when I put them in the qiime2 visualization stage I get this description of my data:

type: "FeatureData[Sequences]"
format: "DNASequencesDirectoryFormat"

If you have any idea of what is wrong and how I can fix it please let me know. Thank you!

Hi @Stephanieorch,

Do you know how ggq2.qza was made? Would it be possible to send the output from $ qiime tools peek ggq2.qza?

Best,
Daniel

1 Like

UUID: 24a275e3-c5cf-4148-bdb0-1e8883bdfcb6
Type: TaxonomicClassifier
Data format: TaxonomicClassiferTemporaryPickleDirFmt

Thanks!

Hi @Stephanieorch,
Looks like ggq2.qza is a TaxonomicClassifier, not a FeatureData[Sequences] artifact. This is not the file that you want to use. Instead, use the reference sequences that you used to train ggq2.qza.

Thanks!

1 Like

Hi Nicholas,

I got the taxonomic classifier online from greengenes. Is there a way to go backwards? As in from a TaxanomicClassifier to FeatureData[sequences]? Thank you for all of your help!

Ah, thanks for clarifying — I thought perhaps you trained this file yourself, but it sounds like maybe you downloaded one of the classifiers from here?

No, there is no way to go backwards, but you just need to download a different file. You can download the full Greengenes 13_8 release (linked to on this page) and find an appropriate reference sequence fasta file (in the rep_set directory of the zipped directory that you will download)

I hope that helps!

Thank you Nick. I just downloaded those sequences however the error given to me is for my first command (--i-table).

When I run:

vsearch cluster-features-closed-reference \

--i-table table-deblur.qza
--i-sequences rep-seqs-deblur.qza
--reference-sequences gg-13-8-99-nb-classifier.qza
--p-perc-identity 0.99
--o-clustered-table table-cr-99.qza
--o-unmatched-sequences unmatched.qza
--o-clustered-sequences sequences-cr-99.qza

My error says:

vsearch: unrecognized option `--i-table'

Hi @Stephanieorch,

It looks like the parameter flag has a single em-dash (—i-table) instead of two hyphens (--i-table) preceding the parameter name. Same with all other parameters. This often happens (the text is usually auto-corrected) if writing the commands in microsoft word or some other text programs. Typing in the correct parameter names into your terminal should fix this.

It looks like you are still using a trained classifier, not the representative sequences fasta file. You should download this archive, unzip, and look for the rep_set directory, which will contain a number of sequence files clustered at different similarity %s.

I hope that helps!

When copying from terminal to the qiime2 forum, my 2 hyphens changed to a single em-dash. So I am getting the error when using 2 hyphens.
Regarding the representative sequences fasta file does this file name look correct: 99_otus.fasta?

Thank you again!

@Stephanieorch, can you please copy and paste the exact command you ran, inside a block that looks like this:


```
YOUR COMMAND HERE
```

That is, put three backticks on the line above your command, and three backticks on the line below your command.

That will ensure that it maintains the exact formatting when pasting into the forum. Thanks! :t_rex:

Yes, that should work! Import with this command:

qiime tools import \
  --input-path 99_otus.fasta \
  --output-path 99_otus.qza \
  --type 'FeatureData[Sequence]'

Thank you for the command to convert the fasta to qza! I fixed that part of my command but I’m still having issues with my i-table:

vsearch cluster-features-closed-reference
--i-table table-deblur.qza 
--i-sequences rep-seqs-deblur.qza 
--i-reference-sequences 99_otus.qza 
--p-perc-identity 0.99 
--o-clustered-table table-cr-99.qza
--o-unmatched-sequences unmatched.qza 
--o-clustered-sequences sequences-cr-99.qza

vsearch: unrecognized option `--i-table'

Hi @Stephanieorch! Thanks for the command, that was really helpful! Since you are trying to write your command across many lines, you need to end all but the last line with a \ — this tells your shell “hey bud, wait just a minute, I still have more stuff to put into this command.”

qiime vsearch cluster-features-closed-reference \
--i-table table-deblur.qza \
--i-sequences rep-seqs-deblur.qza \
--i-reference-sequences 99_otus.qza \
--p-perc-identity 0.99 \
--o-clustered-table table-cr-99.qza \
--o-unmatched-sequences unmatched.qza \ 
--o-clustered-sequences sequences-cr-99.qza

Alternatively, you could just write the entire command on one line, then you wouldn’t need to “escape your line breaks” (that is the technical term for why you would need to add the trailing slashes). So, pick one option, and give it a shot! Personally I like the multi-line approach, it helps me re-read my commands later so that I know what I did. Good luck! :t_rex:

vsearch cluster-features-closed-reference --i-table table-deblur.qza --i-sequences rep-seqs-deblur.qza --i-reference-sequences 99_otus.qza --p-perc-identity 0.99 --o-clustered-table table-cr-99.qza --o-unmatched-sequences unmatched.qza --o-clustered-sequences sequences-cr-99.qza

vsearch: unrecognized option `--i-table'

I was so focused on your line endings that I missed the fact that you weren’t running a qiime command, you were actually running a vsearch command. Besides the line endings, you also need to prepend qiime to your command, in your to actually run the q2-vsearch plugin. I updated my code block above to reflect that change.

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