forked from albertwcheng/RNASeqMappingScripts3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bwaQs.sh
executable file
·30 lines (24 loc) · 852 Bytes
/
bwaQs.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
source ~/.bashrc
source fileUtils.sh
source ./initvars.sh
source $configDir/bwa.config.sh
source $tophatshvar
saveIFS=$IFS
IFS=`echo -en ","`
declare -a samples=($Samples)
for sample in ${samples[@]}; do
echo readching $sample
for Qt in ${QThresholds[@]}; do
samp_outdir=$samseDir/$sample/processed_Q$Qt/
samp_outdirsorted=$samseDir/$sample/processed_Q$Qt/sorted/
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
done
done