yiluheihei / microbiomeMarker

R package for microbiome biomarker discovery
https://yiluheihei.github.io/microbiomeMarker
GNU General Public License v3.0
169 stars 40 forks source link

problems importing qiime2 files #99

Open mdtorohernando opened 1 year ago

mdtorohernando commented 1 year ago

Dear @yiluheihei, thanks for the package. I write to you as I have some problems importing my qiime2 files and I don't understand what is happening.

otuqza_file <- system.file("extdata", "./table_filtered.qza", package = "microbiomeMarker")
taxaqza_file <- system.file("extdata", "taxonomy-v34.qza", package = "microbiomeMarker")
sample_file <- system.file("extdata", "metadata_v0.csv", package = "microbiomeMarker")
treeqza_file <- system.file("extdata", "rooted-tree.qza", package = "microbiomeMarker")

ps <- import_qiime2(otu_qza = otuqza_file, taxa_qza = taxaqza_file, sam_tab = sample_file, tree_qza = treeqza_file)
Error in file(file, "rt", encoding = fileEncoding) : 
  argumento 'description' inválido
Además: Warning message:
  In utils::unzip(file, exdir = temp) : error 1 al extraer del archivo zip

Thank you in advance,

María

mdtorohernando commented 1 year ago

Hi! It's me again! I solved the problem importing files in other form (different than explained in the tutorial vignette). I leave here my solution, just in case somebody need.

otuqza_file <- "table_filtered.qza"
taxaqza_file <- "taxonomy-v34.qza"
sample_file <- "metadata_v0.csv"
treeqza_file <- "rooted-tree.qza"
ps <- import_qiime2(otu_qza = otuqza_file, taxa_qza = taxaqza_file, sam_tab = sample_file, tree_qza = treeqza_file)

# > ps
# phyloseq-class experiment-level object
# otu_table()   OTU Table:         [ 7676 taxa and 102 samples ]
# sample_data() Sample Data:       [ 102 samples by 5 sample variables ]
# tax_table()   Taxonomy Table:    [ 7676 taxa by 7 taxonomic ranks ]
# phy_tree()    Phylogenetic Tree: [ 7676 tips and 7578 internal nodes ]