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

Christine Gläßer c.glaesser at zmbh.uni-heidelberg.de
Mon Dec 16 14:18:07 CET 2013


Am 16.12.2013 14:12, schrieb Aliaksei Holik:
> 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
>>
>>
Hi Aliaksei,

thank you for your fast and kind reply. Thank you for helping me out - I 
didn't think of the "points" or col function... That's indeed what I've 
been looking for.

Kind regards,

Christine



More information about the Bioconductor mailing list