[BioC] Pathview plot split by experiment condition
Luo Weijun
luo_weijun at yahoo.com
Thu May 29 05:21:18 CEST 2014
If I understand you correctly you may try:
cnts.2cond=cbind(rowMeans(cnts.norm[ , samp.idx]),rowMeans(cnts.norm[ , ref.idx]))
then use cnts.2cond instead of cnts.d when calling pathview function:
pv.out.list <- sapply(path.ids2, function(pid) pathview(
gene.data = cnts.2cond, pathway.id = pid,
species = "hsa", out.suffix=out.suffix,
kegg.dir= "gageOutput/gageHG19", kegg.native=T, both.dirs = list(gene = F, cpd = T)))
Note this way, what are plotting the absolute expression not the expression changes, hence you need to set both.dirs = list(gene = F, cpd = T).
HTH,
Weijun
--------------------------------------------
On Fri, 5/23/14, Aric wrote:
Weijun,
I am not sure if
what I want to do is possible, but I think it is. I would
like to plot
in pathview splitting by experiment condition for each gene
instead of
splitting by sample.
For example, I have twelve samples divided equally into
control and
non-control. I would like to have one native kegg plot for
each
significant pathway, with the genes split according to
whether the gene
is up or down overall in the control or non-control group.
It seemed
like I have to use pure gage analysis to do this, but I can
only get it
split by sample.
cnts.d <- cnts.norm[ , samp.idx] - rowMeans(cnts.norm[ ,
ref.idx])
path.ids <- c("hsa04670 Leukocyte transendothelial
migration", "hsa04612 Antigen processing and presentation")
path.ids2 <- substr(path.ids, 1, 8)
pv.out.list <- sapply(path.ids2, function(pid) pathview(
gene.data = cnts.d, pathway.id = pid,
species = "hsa",
out.suffix=out.suffix,
kegg.dir= "gageOutput/gageHG19",
kegg.native=T))
If I replace 'gene.data = cnts.d' with 'cnts.d[, 1:2]' then
I get
splitting in the plot, but only between samples one and two.
I would
like it by experimental condition.
Is this possible?
More information about the Bioconductor
mailing list