Coder Social home page Coder Social logo

parabricks-nextflow's Introduction

Parabricks-NextFlow

August 2023

Overview

This repo contains experimental code for running Nvidia Clara Parabricks in NextFlow.

Getting Started

After cloning this repository, you'll need to download the Parabricks container from NGC, and update the local.nf.conf with the correct container TAG, as well as a Parabricks cloud-compatible docker container to run. In addition, you should have at least one Parabricks compatible GPU, 12 CPU cores, and 64 GB of RAM to expect to be able to test. Two GPUs are required for running Parabricks in production.

Set up and environment

Parabricks-nextflow requires the following dependencies:

  • Docker
  • nvidia-docker
  • NextFlow

After installing these tools, you will need a cloud-compatible Parabricks container from NGC.

Running fq2bam locally

The Parabricks fq2bam tool is an accelerated BWA mem implementation. The tool also includes BAM sorting, duplicate marking, and optionally Base Quality Score Recalibration (BQSR). The fq2bam.nf script in this repository demonstrates how to run this tool with a set of input reads, producing a BAM file, its BAI index and a BQSR report for use with HaplotypeCaller.

Below is an example command line for running the fq2bam.nf script:

~/nextflow run \
    -c config/local.nf.conf \
    -params-file example_inputs/test.fq2bam.json \
    -with-docker 'gcr.io/clara-lifesci/parabricks-cloud:4.0.0-1.beta4' \
    nexflow/fq2bam.nf

Note the following:

  • The config/local.nf.conf configuration file defines the GPU-enabled local label and should be passed for local runs.
  • The -with-docker command is required and should point to a valid Parabricks cloud-compatible Docker container. It must have no Entrypoint (i.e., ENTRYPOINT bash) and one should note the path to Parabricks within the container.
  • The -params-file argument allows using a JSON stub for program arguments (rather than the command line). We recommend this way of invoking nextflow as it is easier to debug and more amenable to batch processing.

Running the germline example

~/nextflow run \
    -c config/local.nf.conf \
    -params-file example_inputs/test.germline.json \
    -with-docker 'gcr.io/clara-lifesci/parabricks-cloud:4.0.0-1.beta4' \
    nextflow/germline_calling.nf

Running the DeepVariant example

    -c config/local.nf.conf \
    -params-file example_inputs/test.deepvariant.json \
    nextflow/deepvariant.nf \
    --mode 'shortread' \
    --deepvariant_args "-L chr1 -L chr2:10000"

The --deepvariant_args helps you use come of DeepVariant options. In this example we added -L with the interval within which to call the variants from the BAM/CRAM file.

parabricks-nextflow's People

Contributors

edawson avatar mdemouth avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.