mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Added tools/bwa/mem
This commit is contained in:
parent
f62fad63ca
commit
a4836ae3c3
7 changed files with 105 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,4 +2,5 @@
|
|||
work/
|
||||
data/
|
||||
results/
|
||||
tools/bwa/mem_ignore
|
||||
.DS_Store
|
||||
|
|
9
tools/bwa/mem/Dockerfile
Normal file
9
tools/bwa/mem/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM nfcore/base
|
||||
LABEL authors="Jeremy Guntoro" \
|
||||
description="Docker image containing all requirements for nf-core/modules/bwa/mem module"
|
||||
|
||||
COPY environment.yml /
|
||||
RUN conda env create -f /environment.yml && conda clean -a
|
||||
ENV PATH /opt/conda/envs/nf-core-bwa-mem/bin:$PATH
|
||||
|
||||
|
10
tools/bwa/mem/environment.yml
Normal file
10
tools/bwa/mem/environment.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
# You can use this file to create a conda environment for this pipeline:
|
||||
# conda env create -f environment.yml
|
||||
name: nf-core-bwa-mem
|
||||
channels:
|
||||
- conda-forge
|
||||
- bioconda
|
||||
- defaults
|
||||
dependencies:
|
||||
- bioconda::bwa=0.7.17
|
||||
- bioconda::samtools=1.9
|
27
tools/bwa/mem/main.nf
Normal file
27
tools/bwa/mem/main.nf
Normal file
|
@ -0,0 +1,27 @@
|
|||
params.bwa_options = "-M -B 2"
|
||||
params.sequencer = "ILLUMINA"
|
||||
|
||||
process bwa_mem {
|
||||
tag {id}
|
||||
|
||||
publishDir "${params.outdir}/bwa_mem", mode: 'copy'
|
||||
|
||||
//TO-DO: Change container declaration, for now a test container is present in my personal docker acccount
|
||||
container 'jeremy1805/bwa-mem-img'
|
||||
|
||||
input:
|
||||
tuple val(id), path(reads)
|
||||
path genomeindex
|
||||
val indexprefix
|
||||
|
||||
output:
|
||||
tuple path("*.bam"), path("*.bai")
|
||||
|
||||
script:
|
||||
"""
|
||||
bwa mem -t ${task.cpus} -R "@RG\\tID:${id}\\tLB:${id}\\tSM:${id}\\tPL:${params.sequencer}" \\
|
||||
${params.bwa_options} ${indexprefix} ${reads} | samtools sort -@8 -O BAM -o ${id}.bam -
|
||||
|
||||
samtools index ${id}.bam
|
||||
"""
|
||||
}
|
43
tools/bwa/mem/meta.yml
Normal file
43
tools/bwa/mem/meta.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: bwa mem
|
||||
description: Performs fastq alignment to a fasta reference using the burrows-wheeler aligner
|
||||
keywords:
|
||||
- mem
|
||||
- bwa
|
||||
- alignment
|
||||
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
|
||||
input:
|
||||
-
|
||||
- id:
|
||||
type: val
|
||||
description: read id for paired-end sequences
|
||||
- reads:
|
||||
type: file
|
||||
description: Input fastq file
|
||||
pattern: *.{fastq,fq}
|
||||
- genome:
|
||||
type: file
|
||||
description: Input fasta reference genome
|
||||
pattern: *.{fasta,fa}
|
||||
- index:
|
||||
type: file
|
||||
description: bwa indexes file
|
||||
pattern: *.{fasta,fa}.{amb,ann,bwt,pac,sa}
|
||||
output:
|
||||
-
|
||||
- bam:
|
||||
type: file
|
||||
description: Output bam file
|
||||
pattern: *.bam
|
||||
- bamindex:
|
||||
type: file
|
||||
description: Output bam index file
|
||||
pattern: *.bai
|
||||
|
||||
authors:
|
||||
- @jeremy1805
|
13
tools/bwa/mem/test/main.nf
Normal file
13
tools/bwa/mem/test/main.nf
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env nextflow
|
||||
nextflow.preview.dsl = 2
|
||||
include '../../../../nf-core/module_testing/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'
|
||||
|
||||
workflow {
|
||||
read_input=Channel.fromFilePairs(reads)
|
||||
bwa_mem(read_input,file(index),prefix)
|
||||
}
|
2
tools/bwa/mem/test/nextflow.config
Normal file
2
tools/bwa/mem/test/nextflow.config
Normal file
|
@ -0,0 +1,2 @@
|
|||
docker.enabled = true
|
||||
params.outdir = './results'
|
Loading…
Reference in a new issue