Mercurial > repos > saharlcc > isoem2_isode2
comparison isoem2_isode2/FC_Filter_IsoDE_wrapper.sh @ 10:78d03bf22a1f draft
- Add prinseq command to filter RNA-Seq data
- Fix in interpreting p-value when replicates are used
author | saharlcc |
---|---|
date | Thu, 16 Mar 2017 13:44:03 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:ce0a125b3cd1 | 10:78d03bf22a1f |
---|---|
1 #!/bin/bash | |
2 | |
3 tempDir=/galaxy-prod/tmp | |
4 | |
5 inputfile=${1} | |
6 inputfile2=${2} | |
7 outputfile=${3} | |
8 inputFC=${4} | |
9 | |
10 | |
11 if [ "${inputfile2}" == "1" ] | |
12 then | |
13 echo | |
14 awk -v FC=$inputFC '{if (NR == 1 || ($2 != "NDE" && $2 <= -(log(FC)/log(2)))) print $0}' $inputfile > $outputfile | |
15 #exit; | |
16 | |
17 elif [ "${inputfile2}" == "2" ] | |
18 then | |
19 awk -v FC=${inputFC} '{if (NR == 1 || ($2 != "NDE" && $2 >= (log(FC)/log(2)))) print $0}' $inputfile > $outputfile | |
20 else | |
21 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 | |
22 fi | |
23 | |
24 echo "done" | |
25 date | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 #logx(y) = logn(y)/logn(x) | |
32 | |
33 #The NR==1 condition makes sure the file header gets printed |