changeset 8:99569eccc583 draft

Uploaded
author petr-novak
date Mon, 09 Dec 2019 04:14:48 -0500
parents 89c5ba120b21
children c2c69c6090f0
files ChipSeqRatioAnalysis.R
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChipSeqRatioAnalysis.R	Mon Dec 02 08:41:43 2019 -0500
+++ b/ChipSeqRatioAnalysis.R	Mon Dec 09 04:14:48 2019 -0500
@@ -31,7 +31,9 @@
 args <- commandArgs(trailingOnly = TRUE)
 input <- args[1]
 HTMLfile <- args[2]
-threshld <- 2/(2+1)
+thr = 5
+threshld <- thr/(thr+1)
+
 inputN=as.numeric(args[3])
 chipN=as.numeric(args[4])
                                         #dataframe preprocessing and table creation
@@ -55,7 +57,7 @@
 lims=range(df$"Normalized ratio Chip/Input"[df$"Normalized ratio Chip/Input">0], finite = TRUE)
 suppressWarnings(plot(df$Cluster,df$"Normalized ratio Chip/Input", log="y", xlab="Cluster Nr.", ylab="Normalized ChiP/Input ratio", pch=20, ylim=lims))
 abline(h=1,col='#00000080', lwd = 2)
-abline(h=2,col='#FF000080', lwd = 2)
+abline(h=thr,col='#FF000080', lwd = 2)
 
 
 suppressWarnings(plot(df$Cluster,df$"Normalized ratio Chip/(Chip+Input)", xlab="Cluster Nr.", ylab="Normalized Chip/(Chip+Input)", pch=20))
@@ -79,7 +81,7 @@
 HTML(graph, file=filename)
 if (nrow(outputTable)>0){
   HTML(outputTable, file=filename, classtable = "dataframe",
-       row.names=FALSE, align='left', caption="Clusters with Normalized ChIP/Input ratio > 2", captionalign="top")
+       row.names=FALSE, align='left', caption=paste("Clusters with Normalized ChIP/Input ratio >", thr), captionalign="top")
 }
 HTMLEndFile(filename) 
 # file.rename(from=filename, to=HTMLfile)