Added support for meta in bwamem2/index (#1921)

* Added support for meta in bwamem2/index

* Added missing description of the input meta map (fasta file)

* Made bwamem2/mem aware of the meta map the index carries

* The output meta map needs to be same as the input bam file

Don't merge it with the index's

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
Matthieu Muffato 2022-07-26 21:48:47 +01:00 committed by GitHub
parent 4ed5dc4593
commit 30b0485912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 9 deletions

View file

@ -8,10 +8,10 @@ process BWAMEM2_INDEX {
'quay.io/biocontainers/bwa-mem2:2.2.1--he513fc3_0' }"
input:
path fasta
tuple val(meta), path(fasta)
output:
path "bwamem2" , emit: index
tuple val(meta), path("bwamem2"), emit: index
path "versions.yml" , emit: versions
when:

View file

@ -14,10 +14,20 @@ tools:
documentation: https://github.com/bwa-mem2/bwa-mem2#usage
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fasta:
type: file
description: Input genome fasta file
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- index:
type: file
description: BWA genome index files

View file

@ -9,7 +9,7 @@ process BWAMEM2_MEM {
input:
tuple val(meta), path(reads)
path index
tuple val(meta2), path(index)
val sort_bam
output:

View file

@ -37,6 +37,11 @@ input:
description: use samtools sort (true) or samtools view (false)
pattern: "true or false"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: Output BAM file containing read alignments

View file

@ -7,5 +7,5 @@ include { BWAMEM2_INDEX } from '../../../../modules/bwamem2/index/main.nf'
workflow test_bwamem2_index {
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
BWAMEM2_INDEX ( fasta )
BWAMEM2_INDEX ( [ [id:'test'], fasta] )
}

View file

@ -17,7 +17,7 @@ workflow test_bwamem2_mem_single_end {
]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
BWAMEM2_INDEX ( fasta )
BWAMEM2_INDEX ( [ [:], fasta ] )
BWAMEM2_MEM ( input, BWAMEM2_INDEX.out.index, false )
}
@ -33,7 +33,7 @@ workflow test_bwamem2_mem_single_end_sort {
]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
BWAMEM2_INDEX ( fasta )
BWAMEM2_INDEX ( [ [:], fasta ] )
BWAMEM2_MEM ( input, BWAMEM2_INDEX.out.index, true )
}
@ -51,7 +51,7 @@ workflow test_bwamem2_mem_paired_end {
]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
BWAMEM2_INDEX ( fasta )
BWAMEM2_INDEX ( [ [:], fasta ] )
BWAMEM2_MEM ( input, BWAMEM2_INDEX.out.index, false )
}
@ -68,6 +68,6 @@ workflow test_bwamem2_mem_paired_end_sort {
]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
BWAMEM2_INDEX ( fasta )
BWAMEM2_INDEX ( [ [:], fasta ] )
BWAMEM2_MEM ( input, BWAMEM2_INDEX.out.index, true )
}