mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-02 20:52:07 -05:00
Add stranger (#1360)
* Add stranger * Add when clause * Update paths * Update modules/stranger/main.nf Co-authored-by: Mahesh Binzer-Panchal <mahesh.binzer-panchal@nbis.se> Co-authored-by: Mahesh Binzer-Panchal <mahesh.binzer-panchal@nbis.se>
This commit is contained in:
parent
7ec09d0ef4
commit
fe4eb459fb
6 changed files with 118 additions and 0 deletions
33
modules/stranger/main.nf
Normal file
33
modules/stranger/main.nf
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
process STRANGER {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_low'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::stranger=0.8.1" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/stranger:0.8.1--pyh5e36f6f_0':
|
||||||
|
'quay.io/biocontainers/stranger:0.8.1--pyh5e36f6f_0' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(vcf)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.gz"), emit: vcf
|
||||||
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
|
when:
|
||||||
|
task.ext.when == null || task.ext.when
|
||||||
|
|
||||||
|
script:
|
||||||
|
def args = task.ext.args ?: ''
|
||||||
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
"""
|
||||||
|
stranger \\
|
||||||
|
$args \\
|
||||||
|
$vcf | gzip --no-name > ${prefix}.vcf.gz
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
stranger: \$( stranger --version )
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
44
modules/stranger/meta.yml
Normal file
44
modules/stranger/meta.yml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
name: stranger
|
||||||
|
description: Annotates output files from ExpansionHunter with the pathologic implications of the repeat sizes.
|
||||||
|
keywords:
|
||||||
|
- STR
|
||||||
|
- repeat_expansions
|
||||||
|
- annotate
|
||||||
|
- vcf
|
||||||
|
tools:
|
||||||
|
- stranger:
|
||||||
|
description: Annotate VCF files with str variants
|
||||||
|
homepage: https://github.com/moonso/stranger
|
||||||
|
documentation: https://github.com/moonso/stranger
|
||||||
|
tool_dev_url: https://github.com/moonso/stranger
|
||||||
|
doi: "10.5281/zenodo.4548873"
|
||||||
|
licence: ['MIT']
|
||||||
|
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- vcf:
|
||||||
|
type: file
|
||||||
|
description: VCF with repeat expansions
|
||||||
|
pattern: "*.{vcf.gz,vcf}"
|
||||||
|
|
||||||
|
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"
|
||||||
|
- vcf:
|
||||||
|
type: file
|
||||||
|
description: annotated VCF with keys STR_STATUS, NormalMax and PathologicMin
|
||||||
|
pattern: "*.{vcf.gz}"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@ljmesi"
|
|
@ -1565,6 +1565,10 @@ star/genomegenerate:
|
||||||
- modules/star/genomegenerate/**
|
- modules/star/genomegenerate/**
|
||||||
- tests/modules/star/genomegenerate/**
|
- tests/modules/star/genomegenerate/**
|
||||||
|
|
||||||
|
stranger:
|
||||||
|
- modules/stranger/**
|
||||||
|
- tests/modules/stranger/**
|
||||||
|
|
||||||
strelka/germline:
|
strelka/germline:
|
||||||
- modules/strelka/germline/**
|
- modules/strelka/germline/**
|
||||||
- tests/modules/strelka/germline/**
|
- tests/modules/strelka/germline/**
|
||||||
|
|
19
tests/modules/stranger/main.nf
Normal file
19
tests/modules/stranger/main.nf
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { EXPANSIONHUNTER } from '../../../modules/expansionhunter/main.nf'
|
||||||
|
include { STRANGER } from '../../../modules/stranger/main.nf'
|
||||||
|
|
||||||
|
workflow test_stranger {
|
||||||
|
|
||||||
|
input = [ [ id:'test', gender:'male' ], // meta map
|
||||||
|
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||||
|
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
|
||||||
|
]
|
||||||
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
||||||
|
variant_catalog = file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true)
|
||||||
|
|
||||||
|
EXPANSIONHUNTER ( input, fasta, variant_catalog )
|
||||||
|
STRANGER ( EXPANSIONHUNTER.out.vcf )
|
||||||
|
}
|
5
tests/modules/stranger/nextflow.config
Normal file
5
tests/modules/stranger/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
13
tests/modules/stranger/test.yml
Normal file
13
tests/modules/stranger/test.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
- name: stranger test_stranger
|
||||||
|
command: nextflow run tests/modules/stranger -entry test_stranger -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- stranger
|
||||||
|
files:
|
||||||
|
- path: output/expansionhunter/test.vcf
|
||||||
|
md5sum: cfd4a1d35c0e469b99eb6aaa6d22de76
|
||||||
|
- path: output/expansionhunter/versions.yml
|
||||||
|
md5sum: f3962a6eecfddf9682414c0f605a885a
|
||||||
|
- path: output/stranger/test.vcf.gz
|
||||||
|
md5sum: bbe15159195681d5c18596d3ad85c78f
|
||||||
|
- path: output/stranger/versions.yml
|
||||||
|
md5sum: 5ec35fd835fb1be50bc3e7c004310fc0
|
Loading…
Reference in a new issue