mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-31 11:42:12 -05:00
bwameth: pass genome index as directory
instead of single files
This commit is contained in:
parent
1a414261c4
commit
a963c67481
14 changed files with 66965 additions and 37 deletions
|
@ -30,13 +30,12 @@ process BWAMETH_ALIGN {
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
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}" : ""
|
||||||
def c2t = index.first().toString() - '.bwameth' - '.c2t' - '.amb' - '.ann' - '.bwt' - '.pac' - '.sa'
|
|
||||||
"""
|
"""
|
||||||
bwameth.py \\
|
bwameth.py \\
|
||||||
$options.args \\
|
$options.args \\
|
||||||
$read_group \\
|
$read_group \\
|
||||||
-t $task.cpus \\
|
-t $task.cpus \\
|
||||||
--reference $c2t \\
|
--reference ${index}/genome.fa \\
|
||||||
$reads \\
|
$reads \\
|
||||||
| samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam -
|
| samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam -
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,8 @@ input:
|
||||||
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
|
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
|
||||||
respectively.
|
respectively.
|
||||||
- index:
|
- index:
|
||||||
type: file
|
type: dir
|
||||||
description: BWA genome index files
|
description: Directory containing bwameth genome index
|
||||||
pattern: "*.{amb,ann,bwt,pac,sa}"
|
|
||||||
- fasta:
|
- fasta:
|
||||||
type: file
|
type: file
|
||||||
description: Input genome fasta file
|
description: Input genome fasta file
|
||||||
|
|
|
@ -19,11 +19,11 @@ process BWAMETH_INDEX {
|
||||||
}
|
}
|
||||||
|
|
||||||
input:
|
input:
|
||||||
path fasta
|
path fasta, stageAs: "index/genome.fa"
|
||||||
|
|
||||||
output:
|
output:
|
||||||
path "*.bwameth.c2t*", emit: index
|
path "index" , emit: index
|
||||||
path "*.version.txt" , emit: version
|
path "*.version.txt", emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
|
|
|
@ -42,9 +42,9 @@ input:
|
||||||
description: Input genome fasta file
|
description: Input genome fasta file
|
||||||
output:
|
output:
|
||||||
- index:
|
- index:
|
||||||
type: file
|
type: dir
|
||||||
description: c2t converted genome BWA index files
|
description: Directory containing bwameth genome index
|
||||||
pattern: "*.{bwameth.c2t.amb,bwameth.c2t.ann,bwameth.c2t.bwt,bwameth.c2t.pac,bwameth.c2t.sa}"
|
pattern: "index"
|
||||||
- version:
|
- version:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software version
|
description: File containing software version
|
||||||
|
|
66946
tests/data/index/E_coli/bwameth/genome.fa
Normal file
66946
tests/data/index/E_coli/bwameth/genome.fa
Normal file
File diff suppressed because it is too large
Load diff
|
@ -11,20 +11,12 @@ include { BWAMETH_ALIGN as BWAMETH_ALIGN_PE } from '../../../../software/bwameth
|
||||||
workflow test_bwameth_align_single_end {
|
workflow test_bwameth_align_single_end {
|
||||||
|
|
||||||
def input = []
|
def input = []
|
||||||
def index = []
|
|
||||||
input = [ [ id:'test', single_end:true ], // meta map
|
input = [ [ id:'test', single_end:true ], // meta map
|
||||||
[ file("${launchDir}/tests/data/fastq/methylated_dna/Ecoli_10K_methylated_R1.fastq.gz", checkIfExists: true) ] ]
|
[ file("${launchDir}/tests/data/fastq/methylated_dna/Ecoli_10K_methylated_R1.fastq.gz", checkIfExists: true) ] ]
|
||||||
|
|
||||||
index = [ file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.amb", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.ann", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.bwt", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.sa", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.pac", checkIfExists: true) ]
|
|
||||||
|
|
||||||
BWAMETH_ALIGN_SE (
|
BWAMETH_ALIGN_SE (
|
||||||
input,
|
input,
|
||||||
index
|
file("${launchDir}/tests/data/index/E_coli/bwameth", checkIfExists: true)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,20 +26,12 @@ workflow test_bwameth_align_single_end {
|
||||||
workflow test_bwameth_align_paired_end {
|
workflow test_bwameth_align_paired_end {
|
||||||
|
|
||||||
def input = []
|
def input = []
|
||||||
def index = []
|
|
||||||
input = [ [ id:'test', single_end:false ], // meta map
|
input = [ [ id:'test', single_end:false ], // meta map
|
||||||
[ file("${launchDir}/tests/data/fastq/methylated_dna/Ecoli_10K_methylated_R1.fastq.gz", checkIfExists: true),
|
[ file("${launchDir}/tests/data/fastq/methylated_dna/Ecoli_10K_methylated_R1.fastq.gz", checkIfExists: true),
|
||||||
file("${launchDir}/tests/data/fastq/methylated_dna/Ecoli_10K_methylated_R2.fastq.gz", checkIfExists: true) ] ]
|
file("${launchDir}/tests/data/fastq/methylated_dna/Ecoli_10K_methylated_R2.fastq.gz", checkIfExists: true) ] ]
|
||||||
|
|
||||||
index = [ file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.amb", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.ann", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.bwt", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.sa", checkIfExists: true),
|
|
||||||
file("${launchDir}/tests/data/index/E_coli/bwameth/NC_010473.fa.bwameth.c2t.pac", checkIfExists: true) ]
|
|
||||||
|
|
||||||
BWAMETH_ALIGN_PE (
|
BWAMETH_ALIGN_PE (
|
||||||
input,
|
input,
|
||||||
index
|
file("${launchDir}/tests/data/index/E_coli/bwameth", checkIfExists: true)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
- bwameth_align
|
- bwameth_align
|
||||||
files:
|
files:
|
||||||
- path: output/test_single_end/test.bam
|
- path: output/test_single_end/test.bam
|
||||||
md5sum: d56665d96a0ebb8e739ae41af8a37181
|
md5sum: 48dde56f7b74de3a3e0b1914c45150de
|
||||||
|
|
||||||
- name: Run bwameth paired-end test workflow
|
- name: Run bwameth paired-end test workflow
|
||||||
command: nextflow run ./tests/software/bwameth/align -entry test_bwameth_align_paired_end -c tests/config/nextflow.config
|
command: nextflow run ./tests/software/bwameth/align -entry test_bwameth_align_paired_end -c tests/config/nextflow.config
|
||||||
|
@ -14,4 +14,4 @@
|
||||||
- bwameth_align
|
- bwameth_align
|
||||||
files:
|
files:
|
||||||
- path: output/test_paired_end/test.bam
|
- path: output/test_paired_end/test.bam
|
||||||
md5sum: 58b918ddddc09866e13a1a45f22e7434
|
md5sum: b473343b32b7cfc677bfad1ab0e6bb5a
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
- bwameth
|
- bwameth
|
||||||
- bwameth_index
|
- bwameth_index
|
||||||
files:
|
files:
|
||||||
- path: ./output/bwameth/NC_010473.fa.bwameth.c2t.pac
|
- path: ./output/bwameth/index/genome.fa.bwameth.c2t.pac
|
||||||
md5sum: 7586c6a3be45c4dea15376a5c7bb9bf0
|
md5sum: 7586c6a3be45c4dea15376a5c7bb9bf0
|
||||||
- path: ./output/bwameth/NC_010473.fa.bwameth.c2t.amb
|
- path: ./output/bwameth/index/genome.fa.bwameth.c2t.amb
|
||||||
md5sum: 87e019665cbb66bdee2bacccb26845c9
|
md5sum: 87e019665cbb66bdee2bacccb26845c9
|
||||||
- path: ./output/bwameth/NC_010473.fa.bwameth.c2t.ann
|
- path: ./output/bwameth/index/genome.fa.bwameth.c2t.ann
|
||||||
md5sum: a4659a63572b6998c67457bd8e95790d
|
md5sum: a4659a63572b6998c67457bd8e95790d
|
||||||
- path: ./output/bwameth/NC_010473.fa.bwameth.c2t.bwt
|
- path: ./output/bwameth/index/genome.fa.bwameth.c2t.bwt
|
||||||
md5sum: 582854008bcbe99d5b51290773a7db5f
|
md5sum: 582854008bcbe99d5b51290773a7db5f
|
||||||
- path: ./output/bwameth/NC_010473.fa.bwameth.c2t
|
- path: ./output/bwameth/index/genome.fa.bwameth.c2t
|
||||||
md5sum: db670853725f4a31080c991e9df6b330
|
md5sum: db670853725f4a31080c991e9df6b330
|
||||||
- path: ./output/bwameth/NC_010473.fa.bwameth.c2t.sa
|
- path: ./output/bwameth/index/genome.fa.bwameth.c2t.sa
|
||||||
md5sum: 020db07e7e1544dc961c30c9936f3213
|
md5sum: 020db07e7e1544dc961c30c9936f3213
|
||||||
|
|
Loading…
Reference in a new issue