add intervals possibilities to splitncigarreads (#1571)

This commit is contained in:
Maxime U. Garcia 2022-04-27 16:03:44 +02:00 committed by GitHub
parent 61e740f79c
commit 10ca39a86f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 3 deletions

View file

@ -8,7 +8,7 @@ process GATK4_SPLITNCIGARREADS {
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
tuple val(meta), path(bam), path(bai), path(intervals)
path fasta
path fai
path dict
@ -23,6 +23,7 @@ process GATK4_SPLITNCIGARREADS {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def interval_command = intervals ? "--intervals $intervals" : ""
def avail_mem = 3
if (!task.memory) {
@ -35,6 +36,7 @@ process GATK4_SPLITNCIGARREADS {
--input $bam \\
--output ${prefix}.bam \\
--reference $fasta \\
$interval_command \\
--tmp-dir . \\
$args

View file

@ -23,6 +23,13 @@ input:
type: list
description: BAM/SAM/CRAM file containing reads
pattern: "*.{bam,sam,cram}"
- bai:
type: list
description: BAI/SAI/CRAI index file (optional)
pattern: "*.{bai,sai,crai}"
- intervals:
type: file
description: Bed file with the genomic regions included in the library (optional)
- fasta:
type: file
description: The reference fasta file

View file

@ -6,7 +6,23 @@ include { GATK4_SPLITNCIGARREADS } from '../../../../modules/gatk4/splitncigarre
workflow test_gatk4_splitncigarreads {
input = [ [ id:'test' ], // meta map
[ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ]
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true),
[],
[]
]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
GATK4_SPLITNCIGARREADS ( input, fasta, fai, dict )
}
workflow test_gatk4_splitncigarreads_intervals {
input = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)

View file

@ -5,5 +5,14 @@
- gatk4/splitncigarreads
files:
- path: output/gatk4/test.bam
md5sum: ceed15c0bd64ff5c38d3816905933b0b
md5sum: 436d8e31285c6b588bdd1c7f1d07f6f2
- path: output/gatk4/versions.yml
- name: gatk4 splitncigarreads test_gatk4_splitncigarreads_intervals
command: nextflow run tests/modules/gatk4/splitncigarreads -entry test_gatk4_splitncigarreads_intervals -c tests/config/nextflow.config
tags:
- gatk4
- gatk4/splitncigarreads
files:
- path: output/gatk4/test.bam
md5sum: cd56e3225950f519fd47164cca60a0bb
- path: output/gatk4/versions.yml