Skip to content

Commit

Permalink
Merge pull request #22 from FredHutch/v1.2-patch-191104
Browse files Browse the repository at this point in the history
Update SEACR_1.2.sh
  • Loading branch information
mpmeers authored Nov 5, 2019
2 parents 8ed4b16 + 169c97f commit 46fb539
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions SEACR_1.2.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions SEACR_1.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46fb539

Please sign in to comment.