Mercurial > repos > saharlcc > isoem2_isode2
view 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 |
line wrap: on
line source
#!/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