# How to import fasta files which have undergone vsearch based QC

**URL:** https://forum.qiime2.org/t/how-to-import-fasta-files-which-have-undergone-vsearch-based-qc/30387
**Category:** User Support
**Tags:** taxonomy, vsearch, import
**Created:** [June 4, 2024, 10:40am UTC](https://forum.qiime2.org/t/how-to-import-fasta-files-which-have-undergone-vsearch-based-qc/30387 "2024-06-04T10:40:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![KpatelBio](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kpatelbio/32/18513_2.png) [@KpatelBio](https://forum.qiime2.org/u/KpatelBio)
#### Post date: [June 4, 2024, 10:40am UTC](https://forum.qiime2.org/t/how-to-import-fasta-files-which-have-undergone-vsearch-based-qc/30387/1 "2024-06-04T10:40:10Z")

</div>

Dear Qiime,

My initial fastq.gz samples underwent host contamination removal and merging within qiime2.  
I found chimeric removal within the qiime2 framework took too long so I exported by samples out to perform vsearch based chimeric removal.

Now I wish to bring my fasta files back into qiime2 to begin taxanomic analysis however, I am struggling with the syntax of the import function.

My samples (only running 3 atm for a pilot) are all in the sample directory

```auto
(qiime2-amplicon-2024.2) root@b1c1dff011df:/Home/Data_vsearch/test# pwd
/Home/Data_vsearch/test
(qiime2-amplicon-2024.2) root@b1c1dff011df:/Home/Data_vsearch/test# ls
A11d1JCon4A_0_L001_R1_001_nonchimera.fasta B11d2JCon1B_2_L001_R1_001_nonchimera.fasta
B11d1CCon1B_1_L001_R1_001_nonchimera.fasta

```

I believe these fasta files accommodate to qiime2's DNAfasta requirements as there are 2 items per line and the sequence is in a single line ([import demultiplexed fasta files into Qiime2 - #4 by colinvwood](https://forum.qiime2.org/t/import-demultiplexed-fasta-files-into-qiime2/25849/4)).

```auto
(qiime2-amplicon-2024.2) root@b1c1dff011df:/Home/Data_vsearch/test# head A11d1JCon4A_0_L001_R1_001_nonchimera.fasta
>A00707:180:HCLMHDSX7:2:1101:10303:26663;size=1
AATTAGAGTTAACAATAATCGGCAGCACCTCTGGTGTCAGGCCAACAGCCGCAGCTAAAGCAAAAATTAAGCTTTCTCCCCAATCGCCTTTAGTCAAGCCATTAATGACAAACAGTAGTGGGATGATAATTGC
>A00707:180:HCLMHDSX7:2:1101:10700:17018;size=1
ACTTATGGACGTCGGATCCTTCAAAGCAAGGT
>A00707:180:HCLMHDSX7:2:1101:10737:31422;size=1
ACTATTTATTACGCaaaaaagtgcaaatttttttcagaaatttaaaaatttagacacgaaaaaaGCCGATGCAAATGCATCGAC
>A00707:180:HCLMHDSX7:2:1101:10782:29684;size=1
ACATGAAAGAGATTACAAAAACAGTTATGATTGCTACTCATGATATGCAGCTGGTCTGCCAGTGGGCGGACAGGATCCTTGTCTTGTGCCAGGGAAAGATT
>A00707:180:HCLMHDSX7:2:1101:1081:16266;size=1
GAATATAGGGAGAGATTATCCTTTCCGCTTAAAAATGGGTAAATTGCAGGATTTTCGATCAAGGCCCCAACATTTTGTAGAGCCTTGTGATTATTGGCAGTAATGGGCTGATTGTTAAAAG

```

However, I am continuously getting this error from the command below.

```auto
qiime tools import \
  --input-path /Home/Data_vsearch/test \
  --output-path /Home/Data_vsearch/sequences.qza \
  --type 'FeatureData[Sequence]' \
  --input-format DNASequencesDirectoryFormat

```

```auto
There was a problem importing /Home/Data_vsearch/test/:

  Missing one or more files for DNASequencesDirectoryFormat: 'dna-sequences.fasta'

```

Based on other posts ([Import data problem](https://forum.qiime2.org/t/import-data-problem/18451)), the solution to these types of issues is sometimes in the syntax, which I am hoping it is. However, even looking through the [tutorial](https://docs.qiime2.org/2018.2/tutorials/importing/) I cannot find the solution - can anyone help please.

Note. I corrected the lower cases in the sequences above with AWK and can import the fasta files individually.

```auto
(qiime2-amplicon-2024.2) root@b1c1dff011df:/Home/Data_vsearch/test# qiime tools import --input-path A11d1JCon4A_0_L001_R1_001_nonchimera.fasta --output-path sequences1.qza --type 'FeatureData[Sequence]'
qiime tools import --input-path B11d1CCon1B_1_L001_R1_001_nonchimera.fasta --output-path sequences2.qza --type 'FeatureData[Sequence]'
qiime tools import --input-path B11d2JCon1B_2_L001_R1_001_nonchimera.fasta --output-path sequences3.qza --type 'FeatureData[Sequence]'
Imported A11d1JCon4A_0_L001_R1_001_nonchimera.fasta as DNASequencesDirectoryFormat to sequences1.qza
Imported B11d1CCon1B_1_L001_R1_001_nonchimera.fasta as DNASequencesDirectoryFormat to sequences2.qza
Imported B11d2JCon1B_2_L001_R1_001_nonchimera.fasta as DNASequencesDirectoryFormat to sequences3.qza

```

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [June 4, 2024, 12:58pm UTC](https://forum.qiime2.org/t/how-to-import-fasta-files-which-have-undergone-vsearch-based-qc/30387/2 "2024-06-04T12:58:16Z")

</div>

Hi Krutik,

So, exporting data from Qiime artifacts, processing it, and then importing it back into Qiime2 is possible.

However, this 'round-trip' is extremely error-prone and breaks provenance.

> [@KpatelBio](#):
>
> I found chimeric removal within the qiime2 framework took too long

Let's see if we can get this working.

Qiime2 also supports vsearch chimera checking, so let's do this same step on-platform. I'm guessing [dereplicate](https://docs.qiime2.org/2024.5/plugins/available/vsearch/dereplicate-sequences/) followed by [uchime-denovo](https://docs.qiime2.org/2024.5/plugins/available/vsearch/uchime-denovo/)? All the q2-vsearch pipelines are listed here:  
[https://docs.qiime2.org/2024.5/plugins/available/vsearch/#methods](https://docs.qiime2.org/2024.5/plugins/available/vsearch/#methods)

Let us know what you would like to try next!

---

<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: [July 5, 2024, 6:58pm UTC](https://forum.qiime2.org/t/how-to-import-fasta-files-which-have-undergone-vsearch-based-qc/30387/3 "2024-07-05T18:58:56Z")

</div>

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