Whole-genome sequencing analysis with nf-core/sarek and VerifyBamID2 contamination QC on a Slurm cluster.
All scripts and commands should be run from the repository root because paths are relative.
config/
nextflow.example.config
nextflow.local.config
sarek.params.yaml
verifybamid.params.yaml
samplesheet.csv
scripts/
run_sarek.sbatch
submit_sarek.sh
setup_verifybamid.sh
verifybamid.nf
run_verifybamid.sbatch
submit_verifybamid.sh
calculate_checksums.sh
box_upload.sh
download_gdrive_files.sh
results/
sarek/
verifybamid/
- Nextflow, loaded through the cluster module system
- Slurm
- Singularity available inside submitted jobs
curlfor downloading VerifyBamID2 reference files
Create a local Nextflow configuration:
cp config/nextflow.example.config config/nextflow.local.configEdit config/nextflow.local.config for the local Slurm environment.
Optional .env settings:
SAREK_VERSION="3.9.0"
PROFILE="singularity"
NEXTFLOW_CONFIG="config/nextflow.local.config"
NXF_SINGULARITY_CACHEDIR="/path/to/singularity/cache"Edit pipeline parameters in:
config/sarek.params.yamlconfig/verifybamid.params.yaml
All paths in these files are relative to the repository root.
./scripts/submit_sarek.shOutputs are written to:
results/sarek/
VerifyBamID2 estimates human-to-human contamination from the final Sarek CRAM.
Edit the variables at the top of scripts/setup_verifybamid.sh, then prepare the input and reference files:
./scripts/setup_verifybamid.shSubmit the workflow:
./scripts/submit_verifybamid.shDo not run the VerifyBamID2 Nextflow command directly on the login node when Singularity is only available inside submitted jobs.
Main outputs:
results/verifybamid/S001.selfSM
results/verifybamid/S001.Ancestry
results/verifybamid/S001.log
Inspect the contamination estimate:
column -t results/verifybamid/S001.selfSMThe relevant field is FREEMIX.
scripts/download_gdrive_files.sh: download FASTQ files from Google Drivescripts/calculate_checksums.sh: calculate checksums for filesscripts/box_upload.sh: upload files to Box.com
Run each helper script from the repository root.
squeue -u "${USER}"
sacct -S today -u "${USER}" --format=JobID,JobName,State,ExitCode,Elapsed,ReasonLogs are stored under logs/.