afrendeiro / pipelines

[deprecated] Pipelines for ngs
GNU General Public License v2.0
2 stars 1 forks source link

Implement NSC and RSC #27

Closed afrendeiro closed 9 years ago

afrendeiro commented 9 years ago

normalized ratio between the fragment-length cross-correlation peak and the background cross-correlation (normalized strand coefficient, NSC) and the ratio between the fragment- length peak and the read-length peak (relative strand correlation, RSC)

in Landt et al, 2012

afrendeiro commented 9 years ago
# R script for Peak Model

p <- c(0.0294535437152,...)
m <- c(0.0269445604449,...)
ycorr <- c(-0.000190275154849,...)
xcorr <- c(-500.0,-498.998998999,...)
altd  <- c(88)
x <- seq.int((length(p)-1)/2*-1,(length(p)-1)/2)

readLength = 100 # read from annotation sheet

NSC = abs(max(ycorr)) / abs(min(ycorr))
RSC = (max(ycorr) - min(ycorr)) / (ycorr[500 + readLength] - min(ycorr))
# max(ycorr) should be altd