scatter plot, gene expression, RNA-seq
0
0
Entering edit mode
21 months ago
Rob ▴ 170

Hey all, I am using this code that gives me scatter plots and p and R values on the plot. I wonder who can I ger the P and R-values as a csv/ excel file?

I want to have values and I cannot get it from the image.

ggscatter(ex, x = "continuous variable", y = "Expression",
          add = "reg.line",                         
          add.params = list(color = "blue", fill = "lightgray"),
          color = "black", palette = "jco", fill = "lightgray",          
          #shape = "cyl",                            
          fullrange = TRUE,                       
          rug = TRUE, facet.by = "gene", cor.coef = T,
          title = "Correlation Plot",
          conf.int = TRUE, 
          cor.coeff.args = list(),
          cor.method = "spearman",
          cor.coef.coord = c(NULL, NULL),
          cor.coef.size = 4,                               
)+

  geom_vline(xintercept = 157, colour="red", linetype = "longdash")

here is the plot I get (with R & p-value for each gene) :

q-value

my data looks like this and SMA is my countinous variable:

pivot

RNA-Seq correlation • 1.1k views
ADD COMMENT
0
Entering edit mode

I'm not sure how to do this in ggplot2. Check out this similar question and answer on Stack Overflow.

Correlation Analysis to CSV

ADD REPLY
1
Entering edit mode

Thanks, Jeremy But none of the methods in the link worked for me. Is there another way to get the table from ggscatter?

ADD REPLY

Login before adding your answer.

Traffic: 2636 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6