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:
nvnieuwk 2022-06-14 16:02:18 +02:00 committed by GitHub
parent 4e308c131e
commit 1a4ab76618
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 113 additions and 0 deletions

View 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
"""
}

View 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"

View file

@ -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/**

View 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 )
}

View file

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View 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