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 wisecondorx/gender #3333

Merged
merged 2 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions modules/nf-core/wisecondorx/gender/main.nf
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
"""
}
47 changes: 47 additions & 0 deletions modules/nf-core/wisecondorx/gender/meta.yml
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"
12 changes: 8 additions & 4 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1571,14 +1571,14 @@ glnexus:
- modules/nf-core/glnexus/**
- tests/modules/nf-core/glnexus/**

goat/taxonsearch:
- modules/nf-core/goat/taxonsearch/**
- tests/modules/nf-core/goat/taxonsearch/**

gnu/sort:
- modules/nf-core/gnu/sort/**
- tests/modules/nf-core/gnu/sort/**

goat/taxonsearch:
- modules/nf-core/goat/taxonsearch/**
- tests/modules/nf-core/goat/taxonsearch/**

goleft/indexsplit:
- modules/nf-core/goleft/indexsplit/**
- tests/modules/nf-core/goleft/indexsplit/**
Expand Down Expand Up @@ -3745,6 +3745,10 @@ wisecondorx/convert:
- modules/nf-core/wisecondorx/convert/**
- tests/modules/nf-core/wisecondorx/convert/**

wisecondorx/gender:
- modules/nf-core/wisecondorx/gender/**
- tests/modules/nf-core/wisecondorx/gender/**

wisecondorx/newref:
- modules/nf-core/wisecondorx/newref/**
- tests/modules/nf-core/wisecondorx/newref/**
Expand Down
31 changes: 31 additions & 0 deletions tests/modules/nf-core/wisecondorx/gender/main.nf
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
)
}
5 changes: 5 additions & 0 deletions tests/modules/nf-core/wisecondorx/gender/nextflow.config
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()}" }

}
7 changes: 7 additions & 0 deletions tests/modules/nf-core/wisecondorx/gender/test.yml
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"