Giter VIP home page Giter VIP logo

nf_modules_sagc's Introduction

modules

Nextflow modules used in SAGC Nextflow pipelines.

Coding guidelines

These guidelines were adapted from UMCUGenetics.

See utils/template.nf for a process template which uses the following guidelines.

  • Use the Tool/version/Command.nf folder structure of this repository.
  • Use the original tool version numbering
  • Use CamelCase for tool, command and process names
  • Use lowercase with words separated by underscores for params, inputs, outputs and scripts.
  • Use 4 spaces per indentation level.
  • All input and output identifiers should reflect their conceptual identity. Use informative names like unaligned_sequences, reference_genome, phylogeny, or aligned_sequences instead of foo_input, foo_file, result, input, output, and so forth.
  • Define two labels for each process, containing toolname, version and command separated by an underscore.
    • BWA_0.7.17
    • BWA_0.7.17_MEM
  • Define a tag to each process, containing toolname, command, sample_id and/or rg_id.
    • {"BWA MEM ${sample_id} - ${rg_id}"}
  • Add 'set -euo pipefail' to each process.
    • shell = ['/bin/bash', '-euo', 'pipefail']
  • Do not define any runtime settings like cpus, memory and time.
  • Set process parameters on include:
    • include process from 'path/to/process.nf' params(optional: '')
  • Use separate process input channels as much as possible. Use tuples for linked inputs only.
input:
    val(analysis_id)
    tuple(sample_id, path(bam), path(bai))
  • Define named process output channels. This ensures that outputs can be referenced in external scope by their respective names. Indicate whether an output channel is optional.
output:
    path("my_file.txt", emit: my_file)
    path("my_optional_file.txt",  optional: my_optional_file, emit: my_optional_file)
  • Use params for resource files, for example genome.fasta, database.vcf.

nf_modules_sagc's People

Contributors

a-lud avatar ashleethomson avatar jimmybgammyknee 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.