Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Module: NACHO_QC #7108

Merged
merged 10 commits into from
Nov 29, 2024
12 changes: 12 additions & 0 deletions modules/nf-core/nacho/qc/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
channels:
- conda-forge
- bioconda

dependencies:
- conda-forge::r-dplyr=1.1.4
- conda-forge::r-fs=1.6.4
- conda-forge::r-ggplot2=3.4.4
- conda-forge::r-nacho=2.0.6
- conda-forge::r-optparse=1.7.5
- conda-forge::r-readr=2.1.5
- conda-forge::r-tidyr=1.3.0
60 changes: 60 additions & 0 deletions modules/nf-core/nacho/qc/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
nextflow.enable.moduleBinaries = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to have this added into the tests/nextflow.config file and then adding the line "config "./nextflow.config" to the main.nf.test file. Just because the docs https://www.nextflow.io/docs/latest/module.html#module-binaries say to add them in the config or pipeline file, and also because no other module seems to set this type of parameters directly in the main.nf file


process NACHO_QC {
tag "${meta.id}"
label 'process_single'

conda "${moduleDir}/environment.yml"
container 'community.wave.seqera.io/library/r-dplyr_r-fs_r-ggplot2_r-nacho_pruned:033bc017f5f36b6d'

input:
tuple val(meta) , path(rcc_files, stageAs: "input/*")
tuple val(meta2), path(sample_sheet)

output:
tuple val(meta), path("*.html") , emit: nacho_qc_reports
tuple val(meta), path("*_mqc.*"), emit: nacho_qc_multiqc_metrics
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''

"""
nacho_qc.R \\
--input_rcc_path input \\
--input_samplesheet ${sample_sheet}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
r-nacho: \$(Rscript -e "library(NACHO); cat(as.character(packageVersion('NACHO')))")
r-dplyr: \$(Rscript -e "library(dplyr); cat(as.character(packageVersion('dplyr')))")
r-ggplot2: \$(Rscript -e "library(ggplot2); cat(as.character(packageVersion('ggplot2')))")
r-tidyr: \$(Rscript -e "library(tidyr); cat(as.character(packageVersion('tidyr')))")
r-readr: \$(Rscript -e "library(readr); cat(as.character(packageVersion('readr')))")
r-fs: \$(Rscript -e "library(fs); cat(as.character(packageVersion('fs')))")
r-optparse: \$(Rscript -e "library(optparse); cat(as.character(packageVersion('optparse')))")
END_VERSIONS
"""

stub:
"""
touch qc.html
touch qc_mqc.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
r-nacho: \$(Rscript -e "library(NACHO); cat(as.character(packageVersion('NACHO')))")
r-dplyr: \$(Rscript -e "library(dplyr); cat(as.character(packageVersion('dplyr')))")
r-ggplot2: \$(Rscript -e "library(ggplot2); cat(as.character(packageVersion('ggplot2')))")
r-tidyr: \$(Rscript -e "library(tidyr); cat(as.character(packageVersion('tidyr')))")
r-readr: \$(Rscript -e "library(readr); cat(as.character(packageVersion('readr')))")
r-fs: \$(Rscript -e "library(fs); cat(as.character(packageVersion('fs')))")
r-optparse: \$(Rscript -e "library(optparse); cat(as.character(packageVersion('optparse')))")
END_VERSIONS
"""
}
78 changes: 78 additions & 0 deletions modules/nf-core/nacho/qc/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: nacho_qc
description: |
NACHO (NAnostring quality Control dasHbOard) is developed for NanoString nCounter data.
NanoString nCounter data is a messenger-RNA/micro-RNA (mRNA/miRNA) expression assay and works with fluorescent barcodes.
Each barcode is assigned a mRNA/miRNA, which can be counted after bonding with its target.
As a result each count of a specific barcode represents the presence of its target mRNA/miRNA.
keywords:
- nacho
- nanostring
- mRNA
- miRNA
- qc
tools:
- NACHO:
description: |
R package that uses two main functions to summarize and visualize NanoString RCC files,
namely: `load_rcc()` and `visualise()`. It also includes a function `normalise()`, which (re)calculates
sample specific size factors and normalises the data.
For more information `vignette("NACHO")` and `vignette("NACHO-analysis")`
homepage: https://github.com/mcanouil/NACHO
documentation: https://cran.r-project.org/web/packages/NACHO/vignettes/NACHO.html
doi: "10.1093/bioinformatics/btz647"
licence: [ "GPL-3.0" ]
identifier: ""
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- rcc_files:
type: file
description: |
List of RCC files for all samples, which are direct outputs from NanoString runs
pattern: "*.RCC"
- - meta2:
type: map
description: |
Groovy Map containing file information
e.g. [ id:'test_samplesheet' ]
- sample_sheet:
type: "file"
pattern: "*.csv"
description: |
Comma-separated file with 3 columns: RCC_FILE, RCC_FILE_NAME, and SAMPLE_ID
output:
- nacho_qc_reports:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- "*.html":
type: file
description: |
HTML report
pattern: "*.html"
- nacho_qc_multiqc_metrics:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test' ]
- "*_mqc.*":
type: file
description: |
Plain text report
pattern: "*_mqc.*"
- versions:
- "versions.yml":
type: file
description: |
File containing software versions
pattern: "versions.yml"
authors:
- "@alanmmobbs93"
maintainers:
- "@alanmmobbs93"
Loading
Loading