# Simulate Poisson expression data for 10 genes and 10 cells
gene.expr=matrix(rpois(100, lambda=2), nrow=10)
# Simulate technical variance proportions
tech.var.prop=runif(10)
# Execute VAM to compute scores for the 10 genes on each cell
vam(gene.expr=gene.expr, tech.var.prop=tech.var.prop)
# Create weights that prioritize the first 5 genes
gene.weights = c(rep(2,5), rep(1,5))
# Execute VAM using the weights
vam(gene.expr=gene.expr, tech.var.prop=tech.var.prop,
gene.weights=gene.weights)
Run the code above in your browser using DataLab