File Info

Filename
.command.sh
Full Path
s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/26/bebeae25c376e691cc98d0d9e682d9/.command.sh
Size
1.8 KB
Attempt
#!/bin/bash -Ceuo pipefail
SHARD1="chr1,chr4,chr15,chr19,chr22,chrY"
SHARD2="chr2,chr8,chr9,chr17,chr18,chr20"
SHARD3="chr3,chr5,chr10,chr11,chr13,chr14"
SHARD4="chr6,chr7,chr12,chr16,chr21,chrX"

probe_counts -m frac -t 1 -r "$SHARD1" 1241_BGV4-N1-BDNA-1_A23TY32LT4_1.recalibrated.bam xgen-exome-hyb-panel-v2_AND_altera_v3_probes_short_hg38_AND_cdx_spike_custom30off4x_hg38_AND_foresight_clarity.bed \
    "sample_id=1241_BGV4-N1-BDNA-1_A23TY32LT4_1" "specimen_id=1241_BGV4" \
    "flowcell=A23TY32LT4" "sample_type=normal" > counts_s1.tsv &
probe_counts -m frac -t 1 -r "$SHARD2" 1241_BGV4-N1-BDNA-1_A23TY32LT4_1.recalibrated.bam xgen-exome-hyb-panel-v2_AND_altera_v3_probes_short_hg38_AND_cdx_spike_custom30off4x_hg38_AND_foresight_clarity.bed \
    "sample_id=1241_BGV4-N1-BDNA-1_A23TY32LT4_1" "specimen_id=1241_BGV4" \
    "flowcell=A23TY32LT4" "sample_type=normal" > counts_s2.tsv &
probe_counts -m frac -t 1 -r "$SHARD3" 1241_BGV4-N1-BDNA-1_A23TY32LT4_1.recalibrated.bam xgen-exome-hyb-panel-v2_AND_altera_v3_probes_short_hg38_AND_cdx_spike_custom30off4x_hg38_AND_foresight_clarity.bed \
    "sample_id=1241_BGV4-N1-BDNA-1_A23TY32LT4_1" "specimen_id=1241_BGV4" \
    "flowcell=A23TY32LT4" "sample_type=normal" > counts_s3.tsv &
probe_counts -m frac -t 1 -r "$SHARD4" 1241_BGV4-N1-BDNA-1_A23TY32LT4_1.recalibrated.bam xgen-exome-hyb-panel-v2_AND_altera_v3_probes_short_hg38_AND_cdx_spike_custom30off4x_hg38_AND_foresight_clarity.bed \
    "sample_id=1241_BGV4-N1-BDNA-1_A23TY32LT4_1" "specimen_id=1241_BGV4" \
    "flowcell=A23TY32LT4" "sample_type=normal" > counts_s4.tsv &
wait

{ head -1 counts_s1.tsv | cut -f2-;
  for f in counts_s*.tsv; do tail -n +2 "$f"; done | sort -t'	' -k1,1n | cut -f2-;
} | gzip > 1241_BGV4-N1-BDNA-1_A23TY32LT4_1_probes.tsv.gz

cat <<-END_VERSIONS > versions.yml
"SOMATIC_CNV_REF_BUILDER:SOMA_CNV_PROBE_COUNTS":
    soma-cnv: 20260604-3cb5ec5
END_VERSIONS