-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_coverage_multi.sh
More file actions
executable file
·32 lines (23 loc) · 1001 Bytes
/
get_coverage_multi.sh
File metadata and controls
executable file
·32 lines (23 loc) · 1001 Bytes
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
#!/usr/bin/env bash
gene_bed=software/gene_locations.bed
backgrounds="wb nwrb pwrb"
platforms="cg ont illumina_ss"
platforms="illumina_minimap2 illumina_bwa"
for platform in $platforms; do
for background in $backgrounds; do
bam_dir=platforms/${platform}/${background}/alignments
outdir=platforms/${platform}/${background}/mosdepth
mkdir -p ${outdir}
# run mosdepth for each plate
for bam in ${bam_dir}/*.bam; do
sample=$(basename ${bam} .bam | cut -d'_' -f1)
echo "running mosdepth for ${sample} ${platform} ${background}..."
prefix=${outdir}/${sample}
job_name=md_${platform}_${background}_${sample}
slurm_out=plots/coverage_analysis/slurm
mkdir -p plots/coverage_analysis/slurm
sbatch --output=${slurm_out}/mosdepth-%j.out --job-name=${job_name} \
plots/coverage_analysis/scripts/get_coverage.sh $gene_bed $prefix $bam
done
done
done