# Removing genes with less than a correlation cut-off between two matrices

I have two matrices like this:

> head(DEG_log[,1:4])
cl1       cl1       cl1       cl1
ALB    4.653796  7.046317  7.732135  7.758708
AQP9   7.798208  8.231112  8.734799  8.054087
CALML5 5.791524  9.058341  6.977369  9.503477
CCL4   9.739961  7.663303  8.934939  7.324958
CDK6   9.832115  9.710043 11.439345 10.330253
CHGA   5.139340 12.024606  5.988773  8.696836
>


I have the same patients and genes in two separate matrices coming from two sequencing panels with the same chemistry. Each sample has a match in another panel. I want to remove genes that have low correlation between two matched samples.

I have normalised and log-transformed the data by DESeq2.

I just plotted the correlation between each pairs of samples:

library("ggpubr")
ggscatter(my_data, x = "sample1", y = "sample1_1",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "onco", ylab = "biomarker)")


Like this:

by:

corr_test(a, b, 0.95)


I can calculate correlation, but I don't know how to remove genes with low or non-significant correlation between matched samples.

• Welcome to the site! What have you tried? Did you found some errors or problems? Please along your wish describe your problem and what have you done so far to solve it, this way it is easier for us to suggest approaches you haven't tried or improvements on them. Do you have the same samples in both matrices (and ordered the same way)? Are the genes ordered the same way in both matrices ? – llrs Jan 15 '19 at 8:07
• Thanks a lot, yes samples and genes are the same coming from same patients sequenced with same chemistry but separately – Exhausted Jan 15 '19 at 10:52
• @FereshTeh is Mahta Mira another of your accounts? – Devon Ryan Jan 15 '19 at 12:17
• Yes, Sorry. I am logging with Facebook, last night on my laptop this account did not work so I used that but now I am with office's computer – Exhausted Jan 15 '19 at 12:44
• @llrs Yup, I'll look into merging the accounts, it'll be a first for me. – Devon Ryan Jan 16 '19 at 15:38