mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-30 11:12:10 -05:00
new module rtgtools/pedfilter (#1777)
* new module rtgtools/pedfilter * removed checksum due to the presence of a date in the file
This commit is contained in:
parent
4e308c131e
commit
1a4ab76618
6 changed files with 113 additions and 0 deletions
37
modules/rtgtools/pedfilter/main.nf
Normal file
37
modules/rtgtools/pedfilter/main.nf
Normal file
|
@ -0,0 +1,37 @@
|
|||
process RTGTOOLS_PEDFILTER {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rtg-tools=3.12.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/rtg-tools:3.12.1--hdfd78af_0':
|
||||
'quay.io/biocontainers/rtg-tools:3.12.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(ped)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.vcf.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}"
|
||||
|
||||
"""
|
||||
rtg pedfilter \\
|
||||
$ped \\
|
||||
--vcf \\
|
||||
> ${prefix}.vcf
|
||||
|
||||
gzip ${prefix}.vcf
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
rtgtools: \$(echo \$(rtg version | head -n 1 | awk '{print \$4}'))
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
45
modules/rtgtools/pedfilter/meta.yml
Normal file
45
modules/rtgtools/pedfilter/meta.yml
Normal file
|
@ -0,0 +1,45 @@
|
|||
name: "rtgtools_pedfilter"
|
||||
description: Converts a PED file to VCF headers
|
||||
keywords:
|
||||
- rtgtools
|
||||
- pedfilter
|
||||
- vcf
|
||||
tools:
|
||||
- "rtgtools":
|
||||
description: "RealTimeGenomics Tools -- Utilities for accurate VCF comparison and manipulation"
|
||||
homepage: "https://www.realtimegenomics.com/products/rtg-tools"
|
||||
documentation: "https://github.com/RealTimeGenomics/rtg-tools"
|
||||
tool_dev_url: "https://github.com/RealTimeGenomics/rtg-tools"
|
||||
doi: ""
|
||||
licence: "['BSD']"
|
||||
|
||||
input:
|
||||
# Only when we have meta
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- ped:
|
||||
type: file
|
||||
description: PED file
|
||||
pattern: "*.ped"
|
||||
|
||||
output:
|
||||
#Only when we have meta
|
||||
- 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: VCF file containing only headers fetched from the PED file
|
||||
pattern: "*.vcf.gz"
|
||||
|
||||
authors:
|
||||
- "@nvnieuwk"
|
|
@ -1739,6 +1739,10 @@ rseqc/tin:
|
|||
- modules/rseqc/tin/**
|
||||
- tests/modules/rseqc/tin/**
|
||||
|
||||
rtgtools/pedfilter:
|
||||
- modules/rtgtools/pedfilter/**
|
||||
- tests/modules/rtgtools/pedfilter/**
|
||||
|
||||
rtgtools/vcfeval:
|
||||
- modules/rtgtools/vcfeval/**
|
||||
- tests/modules/rtgtools/vcfeval/**
|
||||
|
|
15
tests/modules/rtgtools/pedfilter/main.nf
Normal file
15
tests/modules/rtgtools/pedfilter/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { RTGTOOLS_PEDFILTER } from '../../../../modules/rtgtools/pedfilter/main.nf'
|
||||
|
||||
workflow test_rtgtools_pedfilter {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['homo_sapiens']['genome']['justhusky_ped'], checkIfExists: true)
|
||||
]
|
||||
|
||||
RTGTOOLS_PEDFILTER ( input )
|
||||
}
|
5
tests/modules/rtgtools/pedfilter/nextflow.config
Normal file
5
tests/modules/rtgtools/pedfilter/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
7
tests/modules/rtgtools/pedfilter/test.yml
Normal file
7
tests/modules/rtgtools/pedfilter/test.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
- name: rtgtools pedfilter test_rtgtools_pedfilter
|
||||
command: nextflow run ./tests/modules/rtgtools/pedfilter -entry test_rtgtools_pedfilter -c ./tests/config/nextflow.config -c ./tests/modules/rtgtools/pedfilter/nextflow.config
|
||||
tags:
|
||||
- rtgtools/pedfilter
|
||||
- rtgtools
|
||||
files:
|
||||
- path: output/rtgtools/test.vcf.gz
|
Loading…
Reference in a new issue