Extracting code to load Europe samples to its own script
This commit is contained in:
parent
8bbfec9e49
commit
c952458363
1 changed files with 14 additions and 0 deletions
14
load-europe.R
Normal file
14
load-europe.R
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
library(MicroBioMap)
|
||||
library(phyloseq)
|
||||
library(mia)
|
||||
|
||||
cpd <- getCompendium()
|
||||
cpd_phyloseq <- convertToPhyloseq(x = cpd)
|
||||
sample_data(cpd_phyloseq)$geo_loc_name |> grepl(pattern = "europe")
|
||||
rm(cpd)
|
||||
gc()
|
||||
sample_data(cpd_phyloseq)
|
||||
cpd_phyloseq_europe <- subset_samples(cpd_phyloseq, grepl("europe", geo_loc_name))
|
||||
rm(cpd_phyloseq)
|
||||
gc()
|
||||
saveRDS(cpd_phyloseq_europe, "data/hmc-phyloseq-europe.Rds")
|
||||
Loading…
Add table
Reference in a new issue