Git Product home page Git Product logo

aquascope's Introduction

nf-core/aquascope

GitHub Actions CI Status GitHub Actions Linting Status AWS CI Cite with Zenodo

Nextflow run with conda run with docker run with singularity

Get help on Slack Follow on Twitter Watch on YouTube

NOTE

This project is a successor to the C-WAP pipeline.

Introduction

nf-core/aquascope is a bioinformatics best-practice analysis pipeline for early detection of SC2 variants of concern via shotgun metagenomic sequencing of wastewater.

The pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The Nextflow DSL2 implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. Where possible, these processes have been submitted to and installed from nf-core/modules in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community!

On release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources. The results obtained from the full-sized test can be viewed on the nf-core website.

Pipeline summary

  1. Read QC (FastQC)
  2. Trimming reads (['Fastp'] (https://github.com/OpenGene/fastp) )
  3. Aligning short reads (['Minimap2] (https://github.com/lh3/minimap2))
  4. Ivar trim aligned reads (['IVAR Trim'] (https://andersen-lab.github.io/ivar/html/manualpage.html))
  5. Classification by Kraken2 (['Kraken2'] (https://ccb.jhu.edu/software/kraken2/)
  6. Freyja Variant classification (['Freyja'] (https://github.com/andersen-lab/Freyja))
  7. Present QC for raw reads (MultiQC)

Quick Start

  1. Install Nextflow (>=22.10.0)

  2. Install any of Docker, Singularity, Podman, Shifter or Charliecloud for full pipeline reproducibility (please only use Conda as a last resort; see docs)

  3. Install a conda environment within your local workspace.

    • For SciComp users, please use module load miniconda3 and create a nextflow environment within your HOME Directory
    • For all other users, please install a local conda from either Anaconda bash script or Miniconda bash script found here: https://conda.io/projects/conda/en/latest/user-guide/install/linux.html
    • Once installation is complete, conda activate && install nextflow('>=22.10.0')
  4. The samplesheet.csv & test_highcoverage_samplesheet.csv is in assets folder, that contains path to samples.

  5. To create additional sample sheets, please use the fastq_dir_to_samplesheet.py - but make sure your sample files have _R1 & _R2.

    • Strandedness has to be determined to generate the samplesheet, if you don't know the strandedness, please check with Wet lab folks who generated the data!
    • In case, you don't have information on strandedness, use "unstranded" (DNA Seq is bydefault Unstranded, While RNA sequencing is usually stranded)
    • CLI, fastq_dir_to_samplesheet.py -st <forward/reverse/unstranded> samplesheet.csv
  6. test.config file already contains path to input, genome fasta, fai, primer (ARCTIC V4_1 primers are used currently), kraken2_human database (default, change as needed)

  7. Download the pipeline and test it on a minimal dataset with a single command:

    nextflow run main.nf -profile test,<docker/singularity/conda/institute> [-with-conda true]
    • If you are using -profile test,conda (or -profile conda on real data) it is necessary to add -with-conda true to your command. This will enable conda to manage environments for your compute environment.
    • Please check nf-core/configs to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use -profile <institute> in your command. This will enable either docker or singularity and set the appropriate execution settings for your local compute environment.
    • If you are using singularity then the pipeline will auto-detect this and attempt to download the Singularity images directly as opposed to performing a conversion from Docker images. If you are persistently observing issues downloading Singularity images directly due to timeout or network issues then please use the --singularity_pull_docker_container parameter to pull and convert the Docker image instead. Alternatively, it is highly recommended to use the nf-core download command to pre-download all of the required containers before running the pipeline and to set the NXF_SINGULARITY_CACHEDIR or singularity.cacheDir Nextflow options to be able to store and re-use the images from a central location for future pipeline runs.
    • If you are using conda, it is highly recommended to use the NXF_CONDA_CACHEDIR or conda.cacheDir settings to store the environments in a central location for future pipeline runs.
    • Special Note: For SciComp users, Please always use "Singularity" for your runs, as docker isn't supported due to firewall/security issues
  8. Start running your own analysis!

    nextflow run main.nf -profile <docker/singularity/conda/institute> --input samplesheet.csv
  9. For Custom Reference files and Inputs, please use the following command:

    nextflow run main.nf -profile <docker/singularity/conda/institute> --input <custom-samplesheet.csv> --outdir <custom-output directory> 
    --fasta <custom_reference> --fai <custom fasta index> --gff <custom annotation file> --bedfile <custom primers> --workdir <always redirect it to scratch space> -bg

Troubleshooting

  1. For conda problems, please check the version of nextflow that is in your local conda environment, it must be '>=22.10.0'

  2. For Singularity issues, please check if you have set the environment variables, if you haven't please do the following:

    export SINGULARITY_CACHE=$HOME/singularity_img
    export TMPDIR=$HOME/tmpdir
    export NF_SINGULARITY_CACHE=$HOME/nf_singularity_img
    export SINGULARITY_TMPDIR=$HOME/singularity_tmpdir
    
  3. For Docker issues, for non-Scicomp users, please check with your sys admin to chart out a course to run this pipeline on your systems

  4. For security certificate issues, reach out to your sys admin to set the ca-certificates (only needed if you didn't already set it up)

    export REQUESTS_CA_BUNDLE=<path to .pem>
    
  5. For java issues, please use the nextflow recommended version and set the environment variable for TMPDIR (refer to 2)

  6. For nextflow issues, check the samplesheet, nextflow version, singularity export commands (refer to 2), java jdk version, command line parameters

Documentation

The nf-core/aquascope pipeline comes with documentation about the pipeline usage, parameters and output.

Credits

nf-core/aquascope was originally written by Arun Boddapati, Hunter Seabolt, SciComp.

We thank the following people for their extensive assistance in the development of this pipeline:

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines.

For further information or help, don't hesitate to get in touch on the Slack #aquascope channel (you can join with this invite).

Citations

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.

aquascope's People

Contributors

hseabolt avatar ethanholleman avatar jessebyoder avatar sswanikcdc 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.