# running qiime2 on metagenome-derived illumina mitags

**URL:** https://forum.qiime2.org/t/running-qiime2-on-metagenome-derived-illumina-mitags/18060
**Category:** User Support
**Tags:** dada2
**Created:** [January 14, 2021, 2:49am UTC](https://forum.qiime2.org/t/running-qiime2-on-metagenome-derived-illumina-mitags/18060 "2021-01-14T02:49:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bkolody](https://forum.qiime2.org/user_avatar/forum.qiime2.org/bkolody/32/10101_2.png) [@bkolody](https://forum.qiime2.org/u/bkolody)
#### Post date: [January 14, 2021, 2:49am UTC](https://forum.qiime2.org/t/running-qiime2-on-metagenome-derived-illumina-mitags/18060/1 "2021-01-14T02:49:43Z")

</div>

Hi all!

I'm trying to process 16S sequences derived from Tara oceans metagenomic assemblies (miTAGs) with qiime2 in order to best compare them with my own 16S marine amplicon data.

I was able to import the data as a 'FeatureData[Sequence]' because I'm dealing with .fna files, not .fastqs.

Now, I'm trying to run dada2 in order to create ASVs, but I'm coming across the problem that dada2 will only run on fastq files.

Is there any way around this, or is it impossible to make ASVs without quality score info? How does qiime2 typically handle metagenome-derived 16S sequences?

I'm running qiime2-2019.4 with conda.

Here is my command:

> cat import\_fnas.py  
> #!/usr/bin/env python  
> import os  
> os.system('source activate qiime2-2019.4 && qiime tools import   
> --input-path tara\_mitags\_formatted\_for\_q2.fna   
> --output-path tara\_mitags.qza   
> --type 'FeatureData[Sequence]'')

Here is the error message:  
There were some problems with the command:  
(1/3) Invalid value for "--i-demultiplexed-seqs": Expected an artifact of at  
least type SampleData[PairedEndSequencesWithQuality]. An artifact of type  
FeatureData[Sequence] was provided.  
(2/3) Missing option "--p-trunc-len-f".  
(3/3) Missing option "--p-trunc-len-r".

Thanks!

---

<div class="post-metadata">

### Author: ![bkolody](https://forum.qiime2.org/user_avatar/forum.qiime2.org/bkolody/32/10101_2.png) [@bkolody](https://forum.qiime2.org/u/bkolody)
#### Post date: [January 14, 2021, 6:39am UTC](https://forum.qiime2.org/t/running-qiime2-on-metagenome-derived-illumina-mitags/18060/2 "2021-01-14T06:39:13Z")

</div>

Sorry, just realized I included the importing script but not the dada2 command. It was:

> cat call\_mitag\_asvs.py

```auto
#!/usr/bin/env python
import os
os.system('source activate qiime2-2019.4 && \
qiime dada2 denoise-paired \
--i-demultiplexed-seqs tara_mitags.qza \
--p-n-threads 28 \
--p-n-reads-learn 1000000 \
--p-chimera-method pooled \
--o-table tara_mitags_16S_table-dada2.qza \
--o-representative-sequences tara_mitags_16S_rep-seqs-dada2.qza \
--o-denoising-stats tara_mitags_16S_stats-dada2.qza')

```

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [January 14, 2021, 2:29pm UTC](https://forum.qiime2.org/t/running-qiime2-on-metagenome-derived-illumina-mitags/18060/3 "2021-01-14T14:29:45Z")

</div>

Thanks @bkolody!

A few notes for you:

> [@bkolody](#):
>
> Invalid value for “–i-demultiplexed-seqs”: Expected an artifact of at  
> least type SampleData[PairedEndSequencesWithQuality]. An artifact of type  
> FeatureData[Sequence] was provided.

The first error here is letting you know that you a providing the wrong _kind_ of data to this command. DADA2 needs sequences with quality scores, but you appear to be providing reads sans quality. Taking a step back, I'm not sure if running DADA2 on metagenome data is recommended, and if it is, what kinds of steps you might need to take. I suggest you take a close look at [DADA2: Fast and accurate sample inference from amplicon data with single-nucleotide resolution](https://benjjneb.github.io/dada2/) for more information.

> [@bkolody](#):
>
> (2/3) Missing option “–p-trunc-len-f”.  
> (3/3) Missing option “–p-trunc-len-r”.

These errors are letting you know that you have omitted _required_ parameters for this command, and you script appears to confirm that. Please check out [denoise-paired: Denoise and dereplicate paired-end sequences — QIIME 2 2020.11.1 documentation](https://docs.qiime2.org/2020.11/plugins/available/dada2/denoise-paired/) for more information.

Finally, I noticed you're invoking q2cli via inline shell commands inside of a python script. While you can certainly do this, you can also "cut out the middleman" so to speak, and run QIIME 2 directly in python. Please see [Artifact API — QIIME 2 2020.11.1 documentation](https://docs.qiime2.org/2020.11/interfaces/artifact-api/) for more details.

:qiime2:

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [February 14, 2021, 8:29pm UTC](https://forum.qiime2.org/t/running-qiime2-on-metagenome-derived-illumina-mitags/18060/4 "2021-02-14T20:29:48Z")

</div>

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