Question: Color specific genes in cummeRbund scatterplot
0
gravatar for markus.nevil
2.2 years ago by
markus.nevil0 wrote:

I have a set of genes from an RNA-seq dataset generated from Wild type and mutant samples. As expected there are a number of genes that significantly differ in gene expression as called by Cufflinks/cuffdiff.

I am trying to create a scatterplot where the genes that significantly change in expression are colored differently than the genes that do not (ex.: Up = red, down = blue, NS = black).

However I can only seem to figure out how to create individual plots in a single color (like only showing the points that are significantly up-regulated in red, but no other points).

I would like to make a single graph with all of the genes plotted, and with the significantly changing genes in specific colors (perhaps even point sizes!). I'm fairly new to using R so any help would really be appreciated.



I have lists of these genes and have generated gene lists using:

>myDOWNGenesIds <- read.table("down>2.txt")

>myDOWNGenes <- getGenes(cuff,myDOWNGenesIds[ ,1])

And I can generate individual scatterplots using:

>s <- csScatter(genes(cuff), "Wild_Type", "Mutant")

>sDown <- csScatter(myDOWNGenes, "Wild_Type", "Mutant")

I can also change aspects of these individual graphs:
>sDown + geom_point(size=3, color="red")

cummerbund • 516 views
ADD COMMENTlink modified 2.1 years ago by Haiying.Kong110 • written 2.2 years ago by markus.nevil0
Answer: Color specific genes in cummeRbund scatterplot
0
gravatar for Haiying.Kong
2.1 years ago by
Haiying.Kong110
Germany
Haiying.Kong110 wrote:

  I am not familiar with this, but would this be sensible to try?

  First, you need to combine all 3 kinds of gene list files, up, down, and no change. There must be one column that indicates the direction of change, and then you can translate this and get a vector colors. Then, instead of using color="red", you give the color vector to the parameter "color".

ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by Haiying.Kong110

 geom_point(aes(color=color.vector))

ADD REPLYlink written 2.0 years ago by Haiying.Kong110
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 248 users visited in the last hour