mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
commit
5affd97cf0
7 changed files with 145 additions and 0 deletions
44
modules/haplocheck/main.nf
Normal file
44
modules/haplocheck/main.nf
Normal file
|
@ -0,0 +1,44 @@
|
|||
process HAPLOCHECK {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::haplocheck=1.3.3" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/haplocheck:1.3.3--h4a94de4_0':
|
||||
'quay.io/biocontainers/haplocheck:1.3.3--h4a94de4_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.txt") , emit: txt
|
||||
tuple val(meta), path("*.html"), emit: html
|
||||
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}"
|
||||
"""
|
||||
haplocheck --raw --out $prefix $vcf
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
haplocheck: \$(echo \$(haplocheck --version 2>&1) | cut -f 2 -d " " )
|
||||
END_VERSIONS
|
||||
"""
|
||||
|
||||
stub:
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
touch ${prefix}.raw.txt
|
||||
touch ${prefix}.html
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
haplocheck: \$(echo \$(haplocheck --version 2>&1) | cut -f 2 -d " " )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
55
modules/haplocheck/meta.yml
Normal file
55
modules/haplocheck/meta.yml
Normal file
|
@ -0,0 +1,55 @@
|
|||
name: "haplocheck"
|
||||
description: |
|
||||
Haplocheck detects contamination patterns in mtDNA AND WGS sequencing studies by analyzing
|
||||
the mitochondrial DNA. Haplocheck also works as a proxy tool for nDNA studies and provides
|
||||
users a graphical report to investigate the contamination further. Internally, it uses the
|
||||
Haplogrep tool, that supports rCRS and RSRS mitochondrial versions.
|
||||
keywords:
|
||||
- mitochondrial
|
||||
- mtDNA
|
||||
- contamination
|
||||
tools:
|
||||
- "haplocheck":
|
||||
description: "Detects in-sample contamination in mtDNA or WGS sequencing studies by analyzing the mitochondrial content."
|
||||
homepage: "https://github.com/genepi/haplocheck"
|
||||
documentation: "https://github.com/genepi/haplocheck"
|
||||
tool_dev_url: "https://github.com/genepi/haplocheck"
|
||||
doi: 10.1101/gr.256545.119
|
||||
licence: "['MIT']"
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
|
||||
- vcf:
|
||||
type: file
|
||||
description: VCF file
|
||||
pattern: "*.{vcf.gz}"
|
||||
|
||||
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"
|
||||
|
||||
- txt:
|
||||
type: file
|
||||
description: Raw report in txt format
|
||||
pattern: "*.{txt}"
|
||||
|
||||
- html:
|
||||
type: file
|
||||
description: Haplocheck HTML report
|
||||
pattern: "*.{html}"
|
||||
|
||||
authors:
|
||||
- "@lmtani"
|
|
@ -967,6 +967,10 @@ hamronization/summarize:
|
|||
- modules/hamronization/summarize/**
|
||||
- tests/modules/hamronization/summarize/**
|
||||
|
||||
haplocheck:
|
||||
- modules/haplocheck/**
|
||||
- tests/modules/haplocheck/**
|
||||
|
||||
happy/happy:
|
||||
- modules/happy/happy/**
|
||||
- tests/modules/happy/happy/**
|
||||
|
|
|
@ -329,6 +329,8 @@ params {
|
|||
test_rnaseq_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf"
|
||||
test_sv_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/sv_query.vcf.gz"
|
||||
|
||||
test_mito_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/NA12878_chrM.vcf.gz"
|
||||
|
||||
test_pytor = "${test_data_dir}/genomics/homo_sapiens/illumina/pytor/test.pytor"
|
||||
|
||||
test_flowcell = "${test_data_dir}/genomics/homo_sapiens/illumina/bcl/flowcell.tar.gz"
|
||||
|
|
15
tests/modules/haplocheck/main.nf
Normal file
15
tests/modules/haplocheck/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { HAPLOCHECK } from '../../../modules/haplocheck/main.nf'
|
||||
|
||||
workflow test_haplocheck {
|
||||
|
||||
input = [
|
||||
[ id:'test' ], // meta map
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_mito_vcf'], checkIfExists: true)
|
||||
]
|
||||
|
||||
HAPLOCHECK ( input )
|
||||
}
|
5
tests/modules/haplocheck/nextflow.config
Normal file
5
tests/modules/haplocheck/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
20
tests/modules/haplocheck/test.yml
Normal file
20
tests/modules/haplocheck/test.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
- name: haplocheck test_haplocheck
|
||||
command: nextflow run ./tests/modules/haplocheck -entry test_haplocheck -c ./tests/config/nextflow.config -c ./tests/modules/haplocheck/nextflow.config
|
||||
tags:
|
||||
- haplocheck
|
||||
files:
|
||||
- path: output/haplocheck/test.html
|
||||
md5sum: 59d69052c86edff0301816956eaf4d5f
|
||||
- path: output/haplocheck/test.raw.txt
|
||||
md5sum: 69f4e5b28a59b97fc19eb8e8b650d9d5
|
||||
- path: output/haplocheck/versions.yml
|
||||
md5sum: 94e2fa3ceb3946487319f92cea08c942
|
||||
|
||||
- name: haplocheck test_haplocheck using stubs
|
||||
command: nextflow run ./tests/modules/haplocheck -entry test_haplocheck -c ./tests/config/nextflow.config -c ./tests/modules/haplocheck/nextflow.config -stub-run
|
||||
tags:
|
||||
- haplocheck
|
||||
files:
|
||||
- path: output/haplocheck/test.html
|
||||
- path: output/haplocheck/test.raw.txt
|
||||
- path: output/haplocheck/versions.yml
|
Loading…
Reference in a new issue