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:
Ramprasad Neethiraj 2022-02-10 10:37:31 +01:00 committed by GitHub
parent f5d5926516
commit d0240fee1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 23 deletions

View file

@ -8,11 +8,11 @@ process MANTA_GERMLINE {
'quay.io/biocontainers/manta:1.6.0--h9ee0642_1' }"
input:
tuple val(meta), path(input), path(input_index)
tuple val(meta), path(input), path(index)
path fasta
path fai
path target_bed
path target_bed_tbi
path fasta_fai
tuple path(target_bed), path(target_bed_tbi)
output:
tuple val(meta), path("*candidate_small_indels.vcf.gz") , emit: candidate_small_indels_vcf
@ -29,13 +29,14 @@ process MANTA_GERMLINE {
script:
def args = task.ext.args ?: ''
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 \
--bam $input \
--bam ${input.join(' --bam ')} \
--reference $fasta \
--runDir manta \
$options_manta \
--runDir manta
$args
python manta/runWorkflow.py -m local -j $task.cpus
@ -57,4 +58,20 @@ process MANTA_GERMLINE {
manta: \$( configManta.py --version )
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
"""
}

View file

@ -25,17 +25,17 @@ input:
e.g. [ id:'test', single_end:false ]
- input:
type: file
description: BAM/CRAM/SAM file
description: BAM/CRAM/SAM file. For joint calling use a list of files.
pattern: "*.{bam,cram,sam}"
- input_index:
- index:
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}"
- fasta:
type: file
description: Genome reference FASTA file
pattern: "*.{fa,fasta}"
- fai:
- fasta_fai:
type: file
description: Genome reference FASTA index file
pattern: "*.{fa.fai,fasta.fai}"
@ -85,3 +85,4 @@ output:
authors:
- "@maxulysse"
- "@ramprasadn"

View file

@ -7,29 +7,46 @@ include { MANTA_GERMLINE } from '../../../../modules/manta/germline/main.nf'
workflow test_manta_germline {
input = [
[ 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_recalibrated_sorted_cram_crai'], 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_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 = []
bed_tbi = []
bed = [[],[]]
MANTA_GERMLINE ( input, fasta, fai, bed, bed_tbi )
MANTA_GERMLINE ( input, fasta, fai, bed )
}
workflow test_manta_germline_target_bed {
input = [
[ 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_recalibrated_sorted_cram_crai'], 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_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)
bed_tbi = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz_tbi'], 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, 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 )
}

View file

@ -2,4 +2,8 @@ process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
withName: MANTA_GERMLINE {
ext.args = '--exome '
}
}

View file

@ -22,3 +22,15 @@
- 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
- 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