mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 05:43:08 +00:00
update manta to enable jointcalling (#1218)
* update manta to enable jointcalling * fix lint errors * fix error * update comment * remove comment * suggestions from code review * add stub
This commit is contained in:
parent
f5d5926516
commit
d0240fee1e
5 changed files with 74 additions and 23 deletions
|
@ -8,11 +8,11 @@ process MANTA_GERMLINE {
|
||||||
'quay.io/biocontainers/manta:1.6.0--h9ee0642_1' }"
|
'quay.io/biocontainers/manta:1.6.0--h9ee0642_1' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(input), path(input_index)
|
tuple val(meta), path(input), path(index)
|
||||||
path fasta
|
path fasta
|
||||||
path fai
|
path fasta_fai
|
||||||
path target_bed
|
tuple path(target_bed), path(target_bed_tbi)
|
||||||
path target_bed_tbi
|
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*candidate_small_indels.vcf.gz") , emit: candidate_small_indels_vcf
|
tuple val(meta), path("*candidate_small_indels.vcf.gz") , emit: candidate_small_indels_vcf
|
||||||
|
@ -29,13 +29,14 @@ process MANTA_GERMLINE {
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
def options_manta = target_bed ? "--exome --callRegions $target_bed" : ""
|
def options_manta = target_bed ? "--callRegions $target_bed" : ""
|
||||||
"""
|
"""
|
||||||
configManta.py \
|
configManta.py \
|
||||||
--bam $input \
|
--bam ${input.join(' --bam ')} \
|
||||||
--reference $fasta \
|
--reference $fasta \
|
||||||
|
--runDir manta \
|
||||||
$options_manta \
|
$options_manta \
|
||||||
--runDir manta
|
$args
|
||||||
|
|
||||||
python manta/runWorkflow.py -m local -j $task.cpus
|
python manta/runWorkflow.py -m local -j $task.cpus
|
||||||
|
|
||||||
|
@ -57,4 +58,20 @@ process MANTA_GERMLINE {
|
||||||
manta: \$( configManta.py --version )
|
manta: \$( configManta.py --version )
|
||||||
END_VERSIONS
|
END_VERSIONS
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
stub:
|
||||||
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
"""
|
||||||
|
touch ${prefix}.candidate_small_indels.vcf.gz
|
||||||
|
touch ${prefix}.candidate_small_indels.vcf.gz.tbi
|
||||||
|
touch ${prefix}.candidate_sv.vcf.gz
|
||||||
|
touch ${prefix}.candidate_sv.vcf.gz.tbi
|
||||||
|
touch ${prefix}.diploid_sv.vcf.gz
|
||||||
|
touch ${prefix}.diploid_sv.vcf.gz.tbi
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
manta: \$( configManta.py --version )
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,17 +25,17 @@ input:
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
- input:
|
- input:
|
||||||
type: file
|
type: file
|
||||||
description: BAM/CRAM/SAM file
|
description: BAM/CRAM/SAM file. For joint calling use a list of files.
|
||||||
pattern: "*.{bam,cram,sam}"
|
pattern: "*.{bam,cram,sam}"
|
||||||
- input_index:
|
- index:
|
||||||
type: file
|
type: file
|
||||||
description: BAM/CRAM/SAM index file
|
description: BAM/CRAM/SAM index file. For joint calling use a list of files.
|
||||||
pattern: "*.{bai,crai,sai}"
|
pattern: "*.{bai,crai,sai}"
|
||||||
- fasta:
|
- fasta:
|
||||||
type: file
|
type: file
|
||||||
description: Genome reference FASTA file
|
description: Genome reference FASTA file
|
||||||
pattern: "*.{fa,fasta}"
|
pattern: "*.{fa,fasta}"
|
||||||
- fai:
|
- fasta_fai:
|
||||||
type: file
|
type: file
|
||||||
description: Genome reference FASTA index file
|
description: Genome reference FASTA index file
|
||||||
pattern: "*.{fa.fai,fasta.fai}"
|
pattern: "*.{fa.fai,fasta.fai}"
|
||||||
|
@ -85,3 +85,4 @@ output:
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- "@maxulysse"
|
- "@maxulysse"
|
||||||
|
- "@ramprasadn"
|
||||||
|
|
|
@ -7,29 +7,46 @@ include { MANTA_GERMLINE } from '../../../../modules/manta/germline/main.nf'
|
||||||
workflow test_manta_germline {
|
workflow test_manta_germline {
|
||||||
input = [
|
input = [
|
||||||
[ id:'test'], // meta map
|
[ id:'test'], // meta map
|
||||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true),
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true)],
|
||||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true)
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true)]
|
||||||
]
|
]
|
||||||
|
|
||||||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
||||||
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||||
bed = []
|
bed = [[],[]]
|
||||||
bed_tbi = []
|
|
||||||
|
|
||||||
MANTA_GERMLINE ( input, fasta, fai, bed, bed_tbi )
|
MANTA_GERMLINE ( input, fasta, fai, bed )
|
||||||
}
|
}
|
||||||
|
|
||||||
workflow test_manta_germline_target_bed {
|
workflow test_manta_germline_target_bed {
|
||||||
input = [
|
input = [
|
||||||
[ id:'test'], // meta map
|
[ id:'test'], // meta map
|
||||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true),
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true)],
|
||||||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true)
|
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true)]
|
||||||
]
|
]
|
||||||
|
|
||||||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
||||||
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||||
bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true)
|
bed = [
|
||||||
bed_tbi = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true)
|
file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true),
|
||||||
|
file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true),
|
||||||
|
]
|
||||||
|
|
||||||
MANTA_GERMLINE ( input, fasta, fai, bed, bed_tbi )
|
MANTA_GERMLINE ( input, fasta, fai, bed )
|
||||||
|
}
|
||||||
|
|
||||||
|
workflow test_manta_germline_target_bed_jointcalling {
|
||||||
|
input = [
|
||||||
|
[ id:'test'], // meta map
|
||||||
|
[file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true),
|
||||||
|
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram'], checkIfExists: true)],
|
||||||
|
[file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true),
|
||||||
|
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_cram_crai'], checkIfExists: true),]
|
||||||
|
]
|
||||||
|
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
|
||||||
|
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||||
|
bed = [
|
||||||
|
file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true),
|
||||||
|
file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], checkIfExists: true),
|
||||||
|
]
|
||||||
|
|
||||||
|
MANTA_GERMLINE ( input, fasta, fai, bed )
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,4 +2,8 @@ process {
|
||||||
|
|
||||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
withName: MANTA_GERMLINE {
|
||||||
|
ext.args = '--exome '
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,3 +22,15 @@
|
||||||
- path: output/manta/test.candidate_sv.vcf.gz.tbi
|
- path: output/manta/test.candidate_sv.vcf.gz.tbi
|
||||||
- path: output/manta/test.diploid_sv.vcf.gz
|
- path: output/manta/test.diploid_sv.vcf.gz
|
||||||
- path: output/manta/test.diploid_sv.vcf.gz.tbi
|
- path: output/manta/test.diploid_sv.vcf.gz.tbi
|
||||||
|
- name: manta germline target bed jointcalling
|
||||||
|
command: nextflow run ./tests/modules/manta/germline -entry test_manta_germline_target_bed_jointcalling -c ./tests/config/nextflow.config -c ./tests/modules/manta/germline/nextflow.config
|
||||||
|
tags:
|
||||||
|
- manta
|
||||||
|
- manta/germline
|
||||||
|
files:
|
||||||
|
- path: output/manta/test.candidate_small_indels.vcf.gz
|
||||||
|
- path: output/manta/test.candidate_small_indels.vcf.gz.tbi
|
||||||
|
- path: output/manta/test.candidate_sv.vcf.gz
|
||||||
|
- path: output/manta/test.candidate_sv.vcf.gz.tbi
|
||||||
|
- path: output/manta/test.diploid_sv.vcf.gz
|
||||||
|
- path: output/manta/test.diploid_sv.vcf.gz.tbi
|
||||||
|
|
Loading…
Reference in a new issue