nf-core/modules

repository·master·Indexed 19 days ago

https://github.com/nf-core/modules

A repository of Nextflow DSL2 module files containing tool-specific process definitions and documentation for community-curated bioinformatics pipelines. It includes detailed guides for configuring and updating modules for tools such as antiSMASH, bcl2fastq, bcl-convert, bwafastalign, bwameme, and Cell Ranger.

Tokens
12.1K
Snippets
38
Records
49
Agent score
65%

What's inside nf-core/modules

  1. Use the DeepVariant module or subworkflow

    master

    DeepVariant can be executed in two ways depending on your requirements:

    1. Subcommand (deepvariant/rundeepvariant): A simpler, single-step execution.
    2. Subworkflow (deepvariant): A multi-step pipeline consisting of three processes. Use this if you need more granular control, such as running callvariants on a GPU.

    The subworkflow components are:

    • makeexamples: Converts input alignment files to tfrecord format.
    • callvariants: Calls variants based on tfrecord inputs (outputs tfrecord).
    • postprocessvariants: Converts tfrecord outputs to VCF and creates GVCF files.
  2. Hardware requirements for NVIDIA Parabricks

    master

    To run Parabricks modules successfully, ensure your environment meets the following minimum specifications:

    • GPU: At least one NVIDIA GPU with at least 16GB vRAM.
    • CPU: At least 8 threads.
    • RAM: At least 30GB RAM.
    • Storage: Fast local storage is highly recommended to prevent I/O bottlenecks.
  3. How Cellranger automatically renames files

    master

    This module addresses common issues with Cellranger input requirements. Cellranger expects FASTQ files to follow the naming convention {sample_name}_S{i}_L00{j}_{R1,R2}_001.fastq.gz and requires the --sample flag to match the prefix.

    To handle non-standard inputs, this module automatically renames files to match this pattern. It assumes that the input files are provided in an ordered channel: file1 R1, file1 R2, file2 R1, file2 R2, .... This order is naturally maintained if files are explicitly listed in a samplesheet or if they follow a sensible naming convention that allows for alphabetical sorting.

  4. Requirements for rnafq2bam and starfusion modules

    master

    Both rnafq2bam and starfusion modules have strict version requirements for their input indices:

    • rnafq2bam: Based on STAR version 2.7.2a. The input STAR index directory must be generated using this specific version.
    • starfusion: Based on STAR-Fusion version 1.7.0. The input STAR-Fusion build indices must be generated using this specific version.

    Examples of compatible workflows can be found in the nextflow.config files within their respective test directories.

  5. Update the Cell Ranger mkfastq Docker container and release a new version

    master

    Because bcl2fastq2 (Illumina) and Cell Ranger (10X Genomics) are commercial tools, their container images are not officially provided or supported by the vendors. To update the versions used in the cellranger/mkfastq module, you must manually download the installers, update the Dockerfile, and build/push a new container image.

    1. Download Installers

    Download the required installers using curl or wget and place them in the same directory as the Dockerfile:

    2. Update Dockerfile

    Edit the Dockerfile to update the environment variables for the desired versions:

    ENV BCL2FASTQ2_VER=<VERSION> \
        CELLRANGER_VER=<VERSION>

    3. Build and Test

    Build the container using the Dockerfile.manual and tag it with the specific Cell Ranger version:

    docker build -f Dockerfile.manual -t quay.io/nf-core/cellrangermkfastq:<CELLRANGER_VERSION> .

    4. Push to Quay.io

    To release the new version, push the image to the nfcore organization on Quay.io. Note that you must request access from a core team member to push to this organization.

    docker push quay.io/nf-core/cellrangermkfastq:<CELLRANGER_VERSION>
  6. Update the cellrangerarc/mkfastq docker container and release a new module

    master

    Because bcl2fastq2 (Illumina) and Cell Ranger Arc (10X Genomics) are commercial tools, their containers are not officially provided or supported. To update the versions used in the cellrangerarc/mkfastq module, you must manually download the installers, update the Dockerfile, and push a new image to Quay.io.

    1. Download installers

    Download the required installers using curl or wget and place them in the same directory as the Dockerfile:

    2. Update the Dockerfile

    Locate the following lines in the Dockerfile and update the version placeholders with your desired versions:

    ENV BCL2FASTQ2_VER=<VERSION> \
        ARC_VER=<VERSION>

    3. Build and test the container

    Build the image locally using the specific Cell Ranger Arc version as the tag:

    docker build . -t quay.io/nf-core/cellranger-arc-mkfastq:<CELLRANGERARC_VERSION>

    4. Push to Quay.io

    To release the update, the container must be pushed to the nfcore organization on Quay.io. You must contact a core team member to obtain the necessary access rights to perform the push:

    docker push quay.io/nf-core/cellranger-arc-mkfastq:<CELLRANGERARC_VERSION>
  7. Migrate from deprecated preprocess_rnaseq subworkflow

    master

    The nf-core/preprocess_rnaseq subworkflow is deprecated due to changes in nf-core subworkflow naming conventions. To ensure compatibility with current naming rules, migrate your pipelines to use the updated subworkflow: nf-core/modules/subworkflows/fastq_qc_trim_filter_setstrandedness.

    For more details on the new naming format requirements, refer to the nf-core guidelines: https://nf-co.re/docs/guidelines/components/subworkflows#name-format-of-subworkflow-files

  8. Update the cellrangeratac/mkfastq Docker container and release a new version

    master

    Because bcl2fastq2 and Cell Ranger ATAC are commercial tools, their container versions must be updated manually. To update the container and prepare a new module release, follow these steps:

    1. Download installers: Download the Linux RPM installer for bcl2fastq2 and the tar ball for Cell Ranger ATAC using curl or wget. Place both files in the same directory as the Dockerfile.
    2. Update Dockerfile: Modify the Dockerfile to reflect the new versions by updating the BCL2FASTQ2_VER and CELLRANGERATAC_VER environment variables.
    3. Build and test: Build the new container image locally to ensure it works.
    4. Push to Quay.io: Request access from a core team member to push the updated image to the nfcore organization on Quay.io.
    # 1. Update versions in Dockerfile
    # ENV BCL2FASTQ2_VER=<VERSION> \
    #     CELLRANGERATAC_VER=<VERSION>
    
    # 2. Build the container
    docker build . -t quay.io/nf-core/cellranger-atac-mkfastq:<CELLRANGERATAC_VERSION>
    
    # 3. Push the container (requires core team access)
    docker push quay.io/nf-core/cellranger-atac-mkfastq:<CELLRANGERATAC_VERSION>
  9. Update the Numorph intensity Docker container and release a new module

    master

    To update the tool version used by this module, you must update the Dockerfile with the latest release information from the Numorph-toolkit repository.

    1. Obtain the latest release link and its corresponding sha256 checksum from the Numorph-toolkit releases page.
    2. Update the following ARG values in the Dockerfile:
      • NUMORPH_PREPROCESSING_VERSION: The new version string.
      • NUMORPH_PREPROCESSING_URL: The new download URL for the release.
      • NUMORPH_PREPROCESSING_SHA256: The manual SHA256 checksum of the new binary file.
    3. Open a Pull Request against the nf-core/modules repository. Upon merging, the Docker image will be automatically built and uploaded to quay.io/nf-core/numorph_preprocessing.
    - ARG NUMORPH_PREPROCESSING_VERSION="1.0.0"
    + ARG NUMORPH_PREPROCESSING_VERSION="<New version>"
    - ARG NUMORPH_PREPROCESSING_URL="https://github.com/qbic-pipelines/Numorph-toolkit/releases/download/1.0.0/numorph_preprocessing"
    + ARG NUMORPH_PREPROCESSING_URL="<New release>"
    - ARG NUMORPH_PREPROCESSING_SHA256="2adecf1af4a7d362eca7ab2876e017034c4b155df10fa3adcca409a4ac47c976"
    + ARG NUMORPH_PREPROCESSING_SHA256="<Manual SHA256 of binary file>"
  10. Update the Xenium Ranger container and release a new module version

    master

    Because Xenium Ranger is a commercial tool from 10X Genomics, the nf-core module container is not officially supported or provided by 10x Genomics. To update the Xenium Ranger version used in the module, you must manually download the software, update the Dockerfile, and rebuild the container.

    Note: You will need access rights to the nfcore organization on Quay/Dockerhub to push the updated image. If you do not have these, contact a core team member.

    # 1. Download the Xenium Ranger tarball to the Dockerfile directory
    # (Use the appropriate URL from the 10x Genomics download page)
    curl -O <XENIUM_RANGER_TARBALL_URL>
    
    # 2. Edit the Dockerfile to update the Xenium Ranger version
    
    # 3. Build and tag the new container
    docker build . -t quay.io/nf-core/xeniumranger:<VERSION>
    
    # 4. Push the container to the nfcore organization
    docker push quay.io/nf-core/xeniumranger:<VERSION>
  11. Update the Cell Ranger Arc container and release a new module version

    master

    Because Cell Ranger Arc is a commercial tool from 10X Genomics, the container for the cellranger-arc nf-core module is not officially provided or supported by 10x Genomics. To update the software version within the container and release a new module version, follow these steps:

    1. Download the software: Navigate to the Cell Ranger Arc installation page and download the tarball for the desired version using curl or wget. Place the downloaded file in the same directory as the Dockerfile.
    2. Update the Dockerfile: Locate the ENV CELLRANGER_ARC_VER line in the Dockerfile and update the <VERSION> placeholder to your new version.
    3. Build and test: Build the new container image locally to ensure it works correctly.
    4. Push to Quay.io: Request access from a core team member to push the updated image to the nfcore organization on Quay.io.
    # 1. Download (example)
    curl -O <URL_TO_TARBALL>
    
    # 2. Edit Dockerfile
    # Change ENV CELLRANGER_ARC_VER=<VERSION> to the new version
    
    # 3. Build and test
    docker build . -t quay.io/nf-core/cellranger-arc:<VERSION>
    
    # 4. Push (requires core team access)
    docker push quay.io/nf-core/cellranger-arc:<VERSION>