mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Merge pull request #135 from drpatelh/bwa
Update indices syntax for BWA index and mem modules
This commit is contained in:
commit
27be87ac72
6 changed files with 17 additions and 20 deletions
|
@ -22,13 +22,14 @@ process BWA_INDEX {
|
||||||
path fasta
|
path fasta
|
||||||
|
|
||||||
output:
|
output:
|
||||||
path "${fasta}.*" , emit: index
|
path "bwa" , emit: index
|
||||||
path "*.version.txt", emit: version
|
path "*.version.txt", emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
"""
|
"""
|
||||||
bwa index $options.args $fasta
|
mkdir bwa
|
||||||
|
bwa index $options.args $fasta -p bwa/${fasta.baseName}
|
||||||
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
|
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ process BWA_MEM {
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(reads)
|
tuple val(meta), path(reads)
|
||||||
path index
|
path index
|
||||||
path fasta
|
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.bam"), emit: bam
|
tuple val(meta), path("*.bam"), emit: bam
|
||||||
|
@ -32,13 +31,15 @@ process BWA_MEM {
|
||||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||||
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
|
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
|
||||||
"""
|
"""
|
||||||
|
INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'`
|
||||||
|
|
||||||
bwa mem \\
|
bwa mem \\
|
||||||
$options.args \\
|
$options.args \\
|
||||||
$read_group \\
|
$read_group \\
|
||||||
-t $task.cpus \\
|
-t $task.cpus \\
|
||||||
$fasta \\
|
\$INDEX \\
|
||||||
$reads \\
|
$reads \\
|
||||||
| samtools view $options.args2 -@ $task.cpus -bS -o ${prefix}.bam -
|
| samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam -
|
||||||
|
|
||||||
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
|
echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -51,10 +51,7 @@ input:
|
||||||
- index:
|
- index:
|
||||||
type: file
|
type: file
|
||||||
description: BWA genome index files
|
description: BWA genome index files
|
||||||
pattern: "*.{amb,ann,bwt,pac,sa}"
|
pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}"
|
||||||
- fasta:
|
|
||||||
type: file
|
|
||||||
description: Input genome fasta file
|
|
||||||
output:
|
output:
|
||||||
- bam:
|
- bam:
|
||||||
type: file
|
type: file
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
- bwa
|
- bwa
|
||||||
- bwa_index
|
- bwa_index
|
||||||
files:
|
files:
|
||||||
- path: output/bwa/NC_010473.fa.amb
|
- path: output/bwa/bwa/NC_010473.amb
|
||||||
md5sum: 942a990ae872f1c0b8d72dda2db405d5
|
md5sum: 942a990ae872f1c0b8d72dda2db405d5
|
||||||
- path: output/bwa/NC_010473.fa.bwt
|
- path: output/bwa/bwa/NC_010473.bwt
|
||||||
md5sum: 7301b52e2ecb893d429a49fa692447ae
|
md5sum: 7301b52e2ecb893d429a49fa692447ae
|
||||||
- path: output/bwa/NC_010473.fa.pac
|
- path: output/bwa/bwa/NC_010473.pac
|
||||||
md5sum: 4d5e6fc45bbc968f7f859e9ca2cc89ad
|
md5sum: 4d5e6fc45bbc968f7f859e9ca2cc89ad
|
||||||
- path: output/bwa/NC_010473.fa.sa
|
- path: output/bwa/bwa/NC_010473.sa
|
||||||
md5sum: a47dcc92e750e2f16fbd979b8ff9538e
|
md5sum: a47dcc92e750e2f16fbd979b8ff9538e
|
||||||
|
|
|
@ -15,8 +15,7 @@ workflow test_bwa_mem_single_end {
|
||||||
|
|
||||||
BWA_MEM (
|
BWA_MEM (
|
||||||
input,
|
input,
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwa/NC_010473.fa.{amb,ann,bwt,pac,sa}", checkIfExists: true),
|
file("${launchDir}/tests/data/index/E_coli/bwa/", checkIfExists: true)
|
||||||
file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +31,6 @@ workflow test_bwa_mem_paired_end {
|
||||||
|
|
||||||
BWA_MEM (
|
BWA_MEM (
|
||||||
input,
|
input,
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwa/NC_010473.fa.{amb,ann,bwt,pac,sa}", checkIfExists: true),
|
file("${launchDir}/tests/data/index/E_coli/bwa/", checkIfExists: true)
|
||||||
file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
- bwa_mem_single_end
|
- bwa_mem_single_end
|
||||||
files:
|
files:
|
||||||
- path: output/bwa/test.bam
|
- path: output/bwa/test.bam
|
||||||
md5sum: 3ee21210bac387e0335008146e4728bc
|
md5sum: 52e81e5bd523d0b27fe533b21a0d80f5
|
||||||
|
|
||||||
- name: bwa mem paired-end
|
- name: bwa mem paired-end
|
||||||
command: nextflow run ./tests/software/bwa/mem -entry test_bwa_mem_paired_end -c tests/config/nextflow.config
|
command: nextflow run ./tests/software/bwa/mem -entry test_bwa_mem_paired_end -c tests/config/nextflow.config
|
||||||
|
@ -16,4 +16,4 @@
|
||||||
- bwa_mem_paired_end
|
- bwa_mem_paired_end
|
||||||
files:
|
files:
|
||||||
- path: output/bwa/test.bam
|
- path: output/bwa/test.bam
|
||||||
md5sum: 510d8acc6448c07cdacce8e64ec0904c
|
md5sum: 86d82fdb68ed384c656cfc62a253052f
|
||||||
|
|
Loading…
Reference in a new issue