Error feature classifier:extract reference reads

Hi,

I’m trying to extract reference reads from a qiime2 compatible PhytoRef database. [https://github.com/ndu-UCSD/Oceanic_database/tree/master/PhytoRef].
I have worked with this database before (trained the classifier with the provided files : Phyto_16S_plastid_qiime2.qza and Phyto_16S_plastid_taxonomy.qza) and it worked perfectly alright.
I’m trying to use the same files again for another project, and when I try to extract reads it gives the following error:
(1/1) Invalid value for “–i-sequences”: 'qiime2-compatible-phytoref-
** files/Phyto_16S_plastid_qiime2.qza’ is not a QIIME 2 Artifact (.qza)**

I really can’t understand why this is happening. Any help is much appreciated!

Many thanks in advance!

Uth

Hi @uth,

Can you tell us what QIIME 2 version you are running and the OS, as well as copy & paste the exact commands you ran, as well as the full error message you get. Adding the --verbose flag would be very useful as well.

In future posts, these would be a great a minimum info starting point.
Thanks!

Hi,

Thanks a lot for the response. I apologise for the late reply!!!

Below is the command I used

qiime feature-classifier extract-reads --i-sequences qiime2-compatible-phytoref-files/Phyto_16S_plastid_qiime2.qza --p-f-primer GTGCCAGCMGCCGCGGTAA --p-r-primer GGACTACHVGGGTWTCTAAT --o-reads reference-seqs-phytoref.qza --verbose

ERROR:
Usage: qiime feature-classifier extract-reads [OPTIONS]

Extract sequencing-like reads from a reference database.

Inputs:
–i-sequences ARTIFACT FeatureData[Sequence]
[required]
Parameters:
–p-f-primer TEXT forward primer sequence [required]
–p-r-primer TEXT reverse primer sequence [required]
–p-trunc-len INTEGER read is cut to trunc-len if trunc-len is positive.
Applied before trim-left. [default: 0]
–p-trim-left INTEGER trim-left nucleotides are removed from the 5’ end
if trim-left is positive. Applied after trunc-len.
[default: 0]
–p-identity NUMBER minimum combined primer match identity threshold.
[default: 0.8]
–p-min-length INTEGER Minimum amplicon length. Shorter amplicons are
Range(0, None) discarded. Applied after trimming and truncation, so
be aware that trimming may impact sequence
retention. Set to zero to disable min length
filtering. [default: 50]
–p-max-length INTEGER Maximum amplicon length. Longer amplicons are
Range(0, None) discarded. Applied before trimming and truncation,
so plan accordingly. Set to zero (default) to
disable max length filtering. [default: 0]
–p-n-jobs INTEGER Number of seperate processes to run.
Range(1, None) [default: 1]
–p-batch-size VALUE Int % Range(1, None) | Str % Choices(‘auto’)
Number of sequences to process in a batch. The
auto option is calculated from the number of
sequences and number of jobs specified.
[default: ‘auto’]
Outputs:
–o-reads ARTIFACT FeatureData[Sequence]
[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).
–citations Show citations and exit.
–help Show this message and exit.

                There was a problem with the command:                     

(1/1) Invalid value for “–i-sequences”: ‘qiime2-compatible-phytoref-
files/Phyto_16S_plastid_qiime2.qza’ is not a QIIME 2 Artifact (.qza)

I’m running this on a linux server.

Thanks again!
Uth

Hi @uth,
Thanks for the update.

The error is telling you that it can’t find the qiime2-compatible-phytoref-files/Phyto_16S_plastid_qiime2.qza file in the directory you are telling it to. Can you double-check to make sure that this file is indeed there and not instead in the current directory that you are running that command from?

Check with ls qiime2-compatible-phytoref-files/

And is this command exactly as you typed it into terminal?

qiime feature-classifier extract-reads --i-sequences qiime2-compatible-phytoref-files/Phyto_16S_plastid_qiime2.qza --p-f-primer GTGCCAGCMGCCGCGGTAA --p-r-primer GGACTACHVGGGTWTCTAAT --o-reads reference-seqs-phytoref.qza --verbose

And not something you copied from another document that may have added some weird characters? For example sometimes -- in certain text editors can behave as – instead and that can cause problems.

Try copying the below directly to terminal:

qiime feature-classifier extract-reads \
--i-sequences qiime2-compatible-phytoref-files/Phyto_16S_plastid_qiime2.qza \
--p-f-primer GTGCCAGCMGCCGCGGTAA \
--p-r-primer GGACTACHVGGGTWTCTAAT \
--o-reads reference-seqs-phytoref.qza \
--verbose

Let us know how that goes.

Hi @Mehrbod_Estaki,

Thanks a lot for the response.

The qiime2 version I’m running is 2019.10.

“And is this command exactly as you typed it into terminal?”…I usually type the command and tab complete it. I also copy pasted the command you have posted but the error is the same.

"Check with ls qiime2-compatible-phytoref-files/" : I did this and the file is there

(qiime2-2019.10) [email protected]:~/Uth/classifier-files/qiime2-compatible-phytoref-files$ ll -h
total 7.4M
drwxrwxr-x 2 uth uth 4.0K Jan 9 2020 ./
drwxrwxr-x 6 uth uth 4.0K Sep 24 23:07 …/
-rw-rw-r-- 1 uth uth 63K Jan 9 2020 Phyto_16S_plastid_qiime2.qza
-rw-rw-r-- 1 uth uth 63K Jan 9 2020 Phyto_16S_plastid_taxonomy.qza

Thanks in advance
Uthpala

Hi @uth,

I don’t think you typed ls qiime2-compatible-phytoref-files/ as I mentioned but rather you typed ll -h while you were in the qiime2-compatible-phytoref-files directory itself.
Anyways, I believe the issue is as before, you are just not providing the right path to the file.

If you are running your command from the qiime2-compatible-phytoref-filesdirectory in which you pasted the ls output from above, then you don’t need to include the qiime2-compatible-phytoref-files/ part because you are already in that directory.
So, just remove that and you should be ok.

In other words just:

qiime feature-classifier extract-reads \
--i-sequences Phyto_16S_plastid_qiime2.qza \
--p-f-primer GTGCCAGCMGCCGCGGTAA \
--p-r-primer GGACTACHVGGGTWTCTAAT \
--o-reads reference-seqs-phytoref.qza \
--verbose

Should do.

Alternative you can just write the full absolute path from root / and then you’ll always point to the right location regardless of which directory you’re in.