Entering edit mode

2.3 years ago

ATCG
▴
370

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!

Multiple options.

`cor`

on the count matrix, or PCA, showing that replicates cluster together.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?

The R function is called

`cor`

, and it will return a matrix that indicates the pairwise correlation between all samples.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.The cor function does what I was expecting to do. For example form a counts matrix

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

Is this a good way of accomplishing this?

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