nf-core tools

repository·main·Indexed 43 days ago

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

A Python package providing helper tools for the nf-core community, available as a CLI and importable library. Version 4.1.0 includes utilities for linting nf-core pipelines, modules, and subworkflows to ensure adherence to project quality and structural standards. It features a configurable .nf-core.yml system and a comprehensive API for pipeline and module validation.

Tokens
18.7K
Snippets
74
Records
136
Agent score
50%

What's inside nf-core

  1. Access {{ name }} documentation

    main

    The documentation for the {{ name }} pipeline is organized into several key sections to help you understand its operation and results:

    • Usage: Provides an overview of the pipeline workflow, instructions on how to execute it, and a detailed reference for all available command-line flags.
    • Output: Explains the various results and files produced by the pipeline and provides guidance on how to interpret them.

    If this is an official nf-core pipeline, additional comprehensive guides for installing, configuring, and running nf-core pipelines can be found at https://nf-co.re.

  2. Understand the output structure of {{ name }}

    main

    The pipeline produces results in a dedicated results directory. All output paths are relative to the top-level results directory. The specific contents depend on which modules (like FastQC or MultiQC) are enabled in the pipeline configuration.

    Common output categories include:

    • QC Results: Individual tool reports (e.g., FastQC).
    • Aggregate Reports: Summarized reports (e.g., MultiQC).
    • Pipeline Information: Execution metrics, software versions, and parameters used during the run.
  3. Understand the nf-core Code of Conduct scope and expectations

    main

    The nf-core Code of Conduct (CoC) applies to all community members and attendees across all nf-core workspaces and events.

    Applicable Workspaces

    • Official project email addresses.
    • nf-core Slack channels.
    • nf-core organized hackathons and workshops (online or in-person).
    • Collaborative work on GitHub, Google Suite, and community calls.
    • Mentorship meetings and email correspondence.
    • nf-core gather.town workspaces.
    • Web-based platforms used for events (Zoom, Jitsi, YouTube live, etc.).
    • Representing nf-core on social media (both official and personal accounts).

    Expected Behaviors (nf-core cares 😊)

    • Use welcoming and inclusive language (e.g., displaying chosen pronouns on Zoom or Slack).
    • Ask for consent before sharing personal information or photographs of others.
    • Demonstrate empathy and provide clear, kind communication.
    • Respect differing viewpoints and focus on what is best for the community.
    • Show appreciation and celebrate accomplishments.

    Prohibited Behaviors (nf-core frowns on 😕)

    • Deliberate intimidation, stalking, or sustained disruption of communication.
    • "Doxing" (posting or threatening to post personal identifying information).
    • Spamming or trolling.
    • Use of sexual or discriminatory imagery, comments, or jokes.
    • Verbal or text comments that reinforce structures of domination (related to gender, race, ability, etc.).
    • Taking screenshots of individuals during video calls without explicit consent.
  4. Configure the .nf-core.yml file

    main

    The .nf-core.yml file located at the root of an nf-core repository defines how nf-core tools behave for that specific repository. The configuration is loaded via load_tools_config() and must adhere to the NFCoreYamlConfig schema. The configuration behavior changes based on the repository_type specified.

    # Example for a pipeline repository
    repository_type: pipeline
    nf_core_version: "4.0.2"
  5. Quick start for contributing to an nf-core pipeline

    main

    To contribute code to an nf-core pipeline, follow these steps:

    1. Prerequisites: Ensure Nextflow, nf-core tools, and nf-test are installed.
    2. Issue Tracking: Check for an existing GitHub issue regarding your change. If none exists, create one.
    3. Fork & Branch: Fork the repository and create a new branch. For major bug fixes, name your branch patch and follow the patch release process.
    4. Development: Make changes following pipeline conventions (e.g., updating documentation, using nf-core/tools to update nextflow_schema.json, and updating CITATIONS.md).
    5. Testing: Run and update tests using nf-test.
    6. Linting: Use nf-core/tools to lint your code.
    7. Pull Request: Submit a PR against the dev branch and request a review.
  6. Run Nextflow in the background

    main

    Because the Nextflow process must remain running until the workflow is finished, you can use the -bg flag to launch Nextflow in the background. This detaches the process from your terminal so the workflow continues even if you log out. Logs are saved to a file.

    Alternatively, you can use terminal multiplexers like screen or tmux, or submit the Nextflow process itself as a job to your cluster's job scheduler.

    nextflow run <pipeline> -bg
  7. Set up nf-core for development

    main

    If you are contributing to the repository, follow these steps to set up your local development environment using uv:

    1. Synchronize the project dependencies:

      uv sync
    2. You can either activate the virtual environment:

      source .venv/bin/activate
    3. Or run commands directly without activation using uv run:

      uv run nf-core --help
    uv sync
    
    # Activate the virtual environment
    source .venv/bin/activate
    
    # Or use uv run to run commands without activating
    uv run nf-core --help
  8. How to report a Code of Conduct violation in nf-core

    main

    If you experience or witness behavior that violates the nf-core Code of Conduct, you should report it as soon as possible.

    Reporting Channels

    • Slack: Direct message a member of the Safety Team (Saba Nafees, Cris Tuñí, or Michael Heuer) or any nf-core core team member.
    • Email: Send a report to safety [at] nf-co [dot] re.

    What to include in your report

    To help the Safety Team investigate, please include as much of the following as possible:

    • Your contact information.
    • Identifying information (names, nicknames, or pseudonyms) of the person who violated the CoC.
    • A description of the behavior and the circumstances of the incident.
    • The approximate time the behavior occurred.
    • Other people involved in the incident.
    • Whether you believe the incident is ongoing.
    • Any publicly available records (e.g., screenshots, mailing list records).
    • Any additional relevant information.

    Confidentiality and Handling

    • Reports are handled with discretion and confidentiality.
    • The Safety Team will review the report to determine if immediate action is required and if a violation occurred.
    • If you wish to keep your initial report confidential from specific Safety Team members (e.g., due to a conflict of interest), please specify which members you do not consent to sharing the information with when you submit your report via direct message or email.
  9. Customize resource requests for pipeline steps

    main

    Each pipeline step has default requirements for CPUs, memory, and time. If a job fails with specific error codes, the pipeline automatically attempts resubmission with increased resources (2x original, then 3x original) before stopping.

    To override these defaults with your own resource requirements, you should use Nextflow configuration files. For detailed implementation, refer to the nf-core documentation on customizing process resources.