File Info

Filename
.command.sh
Full Path
s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/5e/4beeef7561e559a12847bcd3f66452/.command.sh
Size
1.3 KB
Attempt
#!/bin/bash -Ceuo pipefail
deconflict_variants.py \
    --chip-vcf HCC1395_BL.scored.vcf.gz --output-chip HCC1395_BL.deconflicted_chip.vcf.gz \
    --germline-vcf HCC1395_BL.germline.harmonized.vcf.gz \
    --somatic-vcf HCC1395_tumor_vs_HCC1395_BL.snv_indel.phased.vep.final.vcf.gz \
    --output-germline HCC1395_BL.deconflicted_germline.vcf.gz \
    --output-somatic HCC1395_BL.deconflicted_somatic.vcf.gz \
    --audit HCC1395_BL.deconfliction_audit.tsv \
    --cosmic-heme cosmic_heme.tsv.gz \


# Chip output only exists when chip VCF was provided
if [ -f HCC1395_BL.deconflicted_chip.vcf.gz ]; then
    tabix -p vcf HCC1395_BL.deconflicted_chip.vcf.gz
fi
if [ -s HCC1395_BL.deconflicted_germline.vcf.gz ]; then
    tabix -p vcf HCC1395_BL.deconflicted_germline.vcf.gz
else
    touch HCC1395_BL.deconflicted_germline.vcf.gz.tbi
fi

# Somatic output may be empty if no somatic VCF was provided
if [ -s HCC1395_BL.deconflicted_somatic.vcf.gz ]; then
    tabix -p vcf HCC1395_BL.deconflicted_somatic.vcf.gz
else
    touch HCC1395_BL.deconflicted_somatic.vcf.gz.tbi
fi

cat <<-END_VERSIONS > versions.yml
"NFCORE_SAREK:SAREK:VCF_DECONFLICT_VARIANTS:DECONFLICT_VARIANTS":
    deconflict_variants: $(deconflict_variants.py --version 2>&1 || echo "1.0.0")
    cyvcf2: $(python -c "import cyvcf2; print(cyvcf2.__version__)")
END_VERSIONS