mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
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:
parent
4ed5dc4593
commit
30b0485912
6 changed files with 24 additions and 9 deletions
|
@ -8,11 +8,11 @@ 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
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path("bwamem2"), emit: index
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -9,7 +9,7 @@ process BWAMEM2_MEM {
|
|||
|
||||
input:
|
||||
tuple val(meta), path(reads)
|
||||
path index
|
||||
tuple val(meta2), path(index)
|
||||
val sort_bam
|
||||
|
||||
output:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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] )
|
||||
}
|
||||
|
|
|
@ -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 )
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue