-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new module wisecondorx/gender (#3333)
* new module wisecondorx/gender * fix linting
- Loading branch information
Showing
6 changed files
with
141 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
process WISECONDORX_GENDER { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. | ||
conda "bioconda::wisecondorx=1.2.5" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/wisecondorx:1.2.5--pyh5e36f6f_0': | ||
'quay.io/biocontainers/wisecondorx:1.2.5--pyh5e36f6f_0' }" | ||
|
||
input: | ||
tuple val(meta), path(npz) | ||
tuple val(meta2), path(reference) | ||
|
||
output: | ||
tuple val(meta), stdout , emit: gender | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def VERSION = '1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
|
||
""" | ||
WisecondorX gender \\ | ||
${npz} \\ | ||
${reference} | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
wisecondorx: ${VERSION} | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def VERSION = '1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
|
||
""" | ||
echo male | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
wisecondorx: ${VERSION} | ||
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,47 @@ | ||
name: "wisecondorx_gender" | ||
description: Returns the gender of a .npz resulting from convert, based on a Gaussian mixture model trained during the newref phase | ||
keywords: | ||
- copy number analysis | ||
- gender determination | ||
- npz | ||
tools: | ||
- "wisecondorx": | ||
description: "WIthin-SamplE COpy Number aberration DetectOR, including sex chromosomes" | ||
homepage: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" | ||
documentation: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" | ||
tool_dev_url: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" | ||
doi: "10.1093/nar/gky1263" | ||
licence: "['Attribution-NonCommercial-ShareAlike CC BY-NC-SA']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- npz: | ||
type: file | ||
description: Single sample NPZ file (from which to determine the gender) | ||
pattern: "*.npz" | ||
- reference: | ||
type: file | ||
description: Reference NPZ file | ||
pattern: "*.npz" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- gender: | ||
type: string | ||
description: The gender of the input NPZ file | ||
pattern: "(fe)?male" | ||
|
||
authors: | ||
- "@nvnieuwk" |
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,31 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { WISECONDORX_GENDER } from '../../../../../modules/nf-core/wisecondorx/gender/main.nf' | ||
include { WISECONDORX_CONVERT } from '../../../../../modules/nf-core/wisecondorx/convert/main.nf' | ||
|
||
workflow test_wisecondorx_gender { | ||
|
||
input = Channel.of([ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam_bai'], checkIfExists: true) | ||
]) | ||
|
||
WISECONDORX_CONVERT( | ||
input, | ||
[[], []], | ||
[[], []] | ||
) | ||
|
||
reference = [ | ||
[ id: "reference" ], | ||
file("reference.npz") | ||
] | ||
|
||
WISECONDORX_GENDER( | ||
WISECONDORX_CONVERT.out.npz, | ||
reference | ||
) | ||
} |
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 @@ | ||
process { | ||
|
||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
|
||
} |
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,7 @@ | ||
- name: "wisecondorx gender" | ||
command: nextflow run ./tests/modules/nf-core/wisecondorx/gender -entry test_wisecondorx_gender -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/wisecondorx/gender/nextflow.config -stub | ||
tags: | ||
- "wisecondorx" | ||
- "wisecondorx/gender" | ||
files: | ||
- path: "output/wisecondorx/versions.yml" |