-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcall_hydra.sh
32 lines (30 loc) · 922 Bytes
/
call_hydra.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
#!/bin/bash
#
# runs breakdancer against bams
#
. common.sh
export PATH=$BASE_DIR/tools/hydra-multi:$PATH
export PATH=$BASE_DIR/tools/hydra-multi/bin:$PATH
export PATH=$BASE_DIR/tools/hydra-multi/scripts:$PATH
for BAM in $DATA_DIR/*.sq.bam ; do
cx_load $BAM
CX_BAM=$BAM
CX_CALLER=hydra/master20160129
cx_save
MAD=$(echo "scale=4; $CX_READ_FRAGMENT_STDDEV / 1.4826" | bc)
MLD=$(echo "scale=4; 10 * $MAD" | bc)
MNO=$(echo "scale=4; 20 * $MAD" | bc)
# follow the hydra workflow from https://code.google.com/p/hydra-sv/wiki/TypicalWorkflow
XC_OUTPUT=$CX.vcf
XC_MULTICORE=1
XC_SCRIPT="rm -rf $CX; mkdir $CX $CX 2>/dev/null; cd $CX
module unload samtools;
module add perl samtools/0.1.19
ulimit -n \$(ulimit -Hn)
ln -s $CX_BAM input.bam &&
echo 'sample input.bam' > config.stub.txt &&
hydra-multi.sh run -t \$(nproc) config.stub.txt &&
$BASE_DIR/hydra2vcf.py < $CX/all.hydra.sv.final > $CX.vcf
"
xc_exec
done