-
Brandi Cantarel authoredcd1382aa
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
bam2tdf.sh 738 B
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
39
#!/bin/bash
#indexbams.sh
usage() {
echo "-h --Help documentation for markdups.sh"
echo "Example: bash indexbams.sh"
echo "-r --Reference Genome: GRCh38 or GRCm38"
exit 1
}
OPTIND=1 # Reset OPTIND
while getopts :r:b:p:h opt
do
case $opt in
h) usage;;
r) index_path=$OPTARG;;
p) pair_id=$OPTARG;;
b) bam=$OPTARG;;
esac
done
shift $(($OPTIND -1))
# Check for mandatory options
NPROC=$SLURM_CPUS_ON_NODE
if [[ -z $NPROC ]]
then
NPROC=`nproc`
fi
baseDir="`dirname \"$0\"`"
if [[ -z $isdocker ]]
then
source /etc/profile.d/modules.sh
module load igvtools/2.3.71 samtools/1.6
exit
samtools index -@ $NPROC $bam
igvtools count -z 5 $bam ${pair_id}.tdf ${index_path}/igv/human.genome