forked from albertwcheng/RNASeqMappingScripts3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bwaQsCoyoteJob.sh
executable file
·39 lines (26 loc) · 886 Bytes
/
bwaQsCoyoteJob.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#PBS -v SAMINPREFIX,SAMSEOUTPREFIX,QTHRESHOLD,SAMPLE,SCRIPTDIR
#samseDir=$SAMINPREFIX
#samseOut=$SAMSEOUTPREFIX
#scriptDir=$SCRIPTDIR
#sample=$SAMPLE
#qThreshold=$QTHRESHOLD
samseDir=$1
samseOut=$2
qThreshold=$3
sample=$4
scriptDir=$5
cd $scriptDir
Qt=$qThreshold
samp_outdir=$samseOut/$sample/processed_Q$Qt/
samp_outdirsorted=$samseOut/$sample/processed_Q$Qt/sorted/
mkdir $samseOut;
mkdir $samseOut/$sample/
mkdir $samp_outdir
mkdir $samp_outdirsorted
for samfile in $samseDir/$sample/*.sam; do
samfilebasename=`basename $samfile`
echo processing $samfilebasename
python partReadChrGeneric.py $samfile sam $samp_outdir/${samfilebasename/.sam/}. .SAM 10 > $samp_outdir/${samfilebasename/.sam/}.part.stdout 2> $samp_outdir/${samfilebasename/.sam/}.part.stderr
#now sort
bash sortByCoordGeneric.sh $samp_outdir *.q10.SAM $samp_outdirsorted .s SAM
done