File Info

Filename
.command.sh
Full Path
s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/76/a8cf801a6b862a9ebb78cfe6f2c9e2/.command.sh
Size
700 bytes
Attempt
#!/bin/bash -Ceuo pipefail
# Create a directory with VAF files for vaf_ncm.py
mkdir vaf_dir
for f in *.vaf; do
    cp "$f" vaf_dir/
done

python /usr/local/NGSCheckMate/vaf_ncm.py -f -I vaf_dir/ -O . -N REGRESSION

# NGSCheckMate has a bug where PDF generation fails silently when the batch
# contains NTC (no template control) samples with zero reads, because R's
# hclust() cannot handle NA values in the correlation matrix.
if [ ! -f "REGRESSION.pdf" ]; then
    touch "REGRESSION.pdf"
fi

cat <<-END_VERSIONS > versions.yml
"DAQ:FASTQ_NGSCHECKMATE:NGSCHECKMATE_VAFNCM":
    ngscheckmate: $(python /usr/local/NGSCheckMate/vaf_ncm.py --help 2>&1 | grep 'NGSCheckMate' | sed 's/.*v//')
END_VERSIONS