marvel.demo.10x <- readRDS(system.file("extdata/data",
"marvel.demo.10x.rds",
package="MARVEL")
)
# Define cell groups
# Retrieve sample metadata
sample.metadata <- marvel.demo.10x$sample.metadata
# iPSC
index <- which(sample.metadata$cell.type=="iPSC")
cell.ids.1 <- sample.metadata[index, "cell.id"]
length(cell.ids.1)
# Cardio day 10
index <- which(sample.metadata$cell.type=="Cardio day 10")
cell.ids.2 <- sample.metadata[index, "cell.id"]
length(cell.ids.2)
# Save into list
cell.group.list <- list("iPSC"=cell.ids.1,
"Cardio d10"=cell.ids.2
)
# Gene expression profiling
marvel.demo.10x <- adhocGene.TabulateExpression.Gene.10x(
MarvelObject=marvel.demo.10x,
cell.group.list=cell.group.list,
gene_short_name="TPM2",
min.pct.cells=10,
downsample=TRUE
)
# Check output
marvel.demo.10x$adhocGene$Expression$Gene$Plot
marvel.demo.10x$adhocGene$Expression$Gene$Table
Run the code above in your browser using DataLab