-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.01.bwa_map.sh
27 lines (16 loc) · 1.1 KB
/
run.01.bwa_map.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
#!/bin/bash
#SBATCH --get-user-env
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/project2/lbarreiro/users/tauras/Programs/zeromq/libzmq-master/build
export LIBRARY_PATH=$LIBRARY_PATH:/project2/lbarreiro/users/tauras/Programs/zeromq/libzmq-master/build/lib:/project2/lbarreiro/users/tauras/Programs/luarocks/lib/lua/5.3/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/project2/lbarreiro/users/tauras/Programs/zeromq/libzmq-master/build/lib:/project2/lbarreiro/users/tauras/Programs/luarocks/lib/lua/5.3/
export CPATH=$CPATH:/project2/lbarreiro/users/tauras/Programs/zeromq/libzmq-master/include/
module load gcc; module load cmake/3.6.2; module load lua; module load bwa
module load samtools
index=${SLURM_ARRAY_TASK_ID}
f=`head -$index 00_bam.list | tail -1`
samtools sort -n bams/$f*min24*.bam -o $f.sortname.bam
/project2/lbarreiro/users/tauras/Programs/bwa_bam2bam/network-aware-bwa-master/bwa bam2bam -g hg19/hg19.fa -l 16500 -f bams/$f.mapped.bam $f.sortname.bam
rm $f.sortname.bam
samtools sort -o bams/$f.sort.bam bams/$f.mapped.bam; samtools index bams/$f.sort.bam
rm bams/$f.mapped.bam
samtools flagstat bams/$f.sort.bam