diff --git a/.github/workflows/bwa_index.yml b/.github/workflows/bwa_index.yml new file mode 100644 index 00000000..c15c35c9 --- /dev/null +++ b/.github/workflows/bwa_index.yml @@ -0,0 +1,30 @@ +name: bwa_index +on: + push: + paths: + - software/bwa/index/** + - .github/workflows/bwa_index.yml + - tests + pull_request: + paths: + - software/bwa/index/** + - .github/workflows/bwa_index.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/index/test/ -profile docker diff --git a/software/bwa/index/meta.yml b/software/bwa/index/meta.yml index 49fa3c44..996ec439 100644 --- a/software/bwa/index/meta.yml +++ b/software/bwa/index/meta.yml @@ -1,25 +1,52 @@ -name: bwa index -description: create indexes for BWA from a fasta file +name: bwa_index +description: Create BWA index for reference genome keywords: - - index + - index + - fasta + - genome 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/` + - 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: - - - - input: - type: file - description: Input fasta file - pattern: "*.{fasta,fa}" + - 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: - - - - index: - type: file - description: bwa indexes file - pattern: "*.{fasta,fa}.{amb,ann,bwt,pac,sa}" + - index: + type: file + description: BWA genome index files + pattern: "*.{fasta}.{amb,ann,bwt,pac,sa}" + - version: + type: file + description: File containing software version + pattern: "*.version.txt" authors: - - "@maxulysse" + - "@drpatelh" + - "@maxulysse" diff --git a/software/bwa/index/test/input/NC_010473.fa b/software/bwa/index/test/input/NC_010473.fa new file mode 120000 index 00000000..d2298ff8 --- /dev/null +++ b/software/bwa/index/test/input/NC_010473.fa @@ -0,0 +1 @@ +../../../../../tests/data/fasta/E_coli/NC_010473.fa \ No newline at end of file diff --git a/software/bwa/index/test/main.nf b/software/bwa/index/test/main.nf index 8e36c9ac..0a2c3303 100644 --- a/software/bwa/index/test/main.nf +++ b/software/bwa/index/test/main.nf @@ -1,16 +1,13 @@ #!/usr/bin/env nextflow -nextflow.preview.dsl = 2 -include '../../../tests/functions/check_process_outputs.nf' params(params) -include '../main.nf' params(params) -// Define input channels -input = '../../../test-datasets/tools/bwa/index/input/reference.fasta' -Channel - .from(input) - .set { ch_input } +nextflow.enable.dsl = 2 -// Run the workflow -workflow { - fastqc(ch_input) - // .check_output() +include { BWA_INDEX } from '../main.nf' + +workflow test { + BWA_INDEX ( file("${baseDir}/input/NC_010473.fa", checkIfExists: true), [:] ) +} + +workflow { + test() } diff --git a/software/bwa/index/test/nextflow.config b/software/bwa/index/test/nextflow.config index c137a138..ddb59275 100644 --- a/software/bwa/index/test/nextflow.config +++ b/software/bwa/index/test/nextflow.config @@ -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 + } +} diff --git a/software/bwa/index/test/output/bwa/NC_010473.fa.amb b/software/bwa/index/test/output/bwa/NC_010473.fa.amb new file mode 100644 index 00000000..7355c4ea --- /dev/null +++ b/software/bwa/index/test/output/bwa/NC_010473.fa.amb @@ -0,0 +1,3 @@ +4686137 1 2 +20895 1 Y +142347 1 R diff --git a/software/bwa/index/test/output/bwa/NC_010473.fa.ann b/software/bwa/index/test/output/bwa/NC_010473.fa.ann new file mode 100644 index 00000000..ddfe94ec --- /dev/null +++ b/software/bwa/index/test/output/bwa/NC_010473.fa.ann @@ -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 diff --git a/software/bwa/index/test/output/bwa/NC_010473.fa.bwt b/software/bwa/index/test/output/bwa/NC_010473.fa.bwt new file mode 100644 index 00000000..855b64ae Binary files /dev/null and b/software/bwa/index/test/output/bwa/NC_010473.fa.bwt differ diff --git a/software/bwa/index/test/output/bwa/NC_010473.fa.pac b/software/bwa/index/test/output/bwa/NC_010473.fa.pac new file mode 100644 index 00000000..3aebd5a6 Binary files /dev/null and b/software/bwa/index/test/output/bwa/NC_010473.fa.pac differ diff --git a/software/bwa/index/test/output/bwa/NC_010473.fa.sa b/software/bwa/index/test/output/bwa/NC_010473.fa.sa new file mode 100644 index 00000000..3ad7129d Binary files /dev/null and b/software/bwa/index/test/output/bwa/NC_010473.fa.sa differ diff --git a/software/fastqc/meta.yml b/software/fastqc/meta.yml index e97c4cc0..5e362aa1 100644 --- a/software/fastqc/meta.yml +++ b/software/fastqc/meta.yml @@ -1,9 +1,9 @@ name: fastqc description: Run FastQC on sequenced reads keywords: - - Quality Control - - QC - - Adapters + - quality control + - qc + - adapters tools: - fastqc: description: |