mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Merge pull request #62 from drpatelh/master
Add docs and test data for BWA mem
This commit is contained in:
commit
347bbcc609
15 changed files with 163 additions and 47 deletions
30
.github/workflows/bwa_mem.yml
vendored
Normal file
30
.github/workflows/bwa_mem.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: bwa_mem
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- software/bwa/mem/**
|
||||
- .github/workflows/bwa_mem.yml
|
||||
- tests
|
||||
pull_request:
|
||||
paths:
|
||||
- software/bwa/mem/**
|
||||
- .github/workflows/bwa_mem.yml
|
||||
- tests
|
||||
|
||||
jobs:
|
||||
ci_test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NXF_ANSI_LOG: false
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Nextflow
|
||||
run: |
|
||||
export NXF_VER="20.07.1"
|
||||
wget -qO- get.nextflow.io | bash
|
||||
sudo mv nextflow /usr/local/bin/
|
||||
|
||||
# Test the module
|
||||
- run: nextflow run ./software/bwa/mem/test/ -profile docker
|
|
@ -1,42 +1,68 @@
|
|||
name: bwa mem
|
||||
description: Performs fastq alignment to a fasta reference using the burrows-wheeler aligner
|
||||
name: bwa_mem
|
||||
description: Performs fastq alignment to a fasta reference using BWA
|
||||
keywords:
|
||||
- mem
|
||||
- bwa
|
||||
- alignment
|
||||
- mem
|
||||
- bwa
|
||||
- alignment
|
||||
- map
|
||||
tools:
|
||||
- bwa:
|
||||
description: |
|
||||
BWA is a software package for mapping DNA sequences against a large reference genome, such as the human genome.
|
||||
homepage: http://bio-bwa.sourceforge.net/
|
||||
documentation: http://www.htslib.org/doc/samtools.html
|
||||
arxiv: arXiv:1303.3997
|
||||
- bwa:
|
||||
description: |
|
||||
BWA is a software package for mapping DNA sequences against
|
||||
a large reference genome, such as the human genome.
|
||||
homepage: http://bio-bwa.sourceforge.net/
|
||||
documentation: http://www.htslib.org/doc/samtools.html
|
||||
arxiv: arXiv:1303.3997
|
||||
params:
|
||||
- outdir:
|
||||
type: string
|
||||
description: |
|
||||
The pipeline's output directory. By default, the module will
|
||||
output files into `$params.outdir/<SOFTWARE>`
|
||||
- publish_dir_mode:
|
||||
type: string
|
||||
description: |
|
||||
Value for the Nextflow `publishDir` mode parameter.
|
||||
Available: symlink, rellink, link, copy, copyNoFollow, move.
|
||||
- conda:
|
||||
type: boolean
|
||||
description: |
|
||||
Run the module with Conda using the software specified
|
||||
via the `conda` directive
|
||||
input:
|
||||
-
|
||||
- id:
|
||||
type: val
|
||||
description: read/read pair id
|
||||
- reads:
|
||||
type: file
|
||||
description: Input fastq file
|
||||
pattern: "*.{fastq,fq}"
|
||||
- index:
|
||||
type: file
|
||||
description: bwa indexes file
|
||||
pattern: "*.{amb,ann,bwt,pac,sa}"
|
||||
- prefix:
|
||||
type: val
|
||||
description: bwa index prefix, equivalent to index file names without extensions. Usually the reference genome file name unless otherwise specified.
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- reads:
|
||||
type: file
|
||||
description: |
|
||||
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
|
||||
respectively.
|
||||
- index:
|
||||
type: file
|
||||
description: |
|
||||
BWA genome index files
|
||||
pattern: "*.{amb,ann,bwt,pac,sa}"
|
||||
- fasta:
|
||||
type: file
|
||||
description: |
|
||||
Input genome fasta file
|
||||
- options:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing module options for passing command-line arguments and
|
||||
output file paths.
|
||||
output:
|
||||
-
|
||||
- bam:
|
||||
type: file
|
||||
description: Output bam file
|
||||
pattern: "*.bam"
|
||||
- bamindex:
|
||||
type: file
|
||||
description: Output bam index file
|
||||
pattern: "*.bai"
|
||||
|
||||
- bam:
|
||||
type: file
|
||||
description: Output BAM file containing read alignments
|
||||
pattern: "*.bam"
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software version
|
||||
pattern: "*.version.txt"
|
||||
authors:
|
||||
- "@jeremy1805"
|
||||
- "@drpatelh"
|
||||
- "@jeremy1805"
|
||||
|
|
1
software/bwa/mem/test/input/Ecoli_DNA_R1.fastq.gz
Symbolic link
1
software/bwa/mem/test/input/Ecoli_DNA_R1.fastq.gz
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../../tests/data/fastq/dna/Ecoli_DNA_R1.fastq.gz
|
1
software/bwa/mem/test/input/Ecoli_DNA_R2.fastq.gz
Symbolic link
1
software/bwa/mem/test/input/Ecoli_DNA_R2.fastq.gz
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../../tests/data/fastq/dna/Ecoli_DNA_R2.fastq.gz
|
1
software/bwa/mem/test/input/NC_010473.fa
Symbolic link
1
software/bwa/mem/test/input/NC_010473.fa
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../../tests/data/fasta/E_coli/NC_010473.fa
|
1
software/bwa/mem/test/input/index
Symbolic link
1
software/bwa/mem/test/input/index
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../../tests/data/index/E_coli/bwa/
|
48
software/bwa/mem/test/main.nf
Normal file → Executable file
48
software/bwa/mem/test/main.nf
Normal file → Executable file
|
@ -1,13 +1,45 @@
|
|||
#!/usr/bin/env nextflow
|
||||
nextflow.preview.dsl = 2
|
||||
include '../../../../tests/functions/check_process_outputs.nf' params(params)
|
||||
include '../main.nf' params(params)
|
||||
|
||||
reads = '../../../../test-datasets/tools/bwa/mem/reads/*_R{1,2}_001.fastq.gz'
|
||||
index = '../../../../test-datasets/tools/bwa/mem/index/H3N2.{amb,ann,bwt,pac,sa}'
|
||||
prefix = 'H3N2'
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { BWA_MEM } from '../main.nf'
|
||||
|
||||
/*
|
||||
* Test with single-end data
|
||||
*/
|
||||
workflow test_single_end {
|
||||
|
||||
def input = []
|
||||
input = [ [ id:'test', single_end:true ], // meta map
|
||||
[ file("${baseDir}/input/Ecoli_DNA_R1.fastq.gz", checkIfExists: true) ] ]
|
||||
|
||||
BWA_MEM (
|
||||
input,
|
||||
file("${baseDir}/input/index/NC_010473.fa.{amb,ann,bwt,pac,sa}", checkIfExists: true),
|
||||
file("${baseDir}/input/NC_010473.fa", checkIfExists: true),
|
||||
[ publish_dir:'test_single_end' ]
|
||||
)
|
||||
}
|
||||
|
||||
/*
|
||||
* Test with paired-end data
|
||||
*/
|
||||
workflow test_paired_end {
|
||||
|
||||
def input = []
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
[ file("${baseDir}/input/Ecoli_DNA_R1.fastq.gz", checkIfExists: true),
|
||||
file("${baseDir}/input/Ecoli_DNA_R2.fastq.gz", checkIfExists: true) ] ]
|
||||
|
||||
BWA_MEM (
|
||||
input,
|
||||
file("${baseDir}/input/index/NC_010473.fa.{amb,ann,bwt,pac,sa}", checkIfExists: true),
|
||||
file("${baseDir}/input/NC_010473.fa", checkIfExists: true),
|
||||
[ publish_dir:'test_paired_end' ]
|
||||
)
|
||||
}
|
||||
|
||||
workflow {
|
||||
read_input=Channel.fromFilePairs(reads)
|
||||
bwa_mem(read_input,file(index),prefix)
|
||||
test_single_end()
|
||||
test_paired_end()
|
||||
}
|
||||
|
|
|
@ -1,2 +1,20 @@
|
|||
docker.enabled = true
|
||||
params.outdir = './results'
|
||||
|
||||
params {
|
||||
outdir = "output/"
|
||||
publish_dir_mode = "copy"
|
||||
conda = false
|
||||
}
|
||||
|
||||
profiles {
|
||||
conda {
|
||||
params.conda = true
|
||||
}
|
||||
docker {
|
||||
docker.enabled = true
|
||||
docker.runOptions = '-u \$(id -u):\$(id -g)'
|
||||
}
|
||||
singularity {
|
||||
singularity.enabled = true
|
||||
singularity.autoMounts = true
|
||||
}
|
||||
}
|
||||
|
|
BIN
software/bwa/mem/test/output/test_paired_end/test.bam
Normal file
BIN
software/bwa/mem/test/output/test_paired_end/test.bam
Normal file
Binary file not shown.
BIN
software/bwa/mem/test/output/test_single_end/test.bam
Normal file
BIN
software/bwa/mem/test/output/test_single_end/test.bam
Normal file
Binary file not shown.
3
tests/data/index/E_coli/bwa/NC_010473.fa.amb
Normal file
3
tests/data/index/E_coli/bwa/NC_010473.fa.amb
Normal file
|
@ -0,0 +1,3 @@
|
|||
4686137 1 2
|
||||
20895 1 Y
|
||||
142347 1 R
|
3
tests/data/index/E_coli/bwa/NC_010473.fa.ann
Normal file
3
tests/data/index/E_coli/bwa/NC_010473.fa.ann
Normal file
|
@ -0,0 +1,3 @@
|
|||
4686137 1 11
|
||||
0 gi|170079663|ref|NC_010473.1| Escherichia coli str. K-12 substr. DH10B, complete genome
|
||||
0 4686137 2
|
BIN
tests/data/index/E_coli/bwa/NC_010473.fa.bwt
Normal file
BIN
tests/data/index/E_coli/bwa/NC_010473.fa.bwt
Normal file
Binary file not shown.
BIN
tests/data/index/E_coli/bwa/NC_010473.fa.pac
Normal file
BIN
tests/data/index/E_coli/bwa/NC_010473.fa.pac
Normal file
Binary file not shown.
BIN
tests/data/index/E_coli/bwa/NC_010473.fa.sa
Normal file
BIN
tests/data/index/E_coli/bwa/NC_010473.fa.sa
Normal file
Binary file not shown.
Loading…
Reference in a new issue