Variant calling with OQFE pipeline on cluster systems

public public 8mo ago 0 bookmarks

Description

This workflow modifies the docker version of the OQFE workflow so that it can be executed on a cluster system using singularity. It addresses a few problems with the original pipeline, which is designed to be executed on a single server or virtual machine.

Running environment

This workflow is designed to be executed on a cluster system (SLURM, PBS etc) using singularity.

Code Snippets

20
21
[ -f ${bin_dir}/oqfe_${oqfe_version}.sif ] || \
  singularity pull docker://dnanexus/oqfe:${oqfe_version}
SoS Notebook Singularity Hub From line 20 of oqfe_pipeline_cluster.ipynb
23
24
[ -f ${bin_dir}/deepvariant_${deep_variant_version}.sif ] || \
  singularity pull docker://google/deepvariant:${deep_variant_version}
SoS Notebook Singularity Hub From line 23 of oqfe_pipeline_cluster.ipynb
26
27
[ -f ${bin_dir}/deepvariant_${deep_variant_version}-gpu.sif ] || \
  singularity pull docker://google/deepvariant:${deep_variant_version}-gpu
SoS Notebook Singularity Hub From line 26 of oqfe_pipeline_cluster.ipynb
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
set -e

mkdir -p ${work_dir}
#
singularity exec --home ${work_dir} -W ${work_dir} \
  --bind "${source_dir}":/source_dir \
  --bind "${reference_dir}":/reference_dir \
  --bind "${bin_dir}":/oqfe_bin \
  ${bin_dir}/oqfe_${oqfe_version}.sif python3.6 /oqfe_bin/oqfe_mem \
      --forward-reads /source_dir/${_input:b} \
      --num-cores 32 --memory 60000 \
      --sample ${sample_id} --reuse-existing-outputs \
      --cram-reference-fasta  /reference_dir/GRCh38_full_analysis_set_plus_decoy_hla.fa
# remove intermediate files, move output
[ -f ${work_dir}/output/${sample_id}.oqfe.cram ] && mv ${work_dir}/output/* ${oqfe_output_dir} && rm -rf ${work_dir}
SoS Notebook Singularity Hub From line 55 of oqfe_pipeline_cluster.ipynb
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
mkdir -p ${deep_variant_output_dir}
# https://github.com/google/deepvariant/blob/r1.6/docs/deepvariant-quick-start.md
singularity run \
  --bind "${source_dir}":/input \
  --bind "${deep_variant_output_dir}":/output \
  --bind "${reference_dir}":/reference \
  --nv \
  ${bin_dir}/deepvariant_${deep_variant_version}-gpu.sif \
  /opt/deepvariant/bin/run_deepvariant \
      --model_type WGS \
      --ref /reference/GRCh38_full_analysis_set_plus_decoy_hla.fa \
      --reads /input/${sample_id}.oqfe.cram \
      --output_vcf /output/${sample_id}.output.vcf.gz \
      --output_gvcf /output/${sample_id}.output.g.vcf.gz \
      --num_shards 32 \
      --intermediate_results_dir /output/intermediate_results_dir
SoS Notebook Singularity Hub From line 86 of oqfe_pipeline_cluster.ipynb
ShowHide 4 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Adapt the workflow for your environment.
public 5mo ago 0 requests Variant calling with OQFE pipeline on cluster systems

The workflow is executed from a SoS workflow system on Jupyter Notebook. I can help run the workflow on your cluster.

$100.00
1 day delivery
Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

$100.00

Free for pro members

Files Included

Created: 8mo ago
Updated: 8mo ago
Maitainers: public bopeng
Name: oqfe-on-cluster
Version: 1
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Accessed: 207
Downloaded: 1
Copyright: Owned by public
License: Non-Open License

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...