Mercurial > repos > bioitcore > splicetrap
comparison bin/apply_cutoff.sh @ 1:adc0f7765d85 draft
planemo upload
| author | bioitcore |
|---|---|
| date | Thu, 07 Sep 2017 15:06:58 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:d4ca551ca300 | 1:adc0f7765d85 |
|---|---|
| 1 #SrcFolder="/data/zhang/wuj/scripts/SpliceTrap.0.8"; | |
| 2 | |
| 3 outputname=$1; | |
| 4 CutoffLevel=$2; | |
| 5 Outputfolder=$3 | |
| 6 SrcFolder=$5 | |
| 7 JunctionCut=$4 | |
| 8 noIRM=$8 | |
| 9 | |
| 10 echo "CUTOFF: Entering cutoff step..."; | |
| 11 echo "CUTOFF: Cache folder: $outputname.filter" | |
| 12 mkdir $Outputfolder/$outputname.filter | |
| 13 cd $Outputfolder/$outputname.filter | |
| 14 ln -s ../$outputname.ratio | |
| 15 ln -s ../$outputname.nums | |
| 16 echo "CUTOFF: spliting file....and generating shell scripts..." | |
| 17 split -11000 $outputname.ratio | |
| 18 | |
| 19 for ratiofiles in x* | |
| 20 do | |
| 21 echo "perl $SrcFolder/ApplyCutoff.jie.pl $ratiofiles $CutoffLevel $JunctionCut $noIRM > $ratiofiles.out" >>filter.sh | |
| 22 done | |
| 23 | |
| 24 echo "CUTOFF: submit scripts..." | |
| 25 perl $SrcFolder/batchqsub.pl filter.sh | |
| 26 echo "CUTOFF: merging file...." | |
| 27 cat *.out >../$outputname.raw | |
| 28 cd ../ | |
| 29 #perl /data/zhang/wuj/tools/SpliceTrap.0.8/ApplyCutoff.jie.pl $outputname.ratio $outputname.nums 8 >$outputname.txt | |
| 30 if [ "$noIRM" ];then | |
| 31 awk '{printf $22"\t"$2"\t"$4"\t"$5"\t"$6"\t"$7"\t"$8"\t"$12"\t"$13"\t"$14"\t"$15"\n"}' $outputname.raw >$outputname.txt | |
| 32 else | |
| 33 awk '{printf $22"\t"$3"\t"$4"\t"$5"\t"$6"\t"$7"\t"$8"\t"$12"\t"$13"\t"$14"\t"$15"\n"}' $outputname.raw >$outputname.txt | |
| 34 fi | |
| 35 rm $outputname.filter -rf | |
| 36 |
