How to estimate the inter sample and inter replicate correlation coefficient?
0
0
Entering edit mode
4.6 years ago
ATCG ▴ 400

How to estimate the inter sample and inter replicate correlation coefficient? My dataset consists of 2 RNA-Seq samples treatment and control and each sample has 3 replicates. I would like to show that the replicates have a higher correlation coefficient than that of the samples( treatment and control). Thanks!

RNA-Seq Replicates R2 Correlation coefficients • 2.2k views
ADD COMMENT
1
Entering edit mode

Multiple options. cor on the count matrix, or PCA, showing that replicates cluster together.

ADD REPLY
0
Entering edit mode

Okay thanks. How is this done in R? and how can I actually print the r2 value? I know how to do and plot PCA but not sure how I can get the r2 value..

Also, is there a way to perform this analysis on the fastq files before alignment?

ADD REPLY
1
Entering edit mode

The R function is called cor, and it will return a matrix that indicates the pairwise correlation between all samples.

Also, is there a way to perform this analysis on the fastq files before alignment?

No. It works on counts. PCA on normalized log2-tranformed ones. cor can be done on raw counts since it measures linear correlations and common normalization techniques simply compute linear scaling factors, so cor does not change.

ADD REPLY
0
Entering edit mode

The cor function does what I was expecting to do. For example form a counts matrix

a=cor(counts(dds))
cor.samples=corrplot(a, method="number")

Will produce a plot such as this one: https://cran.r-project.org/web/packages/corrplot/vignettes/corrplot-intro.html

But I would like to show a linear correlation plot such as this one

library("ggpubr")
ggscatter(z, x = "WT", y = "TREATMENT", 
          add = "reg.line", conf.int = TRUE, 
          cor.coef = TRUE, cor.method = "pearson",
          xlab = "WT", ylab = "TREATMENT")

Is this a good way of accomplishing this?

ADD REPLY
1
Entering edit mode

Use this code on your count matrix after subsetting it to the two samples of interest or the mean between the groups.

ADD REPLY

Login before adding your answer.

Traffic: 1867 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