Commit b65391e7 authored by Midoux Cedric's avatar Midoux Cedric

upload demo RDS

parent b16f0541
File added
...@@ -4,55 +4,57 @@ data("GlobalPatterns") ...@@ -4,55 +4,57 @@ data("GlobalPatterns")
food <- food <-
import_biom( import_biom(
BIOMfilename = "chaillou.biom", BIOMfilename = "demo/chaillou.biom",
treefilename = "chaillou.nwk", treefilename = "demo/chaillou.nwk",
parseFunction = parse_taxonomy_greengenes parseFunction = parse_taxonomy_greengenes
) )
sample_data(food) <- sample_data(food) <-
read.table("chaillou.tsv", read.table("demo/chaillou.tsv",
header = TRUE, header = TRUE,
row.names = 1, row.names = 1,
sep = "\t") sep = "\t")
kinetic <- # kinetic <-
import_biom(BIOMfilename = "mach.biom", treefilename = "mach.nwk") # import_biom(BIOMfilename = "mach.biom", treefilename = "mach.nwk")
sample_data(kinetic) <- # sample_data(kinetic) <-
read.table("mach.tsv", # read.table("mach.tsv",
header = TRUE, # header = TRUE,
row.names = 1, # row.names = 1,
sep = "\t") # sep = "\t")
colnames(tax_table(kinetic)) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus") # colnames(tax_table(kinetic)) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus")
tax_table(kinetic)[grep("unknown ", tax_table(kinetic))] <- NA # tax_table(kinetic)[grep("unknown ", tax_table(kinetic))] <- NA
#
ravel <- # ravel <-
import_biom(BIOMfilename = "ravel.biom") # import_biom(BIOMfilename = "ravel.biom")
sample_data(ravel) <- # sample_data(ravel) <-
read.table("ravel.tsv", # read.table("ravel.tsv",
header = TRUE, # header = TRUE,
row.names = 1, # row.names = 1,
sep = "\t") # sep = "\t")
colnames(tax_table(ravel)) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species") # colnames(tax_table(ravel)) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species")
tax_table(ravel)[grep("unknown ", tax_table(ravel))] <- NA # tax_table(ravel)[grep("unknown ", tax_table(ravel))] <- NA
#
soil <- # soil <-
import_biom(BIOMfilename = "morton.biom", treefilename = "morton.tree") # import_biom(BIOMfilename = "morton.biom", treefilename = "morton.tree")
sample_data(soil) <- # sample_data(soil) <-
read.table("morton.csv", # read.table("morton.csv",
header = TRUE, # header = TRUE,
row.names = 1, # row.names = 1,
sep = "\t") # sep = "\t")
colnames(tax_table(soil)) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species") # colnames(tax_table(soil)) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species")
tax_table(soil)[grep("unknown ", tax_table(soil))] <- NA # tax_table(soil)[grep("unknown ", tax_table(soil))] <- NA
#
biorare <- # biorare <-
import_biom(BIOMfilename = "biorare.biom", treefilename = "biorare.nwk") # import_biom(BIOMfilename = "biorare.biom", treefilename = "biorare.nwk")
sample_data(biorare) <- # sample_data(biorare) <-
read.table("biorare.tsv", header = TRUE, row.names = 1) # read.table("biorare.tsv", header = TRUE, row.names = 1)
colnames(tax_table(biorare)) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species") # colnames(tax_table(biorare)) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species")
tax_table(biorare)[grep("unknown ", tax_table(biorare))] <- NA # tax_table(biorare)[grep("unknown ", tax_table(biorare))] <- NA
#
# cellulose <- import_biom(BIOMfilename = "cellulose.biom") # cellulose <- import_biom(BIOMfilename = "cellulose.biom")
# sample_data(cellulose) <- read.table("cellulose.tsv", header = TRUE, row.names = 1) # sample_data(cellulose) <- read.table("cellulose.tsv", header = TRUE, row.names = 1)
# save(GlobalPatterns, food, kinetic, soil, ravel, biorare, file = "demo.RData") # save(GlobalPatterns, food, kinetic, soil, ravel, biorare, file = "demo.RData")
save(food, file = "demo.RData")
saveRDS(food, file = "demo/food.RDS")
saveRDS(GlobalPatterns, file = "demo/GlobalPatterns.RDS")
\ No newline at end of file
...@@ -127,13 +127,7 @@ observeEvent(input$okData, { ...@@ -127,13 +127,7 @@ observeEvent(input$okData, {
"demo" = "demo" =
{ {
message <- as.character(input$demo) message <- as.character(input$demo)
ne <- new.env() readRDS(paste0("demo/", input$demo,".RDS"))
if (!is.null(input$demo))
{
data(GlobalPatterns)
load("demo/demo.RData", envir = ne)
get(input$demo)
}
}, },
"input" = "input" =
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment