From 67d87b9bc3d1fa72bc7730b2434ed3fbdabb3972 Mon Sep 17 00:00:00 2001 From: "hongjian.jin@stjude.org" Date: Mon, 19 Jul 2021 11:36:42 -0500 Subject: [PATCH] How is scaling factor calculated? --- R/ChIPseqSpikeInFree.R | 2 +- README.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/R/ChIPseqSpikeInFree.R b/R/ChIPseqSpikeInFree.R index 084284a..2b2e911 100644 --- a/R/ChIPseqSpikeInFree.R +++ b/R/ChIPseqSpikeInFree.R @@ -674,7 +674,7 @@ PlotDistr<-function(data, SF="test_SF.txt", prefix="test", xlimMaxCPMW=NULL) Xbs <- strsplit(meta$TURNS,",") MAX_CPMW <- max(as.numeric(unlist(lapply(Xbs,'[',3) ))) + 10 }else{ - MAX_CPMW <- min(max(x), xlimMaxCPMW) + MAX_CPMW <- min(max(x), xlimMaxCPMW, 80) } if (ncol(subsetByAb) == 1) { totalPages <- 1 diff --git a/README.md b/README.md index 0c1c27d..cf33cc7 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,11 @@ Output will include: (in case that you set `prefix ="test"`) - **QC**: quality control testing. QC failure indicates poor or no enrichment. - **SF**: scaling factor. Only sample that passes QC will be given a SF and **NA** indicates sample with poor enrichment. Input sample is not required for SF calculation. Larger scaling factor indicates a lower level of total histone mark and vice versa. For example, H3K27me3 is globally decreased in H3.3 K27M cells compared to WT (**SF, 5.47 vs 1**). - **TURNS**: the coordinates of two points [Xa, Ya, Xb, Yb] detected in cumulative distribution plot (proportion of reads below CPMW cutoffs) for slope-based SF calculation. + +### How is scaling factor calculated? +Given a set of n samples immunoprecipitated with the same antibody, we chose one sample as a reference βr. We derived the scaling factor (S) for any other sample i as Si=βr/βi where βi is the slope of sample i. Since the scaling factor of one specific sample is relative to the reference sample, the value could be changed based on set of samples included in the analysis. The recommended comparison would be of individual samples between different GROUPs but with same ANTIBODY. + + ### Graphical results