mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Merge branch 'master' into haplocheck
This commit is contained in:
commit
89bffe3a5e
6 changed files with 171 additions and 0 deletions
51
modules/rhocall/annotate/main.nf
Normal file
51
modules/rhocall/annotate/main.nf
Normal file
|
@ -0,0 +1,51 @@
|
|||
process RHOCALL_ANNOTATE {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::rhocall=0.5.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/rhocall:0.5.1--py39hbf8eff0_0':
|
||||
'quay.io/biocontainers/rhocall:0.5.1--py39hbf8eff0_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(tbi)
|
||||
tuple val(meta), path(roh)
|
||||
path bed
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*_rhocall.vcf"), 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}"
|
||||
def az_bed = bed ? "-b ${bed}" : ''
|
||||
"""
|
||||
rhocall \\
|
||||
annotate \\
|
||||
$args \\
|
||||
$az_bed \\
|
||||
-r $roh \\
|
||||
-o ${prefix}_rhocall.vcf \\
|
||||
$vcf
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
rhocall: \$(echo \$(rhocall --version 2>&1) | sed 's/rhocall, version //' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
|
||||
stub:
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
touch ${prefix}_rhocall.vcf
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
rhocall: \$(echo \$(rhocall --version 2>&1) | sed 's/rhocall, version //' )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
54
modules/rhocall/annotate/meta.yml
Normal file
54
modules/rhocall/annotate/meta.yml
Normal file
|
@ -0,0 +1,54 @@
|
|||
name: "rhocall_annotate"
|
||||
description: "Markup VCF file using rho-calls."
|
||||
keywords:
|
||||
- roh
|
||||
- rhocall
|
||||
tools:
|
||||
- "rhocall":
|
||||
description: "Call regions of homozygosity and make tentative UPD calls."
|
||||
homepage: "https://github.com/dnil/rhocall"
|
||||
documentation: "https://github.com/dnil/rhocall"
|
||||
tool_dev_url: "https://github.com/dnil"
|
||||
doi: ""
|
||||
licence: "['GPL v3']"
|
||||
|
||||
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,vcf.gz}"
|
||||
- tbi:
|
||||
type: file
|
||||
description: vcf index file
|
||||
pattern: "*.{tbi}"
|
||||
- roh:
|
||||
type: file
|
||||
description: Bcftools roh style TSV file with CHR,POS,AZ,QUAL
|
||||
pattern: "*.{roh}"
|
||||
- bed:
|
||||
type: file
|
||||
description: BED file with AZ windows.
|
||||
pattern: "*.{bed}"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- vcf:
|
||||
type: file
|
||||
description: vcf file
|
||||
pattern: "*.{vcf,vcf.gz}"
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
|
||||
authors:
|
||||
- "@ramprasadn"
|
|
@ -1651,6 +1651,10 @@ rgi/main:
|
|||
- modules/rgi/main/**
|
||||
- tests/modules/rgi/main/**
|
||||
|
||||
rhocall/annotate:
|
||||
- modules/rhocall/annotate/**
|
||||
- tests/modules/rhocall/annotate/**
|
||||
|
||||
rmarkdownnotebook:
|
||||
- modules/rmarkdownnotebook/**
|
||||
- tests/modules/rmarkdownnotebook/**
|
||||
|
|
40
tests/modules/rhocall/annotate/main.nf
Normal file
40
tests/modules/rhocall/annotate/main.nf
Normal file
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { RHOCALL_ANNOTATE } from '../../../../modules/rhocall/annotate/main.nf'
|
||||
include { BCFTOOLS_ROH } from '../../../../modules/bcftools/roh/main.nf'
|
||||
|
||||
workflow test_rhocall_annotate {
|
||||
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)]
|
||||
|
||||
af_file = [[],[]]
|
||||
gen_map = []
|
||||
regions = []
|
||||
targets = []
|
||||
samples = []
|
||||
|
||||
BCFTOOLS_ROH ( input, af_file, gen_map, regions, samples, targets )
|
||||
RHOCALL_ANNOTATE ( input, BCFTOOLS_ROH.out.roh, [])
|
||||
|
||||
}
|
||||
|
||||
workflow test_rhocall_annotate_stub {
|
||||
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)]
|
||||
|
||||
af_file = [[],[]]
|
||||
gen_map = []
|
||||
regions = []
|
||||
targets = []
|
||||
samples = []
|
||||
|
||||
BCFTOOLS_ROH ( input, af_file, gen_map, regions, samples, targets )
|
||||
RHOCALL_ANNOTATE ( input, BCFTOOLS_ROH.out.roh, [])
|
||||
|
||||
}
|
5
tests/modules/rhocall/annotate/nextflow.config
Normal file
5
tests/modules/rhocall/annotate/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
17
tests/modules/rhocall/annotate/test.yml
Normal file
17
tests/modules/rhocall/annotate/test.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- name: "rhocall annotate"
|
||||
command: nextflow run ./tests/modules/rhocall/annotate -entry test_rhocall_annotate -c ./tests/config/nextflow.config -c ./tests/modules/rhocall/annotate/nextflow.config
|
||||
tags:
|
||||
- "rhocall"
|
||||
- "rhocall/annotate"
|
||||
files:
|
||||
- path: "output/rhocall/test_rhocall.vcf"
|
||||
- path: "output/rhocall/versions.yml"
|
||||
|
||||
- name: "rhocall annotate stub"
|
||||
command: nextflow run ./tests/modules/rhocall/annotate -entry test_rhocall_annotate_stub -c ./tests/config/nextflow.config -c ./tests/modules/rhocall/annotate/nextflow.config -stub-run
|
||||
tags:
|
||||
- "rhocall"
|
||||
- "rhocall/annotate"
|
||||
files:
|
||||
- path: "output/rhocall/test_rhocall.vcf"
|
||||
- path: "output/rhocall/versions.yml"
|
Loading…
Reference in a new issue