-
Notifications
You must be signed in to change notification settings - Fork 735
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
New Module: NACHO_QC #7108
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6403ef8
initialize module
alanmmobbs93 4a72426
update test
alanmmobbs93 d7b2def
Remove TO-DO from main.nf.test
alanmmobbs93 ae48dad
Remove comment from main.nf.test
alanmmobbs93 edbbb16
update test after meta component in output channels
alanmmobbs93 256ade3
split channel into png and txt outputs
alanmmobbs93 c640ba5
update meta file
alanmmobbs93 c9f2aa9
Merge branch 'master' into newmodule_nachoQC
alanmmobbs93 490a4de
move moduleBinaries to test nextflow config
alanmmobbs93 f349246
Merge branch 'master' into newmodule_nachoQC
alanmmobbs93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
nextflow.enable.moduleBinaries = true | ||
|
||
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.png"), emit: nacho_qc_png | ||
tuple val(meta), path("*_mqc.txt"), emit: nacho_qc_txt | ||
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_with_outliers.html | ||
touch AVG_vs_BD_mqc.png | ||
touch AVG_vs_MED_mqc.png | ||
touch BD_mqc.png | ||
touch FOV_mqc.png | ||
touch HKF_mqc.png | ||
touch HK_mqc.png | ||
touch LOD_mqc.png | ||
touch Neg_mqc.png | ||
touch PCA1_vs_PCA2_mqc.png | ||
touch PCAi_mqc.png | ||
touch PCA_mqc.png | ||
touch plot_normf_mqc.png | ||
touch Posctrl_linearity_mqc.png | ||
touch POSF_vs_NEGF_mqc.png | ||
touch Pos_mqc.png | ||
touch Pos_vs_neg_mqc.png | ||
touch normalized_qc_mqc.txt | ||
touch hk_detected_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 | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
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_png: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test' ] | ||
- "*_mqc.png": | ||
type: file | ||
description: | | ||
Output PNG files | ||
pattern: "*_mqc.png" | ||
- nacho_qc_txt: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test' ] | ||
- "*_mqc.txt": | ||
type: file | ||
description: | | ||
Plain text reports | ||
pattern: "*_mqc.txt" | ||
- versions: | ||
- "versions.yml": | ||
type: file | ||
description: | | ||
File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@alanmmobbs93" | ||
maintainers: | ||
- "@alanmmobbs93" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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