From 9d67da2b2ccbbc2fb44daa23421022e6a38ea45c Mon Sep 17 00:00:00 2001 From: kevinmenden Date: Tue, 8 Dec 2020 13:40:32 +0100 Subject: [PATCH] added module yml files --- software/bowtie/align/main.nf | 1 - software/bowtie/align/meta.yml | 57 ++++++++++++++++++++++++++++++++++ software/bowtie/index/main.nf | 1 - software/bowtie/index/meta.yml | 46 +++++++++++++++++++++++++++ tests/software/bowtie/main.nf | 26 ++++++++++++++++ tests/software/bowtie/test.yml | 32 +++++++++++++++++++ 6 files changed, 161 insertions(+), 2 deletions(-) create mode 100644 tests/software/bowtie/main.nf create mode 100644 tests/software/bowtie/test.yml diff --git a/software/bowtie/align/main.nf b/software/bowtie/align/main.nf index 18ee4705..3885ecbe 100644 --- a/software/bowtie/align/main.nf +++ b/software/bowtie/align/main.nf @@ -17,7 +17,6 @@ process BOWTIE_ALIGN { input: tuple val(meta), path(reads) path index - path gtf output: tuple val(meta), path("*.sam") , emit: sam diff --git a/software/bowtie/align/meta.yml b/software/bowtie/align/meta.yml index e69de29b..5b604289 100644 --- a/software/bowtie/align/meta.yml +++ b/software/bowtie/align/meta.yml @@ -0,0 +1,57 @@ +name: bowtie_align +description: Align reads to a reference genome using bowtie +keywords: + - align + - fasta + - genome + - reference +tools: + - bowtie: + description: | + bowtie is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bowtie-bio.sourceforge.net/index.shtml + documentation: http://bowtie-bio.sourceforge.net/manual.shtml + arxiv: arXiv:1303.3997 +params: + - outdir: + type: string + description: | + The pipeline's output directory. By default, the module will + output files into `$params.outdir/` + - publish_dir_mode: + type: string + description: | + Value for the Nextflow `publishDir` mode parameter. + Available: symlink, rellink, link, copy, copyNoFollow, move. + - enable_conda: + type: boolean + description: | + Run the module with Conda using the software specified + via the `conda` directive +input: + - 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: Bowtie genome index files + pattern: "*.ebwt" +output: + - index: + type: file + description: Bowtie genome index files + pattern: "*.ebwt" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@kevinmenden" diff --git a/software/bowtie/index/main.nf b/software/bowtie/index/main.nf index 36f88451..553651d5 100644 --- a/software/bowtie/index/main.nf +++ b/software/bowtie/index/main.nf @@ -17,7 +17,6 @@ process BOWTIE_INDEX { input: path fasta - path gtf output: path "*.index*" , emit: index diff --git a/software/bowtie/index/meta.yml b/software/bowtie/index/meta.yml index e69de29b..0a8c23f7 100644 --- a/software/bowtie/index/meta.yml +++ b/software/bowtie/index/meta.yml @@ -0,0 +1,46 @@ +name: bowtie_index +description: Create bowtie index for reference genome +keywords: + - index + - fasta + - genome + - reference +tools: + - bowtie: + description: | + bowtie is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bowtie-bio.sourceforge.net/index.shtml + documentation: http://bowtie-bio.sourceforge.net/manual.shtml + arxiv: arXiv:1303.3997 +params: + - outdir: + type: string + description: | + The pipeline's output directory. By default, the module will + output files into `$params.outdir/` + - publish_dir_mode: + type: string + description: | + Value for the Nextflow `publishDir` mode parameter. + Available: symlink, rellink, link, copy, copyNoFollow, move. + - enable_conda: + type: boolean + description: | + Run the module with Conda using the software specified + via the `conda` directive +input: + - fasta: + type: file + description: Input genome fasta file +output: + - index: + type: file + description: Bowtie genome index files + pattern: "*.ebwt" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@kevinmenden" diff --git a/tests/software/bowtie/main.nf b/tests/software/bowtie/main.nf new file mode 100644 index 00000000..1f6a54ff --- /dev/null +++ b/tests/software/bowtie/main.nf @@ -0,0 +1,26 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BOWTIE_INDEX } from '../../../software/bowtie/index/main.nf' addParams( options: [:] ) +include { BOWTIE_ALIGN } from '../../../software/bowtie/align/main.nf' addParams( options: [:] ) + + + +workflow test_bowtie_index { + fasta = file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true) + BOWTIE_INDEX ( fasta ) +} + +workflow test_bowtie_alignment_single_end { + + fasta = file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true) + BOWTIE_INDEX ( fasta ) +} + + def input = [] + input = [ [ id:'test', single_end:true ], // meta map + [ file("${launchDir}/tests/data/fastq/dna/Ecoli_DNA_R1.fastq.gz", checkIfExists: true) ] ] + BOWTIE_ALIGN ( input, BOWTIE_INDEX.index ) +} + diff --git a/tests/software/bowtie/test.yml b/tests/software/bowtie/test.yml new file mode 100644 index 00000000..f1bd09fd --- /dev/null +++ b/tests/software/bowtie/test.yml @@ -0,0 +1,32 @@ +- name: Run bowtie index + command: nextflow run ./tests/software/bwa -profile docker -entry test_bwa_index -c tests/config/nextflow.config + tags: + - bwa + - bwa_index + files: + - path: output/bwa/NC_010473.fa.amb + md5sum: 942a990ae872f1c0b8d72dda2db405d5 + - path: output/bwa/NC_010473.fa.bwt + md5sum: 7301b52e2ecb893d429a49fa692447ae + - path: output/bwa/NC_010473.fa.pac + md5sum: 4d5e6fc45bbc968f7f859e9ca2cc89ad + - path: output/bwa/NC_010473.fa.sa + md5sum: a47dcc92e750e2f16fbd979b8ff9538e + +- name: Run bwa mem single-end + command: nextflow run ./tests/software/bwa -profile docker -entry test_bwa_mem_single_end -c tests/config/nextflow.config + tags: + - bwa + - bwa_mem + files: + - path: output/test_single_end/test.bam + md5sum: 3ee21210bac387e0335008146e4728bc + +- name: Run bwa mem paired-end + command: nextflow run ./tests/software/bwa -profile docker -entry test_bwa_mem_paired_end -c tests/config/nextflow.config + tags: + - bwa + - bwa_mem + files: + - path: output/test_paired_end/test.bam + md5sum: 510d8acc6448c07cdacce8e64ec0904c