# HG changeset patch # User petr-novak # Date 1575882888 18000 # Node ID 99569eccc58386209cc8407b7ea74d049ef81607 # Parent 89c5ba120b214c97966717f52da52f618aa18276 Uploaded diff -r 89c5ba120b21 -r 99569eccc583 ChipSeqRatioAnalysis.R --- 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)