-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path11_visor_haplotype.sh
29 lines (22 loc) · 1.01 KB
/
11_visor_haplotype.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
#!/bin/bash
ref="/dfs7/jje/jenyuw/Eval-sv-temp/reference"
sim="/dfs7/jje/jenyuw/Eval-sv-temp/simulation"
nT=16
cd $sim
module load R/4.2.2
module load python/3.8.0
cut -f1,2 ${ref}/r649.rename.fasta.fai > ${sim}/chrom.dim.tsv
#-r '30:30:10:10:10:10' is the sum of the RATIO, total is 100%, NOT the count
#-n number of SVs
#-l length of SVs
#-s standard deviation of SV length
Rscript ${sim}/randomregion.r -d chrom.dim.tsv -i 1 -n 3000 -l 6000 -s 1800 \
-v 'insertion,deletion,inversion,tandem duplication,translocation cut-paste,translocation copy-paste' \
-r '49:48:1:1.6:0.2:0.2' -g ${ref}/r649.rename.fasta |\
bedtools sort > ${sim}/HACk.random.bed
VISOR HACk -g ${ref}/r649.rename.fasta -b ${sim}/HACk.random.bed -o hap_1
cut -f1,2 ${sim}/hap_1/h1.fa.fai ${ref}/r649.rename.fasta.fai > ${sim}/haplochroms.dim.tsv
cat ${sim}/haplochroms.dim.tsv | sort|\
gawk '$2 > maxvals[$1] {lines[$1]=$0; maxvals[$1]=$2} END { for (tag in lines) print lines[tag] }' > ${sim}/maxdims.tsv
module unload R/4.2.2
module unload python/3.8.0