I have FPKM data for three genes like below:
Samples gene1 gene2 gene3
TCGA-2Y-A9GS-01A 0.9 7.4 1.0
TCGA-2Y-A9GT-01A 0.8 1.0 0.3
TCGA-2Y-A9GU-01A 0.6 2.0 0.2
TCGA-2Y-A9GV-01A 1.2 0.5 0.1
TCGA-2Y-A9GW-01A 3.8 2.1 0.4
TCGA-2Y-A9GX-01A 2.3 2.0 1.5
I used cor.test
cor.test(~ gene1 + gene2, data = df2, method="spearman", continuity=FALSE, conf.level=0.95)
Spearman's rank correlation rho
data: gene1 and gene2
S = 5686100, p-value = 6.083e-09
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
0.2984045
I have a warning message which I didn't see before.
Warning message:
In cor.test.default(x = c(0.9, 0.8, 0.6, 1.2, 3.8, 2.3, 3.8, 0.4, :
Cannot compute exact p-value with ties
Do I need to care about this warning message? Is it good using FPKM data for correlation?
For plotting I used ggscatter
.
ggscatter(data, x = "gene1", y = "gene2",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "spearman",
xlab = "gene1", ylab = "gene2")
Is this fine or I need to use any log
for the scatter plot?