Merge pull request #61 from drpatelh/master

Add docs and tests for BWA index
This commit is contained in:
Harshil Patel 2020-08-07 13:01:10 +01:00 committed by GitHub
commit efce3024de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 116 additions and 37 deletions

30
.github/workflows/bwa_index.yml vendored Normal file
View file

@ -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

View file

@ -1,25 +1,52 @@
name: bwa index name: bwa_index
description: create indexes for BWA from a fasta file description: Create BWA index for reference genome
keywords: keywords:
- index - index
- fasta
- genome
tools: tools:
- bwa: - bwa:
description: | description: |
BWA is a software package for mapping DNA sequences against a large reference genome, such as the human genome. 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/ homepage: http://bio-bwa.sourceforge.net/
documentation: http://www.htslib.org/doc/samtools.html documentation: http://www.htslib.org/doc/samtools.html
arxiv: arXiv:1303.3997 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: input:
- - fasta:
- input:
type: file type: file
description: Input fasta file description: |
pattern: "*.{fasta,fa}" Input genome fasta file
- options:
type: map
description: |
Groovy Map containing module options for passing command-line arguments and
output file paths.
output: output:
-
- index: - index:
type: file type: file
description: bwa indexes file description: BWA genome index files
pattern: "*.{fasta,fa}.{amb,ann,bwt,pac,sa}" pattern: "*.{fasta}.{amb,ann,bwt,pac,sa}"
- version:
type: file
description: File containing software version
pattern: "*.version.txt"
authors: authors:
- "@drpatelh"
- "@maxulysse" - "@maxulysse"

View file

@ -0,0 +1 @@
../../../../../tests/data/fasta/E_coli/NC_010473.fa

View file

@ -1,16 +1,13 @@
#!/usr/bin/env nextflow #!/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 nextflow.enable.dsl = 2
input = '../../../test-datasets/tools/bwa/index/input/reference.fasta'
Channel
.from(input)
.set { ch_input }
// Run the workflow include { BWA_INDEX } from '../main.nf'
workflow {
fastqc(ch_input) workflow test {
// .check_output() BWA_INDEX ( file("${baseDir}/input/NC_010473.fa", checkIfExists: true), [:] )
}
workflow {
test()
} }

View file

@ -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
}
}

View file

@ -0,0 +1,3 @@
4686137 1 2
20895 1 Y
142347 1 R

View 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

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,9 +1,9 @@
name: fastqc name: fastqc
description: Run FastQC on sequenced reads description: Run FastQC on sequenced reads
keywords: keywords:
- Quality Control - quality control
- QC - qc
- Adapters - adapters
tools: tools:
- fastqc: - fastqc:
description: | description: |