Hi Mark,

Thanks so much. This is very helpful.

I also have a little bit problem to connect external gene lists to the
DGEList and plot them, for example, to plotSmear a group of genes with gene
name or IDs that are corresponded to rownames of counts of DGEList object or
rownames of lrt$table. Say, I have two gene lists one has 250 genes which
are affected by compound A and another 370 genes by compound B. These genes
may or may not differentially expressed in current RNA-seq data, but it will
be good to know how they distribute in the current dataset by smear plot.

Thanks again for your time and help.

Best,
Steve

On Fri, Oct 21, 2011 at 3:12 PM, Mark Robinson <mark.robinson@imls.uzh.ch>wrote:

> Hi Steve,
>
> The standard plot parameters are passed through.  But, to do want you want,
> you'll have to construct it by hand.  Here is a worked example:
>
> # concocted example
> y <- matrix(rnbinom(10000,mu=5,size=2),ncol=4)
> y[1:10,1:2] <- round(y[1:10,1:2]*4)
> d <- DGEList(counts=y, group=rep(1:2,each=2), lib.size=colSums(y))
> d <- estimateCommonDisp(d)
> de <- exactTest(d)
>
> # construct colors, expansion and plot character manually
> cols <- rep("grey",nrow(d))
> conc <- d$conc$conc.group
> k <- conc[,1]==min(conc[,1]) | conc[,2]==min(conc[,2])
> cols[k] <- "orange"
> cols[de$table$p.value<.05 & de$table$logFC < 0] <- "blue"
> cols[de$table$p.value<.05 & de$table$logFC > 0] <- "red"
> cexs <- rep(.2, nrow(d))
> cexs[k] <- .8
> cexs[1:10] <- 2
>
> plotSmear(de, col=cols, cex=cexs)
>
> Of course, don't take my example as a reasonable way to find DE genes (it's
> not, no mult. test correction), or as a reasonable way to simulate DE (also
> not!).
>
> Hope that helps,
> Mark
>
>
> On 20.10.2011, at 19:08, steve Shen wrote:
>
> > Hi,
> >
> > Is there anyway to plot multiple detags in one figure with plotSmear
> labeled
> > with either different color or shape? Thanks,
> >
> > Steve
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>

	[[alternative HTML version deleted]]

