Mercurial > repos > saharlcc > isoem2_isode2
changeset 9:ce0a125b3cd1 draft
Uploaded
author | saharlcc |
---|---|
date | Mon, 19 Sep 2016 22:10:01 -0400 |
parents | dc8efad9c31b |
children | 78d03bf22a1f |
files | FC_Filter_IsoDE_wrapper.sh |
diffstat | 1 files changed, 33 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FC_Filter_IsoDE_wrapper.sh Mon Sep 19 22:10:01 2016 -0400 @@ -0,0 +1,33 @@ +#!/bin/bash + +tempDir=/galaxy-prod/tmp + +inputfile=${1} +inputfile2=${2} +outputfile=${3} +inputFC=${4} + + +if [ "${inputfile2}" == "1" ] +then + echo + awk -v FC=$inputFC '{if (NR == 1 || ($2 != "NDE" && $2 <= -(log(FC)/log(2)))) print $0}' $inputfile > $outputfile +#exit; + +elif [ "${inputfile2}" == "2" ] +then + awk -v FC=${inputFC} '{if (NR == 1 || ($2 != "NDE" && $2 >= (log(FC)/log(2)))) print $0}' $inputfile > $outputfile +else + awk -v FC=${inputFC} '{if ((NR == 1 || ($2 != "NDE" && $2 <= -(log(FC)/log(2)))) || (NR == 1 || ($2 != "NDE" && $2 >= (log(FC)/log(2))))) print $0}' $inputfile > $outputfile +fi + +echo "done" +date + + + + + +#logx(y) = logn(y)/logn(x) + +#The NR==1 condition makes sure the file header gets printed \ No newline at end of file