Repository 'isoem2_isode2'
hg clone https://toolshed.g2.bx.psu.edu/repos/saharlcc/isoem2_isode2

Changeset 9:ce0a125b3cd1 (2016-09-19)
Previous changeset 8:dc8efad9c31b (2016-09-19) Next changeset 10:78d03bf22a1f (2017-03-16)
Commit message:
Uploaded
added:
FC_Filter_IsoDE_wrapper.sh
b
diff -r dc8efad9c31b -r ce0a125b3cd1 FC_Filter_IsoDE_wrapper.sh
--- /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