From d30a4c6364d6338915a49085e696a7a7c555f1c1 Mon Sep 17 00:00:00 2001 From: mpmeers Date: Mon, 4 Nov 2019 16:38:26 -0800 Subject: [PATCH 1/2] Update SEACR_1.2.sh Added calls to SEACR_1.2.R on lines 122, 126, and 129 --- SEACR_1.2.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SEACR_1.2.sh b/SEACR_1.2.sh index e27f034..6651339 100755 --- a/SEACR_1.2.sh +++ b/SEACR_1.2.sh @@ -119,14 +119,14 @@ path=`dirname $0` if [[ -f $2 ]] && [[ $norm == "norm" ]] then echo "Calculating threshold using normalized control: $(date)" - Rscript $path/SEACR_1.1.R --exp=$password.auc --ctrl=$password2.auc --norm=yes --output=$password + Rscript $path/SEACR_1.2.R --exp=$password.auc --ctrl=$password2.auc --norm=yes --output=$password elif [[ -f $2 ]] then echo "Calculating threshold using non-normalized control: $(date)" - Rscript $path/SEACR_1.1.R --exp=$password.auc --ctrl=$password2.auc --norm=no --output=$password + Rscript $path/SEACR_1.2.R --exp=$password.auc --ctrl=$password2.auc --norm=no --output=$password else echo "Using user-provided threshold: $(date)" - Rscript $path/SEACR_1.1.R --exp=$password.auc --ctrl=$2 --norm=no --output=$password + Rscript $path/SEACR_1.2.R --exp=$password.auc --ctrl=$2 --norm=no --output=$password fi fdr=`cat $password.fdr.txt | sed -n '1p'` ## Added 5/15/19 for SEACR_1.1 From 169c97f1c7e0c39a7b0751b63ed498fb8474477c Mon Sep 17 00:00:00 2001 From: mpmeers Date: Mon, 4 Nov 2019 16:39:39 -0800 Subject: [PATCH 2/2] Update SEACR_1.2.R Added a d0 term to percentile threshold part of loop so that write.table on line 144 does not fail due to an unspecified d0 --- SEACR_1.2.R | 1 + 1 file changed, 1 insertion(+) diff --git a/SEACR_1.2.R b/SEACR_1.2.R index f013939..9648f81 100644 --- a/SEACR_1.2.R +++ b/SEACR_1.2.R @@ -137,6 +137,7 @@ if(is.na(numtest)){ ## If 2nd field is a bedgraph, calculate empirical threshold ctrl<-as.vector(as.numeric(paste(0,argsL$ctrl,sep=""))) x0<-min(frame$values[frame$percentile <= ctrl[1]]) z0<-min(frame2$values[frame2$percentile <= ctrl[1]]) + d0<-0 fdr<-ctrl[1] ## New for SEACR_1.1 } invis <- gc(verbose=FALSE)