Skip to contents

The read_qiime2 function reads various types of .qza files created by qiime2, and creates a `strollur` object.

Usage

read_qiime2(
  qza,
  metadata = NULL,
  dataset_name = "",
  dir_path = NULL,
  remove_unpacked_artifacts = TRUE
)

Arguments

qza

vector of filenames, .qza files containing your data from qiime2.

metadata

filename, a .tsv file containing metadata

dataset_name

A string containing a name for your dataset.

dir_path

a string containing the name of directory where the artifacts files should be unpacked. Default = current working directory.

remove_unpacked_artifacts

boolean, When TRUE, the unpacked artifacts and temporary directories will be removed. Default = TRUE.

Value

A `strollur` object

References

Bolyen,E., Rideout,J.R., Dillon,M.R. et al. (2019), Reproducible, interactive, scalable and extensible microbiome data science using QIIME 2. Bioinformatics 37:852-857. <doi:10.1038/s41587-019-0209-9>

Examples


# Using the example files from moving-pictures, we add FASTA data, assign
# taxonomy and abundance for features, and add a newick tree and
# metadata.

qza_files <- c(
  strollur_example("rep_seqs.qza"),
  strollur_example("table.qza"),
  strollur_example("taxonomy.qza"),
  strollur_example("rooted-tree.qza")
)

if (requireNamespace("h5lite", quietly = TRUE)) {
  data <- read_qiime2(
    qza = qza_files,
    metadata = strollur_example("sample_metadata.tsv"),
    dataset_name = "qiime2_moving_pictures"
  )
  data
} else {
  message(paste(
    "To use this functionality you have to install the",
    "h5lite package."
  ))
}
#> Added metadata.
#> Added 759 sequences.
#> Assigned 759 sequence abundances.
#> Assigned 759 asv bins.
#> Assigned 759 asv bin taxonomies.
#> qiime2_moving_pictures:
#> 
#>             starts ends nbases ambigs polymers numns   numseqs
#> Minimum:         1  120    120      0        3     0      1.00
#> 2.5%-tile:       1  120    120      0        3     0   3932.45
#> 25%-tile:        1  120    120      0        4     0  39324.50
#> Median:          1  120    120      0        4     0  78649.00
#> 75%-tile:        1  120    120      0        5     0 117973.50
#> 97.5%-tile:      1  120    120      0        6     0 153365.55
#> Maximum:         1  120    120      0        8     0 157298.00
#> Mean:            1  120    120      0        4     0  78649.14
#> 
#> Number of unique seqs: 759 
#> Total number of seqs: 157298 
#> 
#> Total number of samples: 34 
#> Total number of asvs: 759 
#> Total number of asv bin classifications: 759 
#> Your dataset includes metadata 
#>