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.