R.rsgcc - k821209/pipelines GitHub Wiki
Pearson correlation calc
#diurnal.pastedcount.txt
genename SRR2132408 SRR2132409 SRR2132410 SRR2132411 SRR2132412 SRR2132414 SRR2132416 SRR2132417 SRR2132418 SRR2132419 SRR2132420 SRR2132424 SRR2132425 SRR2132426 SRR2132427 SRR2132428 SRR2132429 SRR2132430 SRR2132431 SRR2132432 SRR2132433 SRR2132435 SRR2132436 SRR2132437 SRR2132440 SRR2132441 SRR2132442 SRR2132443 SRR2132444 SRR2132445 SRR2132448 SRR2132450 SRR2132451 SRR2132456 SRR2132457
Cre01.g000017.v5.5 12 7 14 2 0 6 0 0 3 4 2 13 14 4 18 46 18 2 4 10 50 26 16 14 0 4 2 2 0 0 2 6 20 32 28
Cre01.g000033.v5.5 22 29 10 16 6 6 4 5 10 6 27 25 81 16 43 117 51 8 8 24 116 53 15 36 11 27 13 12 0 21 10 23 21 94 81
Cre01.g000050.v5.5 114 136 236 260 252 180 236 180 328 126 318 110 316 226 224 281 96 446 73 74 180 142 120 161 234 434 182 202 76 228 122 200 304 180 150
Cre01.g000100.v5.5 148 132 222 172 176 146 136 150 176 48 234 112 312 208 296 550 137 28 66 44 324 142 104 190 150 318 208 200 60 162 92 144 352 196 173
Cre01.g000150.v5.5 324 222 627 558 584 388 38 38 88 46 136 74 238 74 118 112 46 1516 500 523 2166 584 310 442 416 1018 468 88 22 78 65 101 140 109 109
library(rsgcc)
## try http:// if https:// URLs are not supported
#source("https://bioconductor.org/biocLite.R")
#biocLite("DESeq")
library(DESeq)
dct = read.table("D:/analysis/Creinhardtii/tophat/diurnal.pastedcount.txt", header=TRUE, row.names=1 )
cond <- factor(c('light', 'light', 'light', 'light', 'light', 'light', 'dark', 'dark', 'dark', 'dark', 'dark', 'dark', 'dark', 'dark', 'dark', 'dark', 'dark', 'light', 'light', 'light', 'light', 'light', 'light', 'light', 'light', 'light', 'light', 'dark', 'dark', 'dark', 'dark', 'dark', 'dark', 'dark', 'dark'))
cds = newCountDataSet(dct,conditions = cond)
cds <- estimateSizeFactors( cds )
normalizedCounts <- t( t(counts(cds)) / sizeFactors(cds) )
pcc <- cor.matrix(normalizedCounts , cpus = 2,
cormethod = "PCC", style = "all.pairs",
pernum = 0, sigmethod = "two.sided",
output = "matrix")
pcc_neighbor <- cor.matrix(normalizedCounts , cpus = 5,
cormethod = "PCC", style = "adjacent.pairs",
pernum = 0, sigmethod = "two.sided",
output = "matrix")