importQIIME2 | R Documentation |
TreeSummarizedExperiment
Results exported from QIMME2 can be imported as a
TreeSummarizedExperiment
using importQIIME2
. Except for the
assay.file
, the other data types, row.file
,
refseq.file
and tree.file
, are optional, but are highly
encouraged to be provided.
Import the QIIME2 artifacts to R.
importQIIME2(
assay.file = featureTableFile,
featureTableFile,
row.file = taxonomyTableFile,
taxonomyTableFile = NULL,
col.file = sampleMetaFile,
sampleMetaFile = NULL,
as.refseq = featureNamesAsRefSeq,
featureNamesAsRefSeq = TRUE,
refseq.file = refSeqFile,
refSeqFile = NULL,
tree.file = phyTreeFile,
phyTreeFile = NULL,
...
)
importQZA(file, temp.dir = temp, temp = tempdir(), ...)
assay.file |
|
featureTableFile |
Deprecated. use |
row.file |
|
taxonomyTableFile |
Deprecated. use |
col.file |
|
sampleMetaFile |
Deprecated. Use |
as.refseq |
|
featureNamesAsRefSeq |
Deprecated. Use |
refseq.file |
|
refSeqFile |
Deprecated. Use |
tree.file |
|
phyTreeFile |
Deprecated. Use |
... |
additional arguments:
|
file |
character, path of the input qza file. Only files in format of
|
temp.dir |
character, a temporary directory in which the qza file will be
decompressed to, default |
temp |
Deprecated. Use |
Both arguments as.refseq
and refseq.file
can be used
to define reference sequences of features. as.refseq
is
only taken into account, if refseq.file
is NULL
. No reference
sequences are tried to be created, if featureNameAsRefSeq
is
FALSE
and refseq.file
is NULL
.
A
TreeSummarizedExperiment
object
matrix
object for feature table, DataFrame
for taxonomic table,
ape::phylo
object for phylogenetic tree,
Biostrings::DNAStringSet
for representative sequences of taxa.
Yang Cao
Bolyen E et al. 2019: Reproducible, interactive, scalable and extensible microbiome data science using QIIME 2. Nature Biotechnology 37: 852–857. https://doi.org/10.1038/s41587-019-0209-9
convertFromPhyloseq
convertFromBIOM
convertFromDADA2
importMothur
assay.file <- system.file("extdata", "table.qza", package = "mia")
row.file <- system.file("extdata", "taxonomy.qza", package = "mia")
col.file <- system.file("extdata", "sample-metadata.tsv", package = "mia")
tree.file <- system.file("extdata", "tree.qza", package = "mia")
refseq.file <- system.file("extdata", "refseq.qza", package = "mia")
tse <- importQIIME2(
assay.file = assay.file,
row.file = row.file,
col.file = col.file,
refseq.file = refseq.file,
tree.file = tree.file
)
tse
# Read individual files
assay.file <- system.file("extdata", "table.qza", package = "mia")
row.file <- system.file("extdata", "taxonomy.qza", package = "mia")
col.file <- system.file("extdata", "sample-metadata.tsv", package = "mia")
assay <- importQZA(assay.file)
rowdata <- importQZA(row.file, prefix.rm = TRUE)
coldata <- read.table(col.file, header = TRUE, sep = "\t", comment.char = "")
# Assign rownames
rownames(coldata) <- coldata[, 1]
coldata[, 1] <- NULL
# Order coldata based on assay
coldata <- coldata[match(colnames(assay), rownames(coldata)), ]
# Create SE from individual files
se <- SummarizedExperiment(assays = list(assay), rowData = rowdata, colData = coldata)
se
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.