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) 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