Step 2: Import files into QIIME2 - shenjean/diversity GitHub Wiki

Show importable formats and types

Many file formats and types (e.g. paired/single-end fastq files, fasta files, biom files) can be imported into QIIME2 for analyses. Visit QIIME2's importing tutorial for details.

qiime tools import --show-importable-formats

AlignedDNAFASTAFormat
AlignedDNASequencesDirectoryFormat
AlignedProteinFASTAFormat
AlignedProteinSequencesDirectoryFormat
AlignedRNAFASTAFormat
AlignedRNASequencesDirectoryFormat
AlphaDiversityDirectoryFormat
AlphaDiversityFormat
BIOMV100DirFmt
BIOMV100Format
BIOMV210DirFmt
BIOMV210Format
BooleanSeriesDirectoryFormat
BooleanSeriesFormat
Bowtie2IndexDirFmt
CasavaOneEightLanelessPerSampleDirFmt
CasavaOneEightSingleLanePerSampleDirFmt
DADA2StatsDirFmt
DADA2StatsFormat
DNAFASTAFormat
DNASequencesDirectoryFormat
DeblurStatsDirFmt
DeblurStatsFmt
DifferentialDirectoryFormat
DifferentialFormat
DistanceMatrixDirectoryFormat
EMPPairedEndCasavaDirFmt
EMPPairedEndDirFmt
EMPSingleEndCasavaDirFmt
EMPSingleEndDirFmt
ErrorCorrectionDetailsDirFmt
FastqGzFormat
FirstDifferencesDirectoryFormat
FirstDifferencesFormat
HeaderlessTSVTaxonomyDirectoryFormat
HeaderlessTSVTaxonomyFormat
ImportanceDirectoryFormat
ImportanceFormat
LSMatFormat
MultiplexedPairedEndBarcodeInSequenceDirFmt
MultiplexedSingleEndBarcodeInSequenceDirFmt
NewickDirectoryFormat
NewickFormat
OrdinationDirectoryFormat
OrdinationFormat
PairedDNASequencesDirectoryFormat
PairedEndFastqManifestPhred33
PairedEndFastqManifestPhred33V2
PairedEndFastqManifestPhred64
PairedEndFastqManifestPhred64V2
PairedRNASequencesDirectoryFormat
PlacementsDirFmt
PlacementsFormat
PredictionsDirectoryFormat
PredictionsFormat
ProbabilitiesDirectoryFormat
ProbabilitiesFormat
ProcrustesStatisticsDirFmt
ProcrustesStatisticsFmt
ProteinFASTAFormat
ProteinSequencesDirectoryFormat
QIIME1DemuxDirFmt
QIIME1DemuxFormat
QualityFilterStatsDirFmt
QualityFilterStatsFmt
RNAFASTAFormat
RNASequencesDirectoryFormat
SILVATaxidMapDirectoryFormat
SILVATaxidMapFormat
SILVATaxonomyDirectoryFormat
SILVATaxonomyFormat
SampleEstimatorDirFmt
SeppReferenceDirFmt
SingleEndFastqManifestPhred33
SingleEndFastqManifestPhred33V2
SingleEndFastqManifestPhred64
SingleEndFastqManifestPhred64V2
SingleLanePerSamplePairedEndFastqDirFmt
SingleLanePerSampleSingleEndFastqDirFmt
TSVTaxonomyDirectoryFormat
TSVTaxonomyFormat
TaxonomicClassiferTemporaryPickleDirFmt
UchimeStatsDirFmt
UchimeStatsFmt

qiime tools import --show-importable-types

Bowtie2Index
DeblurStats
DistanceMatrix
EMPPairedEndSequences
EMPSingleEndSequences
ErrorCorrectionDetails
FeatureData[AlignedProteinSequence]
FeatureData[AlignedRNASequence]
FeatureData[AlignedSequence]
FeatureData[Differential]
FeatureData[Importance]
FeatureData[PairedEndRNASequence]
FeatureData[PairedEndSequence]
FeatureData[ProteinSequence]
FeatureData[RNASequence]
FeatureData[SILVATaxidMap]
FeatureData[SILVATaxonomy]
FeatureData[Sequence]
FeatureData[Taxonomy]
FeatureTable[Balance]
FeatureTable[Composition]
FeatureTable[Design]
FeatureTable[Frequency]
FeatureTable[PercentileNormalized]
FeatureTable[PresenceAbsence]
FeatureTable[RelativeFrequency]
Hierarchy
MultiplexedPairedEndBarcodeInSequence
MultiplexedSingleEndBarcodeInSequence
PCoAResults
Phylogeny[Rooted]
Phylogeny[Unrooted]
Placements
ProcrustesStatistics
QualityFilterStats
RawSequences
SampleData[AlphaDiversity]
SampleData[BooleanSeries]
SampleData[ClassifierPredictions]
SampleData[DADA2Stats]
SampleData[FirstDifferences]
SampleData[JoinedSequencesWithQuality]
SampleData[PairedEndSequencesWithQuality]
SampleData[Probabilities]
SampleData[RegressorPredictions]
SampleData[SequencesWithQuality]
SampleData[Sequences]
SampleEstimator[Classifier]
SampleEstimator[Regressor]
SeppReferenceDatabase
TaxonomicClassifier
UchimeStats

Import fastq files

A note on Phred offset used for positional quality scores: Newer Illumina software uses Phred33 and older Illumina software uses Phred64 -more info here. Don't worry if you are not sure about this. If set incorrectly, the command will throw an error and you can change the parameter accordingly.

qiime tools import --type 'SampleData[PairedEndSequencesWithQuality]' --input-format PairedEndFastqManifestPhred33V2 --input-path manifest --output-path pe.qza 

Import OTU count table

If using ANCOM, OTU count table must be imported as FeatureTable[Frequency]

# First, convert OTU count table to boom format
biom convert -i joined_pathabundance_OTU.tsv -o joined_pathabundance_OTU.biom --to-hdf5
# Import to qiime2
qiime tools import --type 'FeatureTable[Frequency]' --input-format BIOMV210Format --input-path joined_pathabundance_OTU.biom --output-path pathabundance.qza

Import taxonomy table

Taxonomy table should be formatted like below. ['Feature ID', 'Taxon'] must be the first two header values.

Feature ID      Taxon
ASV1       unclassified;unclassified;unclassified;unclassified;unclassified;unclassified;unclassified
ASV2       unclassified;unclassified;unclassified;unclassified;unclassified;unclassified;unclassified
qiime tools import --type 'FeatureData[Taxonomy]' --input-format TSVTaxonomyFormat --input-path joined_pathabundance_q2TAX.txt --output-path pathabundance.tax.qza