-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev_tmp' into newfeature_validate_model
- Loading branch information
Showing
29 changed files
with
1,575 additions
and
88 deletions.
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ on: | |
branches: | ||
- dev | ||
- master | ||
- dev_tmp | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::r-shinyngs=2.0.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,45 @@ | ||
process SHINYNGS_VALIDATEFOMCOMPONENTS { //TODO this module and whole folder should be deleted once https://github.com/nf-core/differentialabundance/issues/362 is closed, is replaced by the nf-core version of it. | ||
tag "$sample" | ||
label 'process_single' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "community.wave.seqera.io/library/r-shinyngs_r-yaml:aa63537f6db6190c" | ||
|
||
input: | ||
tuple val(meta), path(sample), path(assay_files) | ||
tuple val(meta2), path(feature_meta) | ||
tuple val(meta3), path(contrasts) | ||
|
||
output: | ||
tuple val(meta), path("*/*.sample_metadata.tsv") , emit: sample_meta | ||
tuple val(meta), path("*/*.feature_metadata.tsv") , emit: feature_meta, optional: true | ||
tuple val(meta), path("*/*.assay.tsv") , emit: assays | ||
tuple val(meta), path("*/*.contrasts_file.tsv") , emit: contrasts | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
// For full list of available args see | ||
// https://github.com/pinin4fjords/shinyngs/blob/develop/exec/validate_fom_components.R | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: meta.id | ||
def feature = feature_meta ? "--feature_metadata '$feature_meta'" : '' | ||
|
||
""" | ||
validate_fom_components_yaml.R \\ | ||
--sample_metadata "$sample" \\ | ||
$feature \\ | ||
--assay_files "${assay_files.join(',')}" \\ | ||
--contrasts_file "$contrasts" \\ | ||
--output_directory "$prefix" \\ | ||
$args | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') | ||
r-shinyngs: \$(Rscript -e "library(shinyngs); cat(as.character(packageVersion('shinyngs')))") | ||
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,100 @@ | ||
name: "shinyngs_validatefomcomponents" | ||
description: validate consistency of feature and sample annotations with matrices | ||
and contrasts | ||
keywords: | ||
- expression | ||
- features | ||
- observations | ||
- validation | ||
tools: | ||
- "shinyngs": | ||
description: "Provides Shiny applications for various array and NGS applications. | ||
Currently very RNA-seq centric, with plans for expansion." | ||
homepage: "https://github.com/pinin4fjords/shinyngs" | ||
documentation: "https://rawgit.com/pinin4fjords/shinyngs/master/vignettes/shinyngs.html" | ||
tool_dev_url: "https://github.com/pinin4fjords/shinyngs" | ||
licence: ["AGPL v3"] | ||
identifier: "" | ||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing information on experiment, at a minimum an id. | ||
e.g. [ id:'test' ] | ||
- sample: | ||
type: file | ||
description: | | ||
CSV-format sample sheet with sample metadata | ||
- assay_files: | ||
type: file | ||
description: | | ||
List of TSV-format matrix files representing different measures for the same samples (e.g. raw and normalised). | ||
- - meta2: | ||
type: map | ||
description: | | ||
Groovy Map containing information on features. | ||
e.g. [ id:'test' ] | ||
- feature_meta: | ||
type: file | ||
description: | | ||
TSV-format feature (e.g. gene) metadata | ||
- - meta3: | ||
type: map | ||
description: | | ||
Groovy Map containing information on contrasts. | ||
e.g. [ id:'test' ] | ||
- contrasts: | ||
type: file | ||
description: | | ||
CSV-format file with four columns identifying the sample sheet variable, reference level, treatment level, and optionally a comma-separated list of covariates used as blocking factors. | ||
output: | ||
- sample_meta: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing information on experiment. | ||
e.g. [ id:'test' ] | ||
- "*/*.sample_metadata.tsv": | ||
type: file | ||
description: File containing validated sample metadata | ||
pattern: "/*.sample_metadata.tsv" | ||
- feature_meta: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing information on experiment. | ||
e.g. [ id:'test' ] | ||
- "*/*.feature_metadata.tsv": | ||
type: file | ||
description: File containing validated feature metadata | ||
pattern: "/*.feature_metadata.tsv" | ||
optional: true | ||
- assays: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing information on experiment. | ||
e.g. [ id:'test' ] | ||
- "*/*.assay.tsv": | ||
type: file | ||
description: Files containing validated matrices | ||
pattern: "/*.assay.tsv" | ||
- contrasts: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing information on experiment. | ||
e.g. [ id:'test' ] | ||
- "*/*.contrasts_file.tsv": | ||
type: file | ||
description: Files containing validated matrices | ||
pattern: "/*.contrasts_file.tsv" | ||
- versions: | ||
- versions.yml: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@pinin4fjords" | ||
maintainers: | ||
- "@pinin4fjords" |
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,6 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
|
||
dependencies: | ||
- conda-forge::gawk=5.1.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
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,41 @@ | ||
name: tabular_to_gsea_chip | ||
description: Convert tabular data into GSEA-compatible CHIP files. | ||
keywords: | ||
- GSEA | ||
- CHIP | ||
- Bioinformatics | ||
tools: | ||
- gawk: | ||
description: | | ||
GNU Awk (gawk) is a powerful programming language designed for text processing and typically used as a data extraction and reporting tool. | ||
It is used here to manipulate tabular data and create the CHIP file format. | ||
homepage: https://www.gnu.org/software/gawk/ | ||
documentation: https://www.gnu.org/software/gawk/manual/ | ||
licence: ["GPL-3.0-or-later"] | ||
input: | ||
- tsv: | ||
type: file | ||
description: | | ||
Tab-separated values (TSV) file containing data to be converted into a CHIP file. | ||
- - id: | ||
type: string | ||
description: | | ||
Feature ID attribute in the abundance table as well as in the GTF file (e.g. the gene_id field). | ||
- symbol: | ||
type: string | ||
description: | | ||
Feature name attribute in the abundance table as well as in the GTF file (e.g. the gene symbol field). | ||
output: | ||
- chip: | ||
type: file | ||
description: Generated GSEA-compatible CHIP file. | ||
pattern: "*.chip" | ||
- versions: | ||
- versions.yml: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@pinin4fjords" # Replace with actual author handles | ||
maintainers: | ||
- "@nschcolnicov" |
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,49 @@ | ||
nextflow_process { | ||
|
||
name "Test Process TABULAR_TO_GSEA_CHIP" | ||
script "../main.nf" | ||
process "TABULAR_TO_GSEA_CHIP" | ||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "tabular_to_gsea_chip" | ||
|
||
test("test_tabular_to_gsea_chip") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.fromPath("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/differentialabundance/modules_testdata/Mus_musculus.anno.feature_metadata.tsv") | ||
input[1] = ["gene_id", "gene_name"] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() }, | ||
) | ||
} | ||
} | ||
|
||
test("test_tabular_to_gsea_chip - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.fromPath("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/differentialabundance/modules_testdata/Mus_musculus.anno.feature_metadata.tsv") | ||
input[1] = ["gene_id", "gene_name"] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() }, | ||
) | ||
} | ||
} | ||
} |
Oops, something went wrong.