[BioC] SmearPlot edgeR - adding gene names to genes of interest

Aliaksei Holik salvador at bio.bsu.by
Mon Dec 16 14:12:18 CET 2013


Hi Christine,

I'm glad it worked. You should be able to print your genes in any colour 
you can think of by adding 'col' argument to your 'text' function. You 
could also plot the points of any colour on top of your smear plot. 
Analogous to the way you use the 'text' function:
  points(x=gene.labels$logCPM,
	y=gene.labels$logFC,
	cex=1, col="red")

Hope it helps,

Aliaksei.

On 16/12/13 11:53 PM, Christine Gläßer wrote:

> Dear Aliaksei,
>
> thank you very much for your help, it worked out. As an example, I have
> adapted the example given in the documentation in plotSmear:
>
> ##################
>
> y <- matrix(rnbinom(10000,mu=5,size=2),ncol=4)
> d <- DGEList(counts=y, group=rep(1:2,each=2), lib.size=colSums(y))
> rownames(d$counts) <- paste("tag",1:nrow(d$counts),sep=".")
> d <- estimateCommonDisp(d)
>
>       # find differential expression
> de <- exactTest(d)
>
>       # highlighting the top 500 most DE tags
> de.tags <- rownames(topTags(de, n=500)$table)
>
> plotSmear(d, de.tags=de.tags)
>
> de$genes <- rownames(d$counts)
>
> ids <- c("tag.2323", "tag.9")
> gene.labels <- de$table[de$genes %in% ids,]
> text(x=gene.labels$logCPM, y=gene.labels$logFC,
> labels=rownames(gene.labels), cex=0.7, pos=1)
>
> ###################
>
> I'd also like to add a line pointing at these specific genes (or
> highlight them a bit better, e.g. with a specific color) - otherwise the
> plot is not very informative, since there are many dots in close
> neighborhood to my genes of interest. Do you also know how that could be
> done?
>
> Thank you very much for your help, I greatly appreciate it!
>
> Kind regards,
>
> Christine Gläßer
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>



More information about the Bioconductor mailing list