mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Rename SOFTWARE_TOOL to TOOL_SUBTOOL
This commit is contained in:
parent
dcabde6b85
commit
83a50d8ae0
7 changed files with 103 additions and 82 deletions
66
.github/filters.yml
vendored
66
.github/filters.yml
vendored
|
@ -2,24 +2,48 @@ bandage_image:
|
||||||
- software/bandage/image/**
|
- software/bandage/image/**
|
||||||
- tests/software/bandage/image/**
|
- tests/software/bandage/image/**
|
||||||
|
|
||||||
|
bedtools_complement:
|
||||||
|
- software/bedtools/complement/**
|
||||||
|
- tests/software/bedtools/complement/**
|
||||||
|
|
||||||
|
bedtools_genomecov:
|
||||||
|
- software/bedtools/genomecov/**
|
||||||
|
- tests/software/bedtools/genomecov/**
|
||||||
|
|
||||||
|
bedtools_intersect:
|
||||||
|
- software/bedtools/intersect/**
|
||||||
|
- tests/software/bedtools/intersect/**
|
||||||
|
|
||||||
|
bedtools_merge:
|
||||||
|
- software/bedtools/merge/**
|
||||||
|
- tests/software/bedtools/merge/**
|
||||||
|
|
||||||
|
bedtools_slop:
|
||||||
|
- software/bedtools/slop/**
|
||||||
|
- tests/software/bedtools/slop/**
|
||||||
|
|
||||||
|
bedtools_sort:
|
||||||
|
- software/bedtools/sort/**
|
||||||
|
- tests/software/bedtools/sort/**
|
||||||
|
|
||||||
|
bowtie:
|
||||||
|
- software/bowtie/build/**
|
||||||
|
- tests/software/bowtie/build/**
|
||||||
|
|
||||||
bowtie_align:
|
bowtie_align:
|
||||||
- software/bowtie/align/**
|
- software/bowtie/align/**
|
||||||
- software/bowtie/build/**
|
- software/bowtie/build/**
|
||||||
- tests/software/bowtie/align/**
|
- tests/software/bowtie/align/**
|
||||||
|
|
||||||
bowtie:
|
bowtie2:
|
||||||
- software/bowtie/build/**
|
- software/bowtie2/build/**
|
||||||
- tests/software/bowtie/build/**
|
- tests/software/bowtie2/build/**
|
||||||
|
|
||||||
bowtie2_align:
|
bowtie2_align:
|
||||||
- software/bowtie2/align/**
|
- software/bowtie2/align/**
|
||||||
- software/bowtie2/build/**
|
- software/bowtie2/build/**
|
||||||
- tests/software/bowtie2/align/**
|
- tests/software/bowtie2/align/**
|
||||||
|
|
||||||
bowtie2:
|
|
||||||
- software/bowtie2/build/**
|
|
||||||
- tests/software/bowtie2/build/**
|
|
||||||
|
|
||||||
bwa_index:
|
bwa_index:
|
||||||
- software/bwa/index/**
|
- software/bwa/index/**
|
||||||
- tests/software/bwa/index/**
|
- tests/software/bwa/index/**
|
||||||
|
@ -137,6 +161,10 @@ stringtie:
|
||||||
- software/stringtie/**
|
- software/stringtie/**
|
||||||
- tests/software/stringtie/**
|
- tests/software/stringtie/**
|
||||||
|
|
||||||
|
tool_subtool:
|
||||||
|
- software/tool/subtool/**
|
||||||
|
- tests/software/tool/subtool/**
|
||||||
|
|
||||||
trimgalore:
|
trimgalore:
|
||||||
- software/trimgalore/**
|
- software/trimgalore/**
|
||||||
- tests/software/trimgalore/**
|
- tests/software/trimgalore/**
|
||||||
|
@ -144,27 +172,3 @@ trimgalore:
|
||||||
ucsc_bedgraphtobigwig:
|
ucsc_bedgraphtobigwig:
|
||||||
- software/ucsc/bedgraphtobigwig/**
|
- software/ucsc/bedgraphtobigwig/**
|
||||||
- tests/software/ucsc/bedgraphtobigwig/**
|
- tests/software/ucsc/bedgraphtobigwig/**
|
||||||
|
|
||||||
bedtools_complement:
|
|
||||||
- software/bedtools/complement/**
|
|
||||||
- tests/software/bedtools/complement/**
|
|
||||||
|
|
||||||
bedtools_genomecov:
|
|
||||||
- software/bedtools/genomecov/**
|
|
||||||
- tests/software/bedtools/genomecov/**
|
|
||||||
|
|
||||||
bedtools_intersect:
|
|
||||||
- software/bedtools/intersect/**
|
|
||||||
- tests/software/bedtools/intersect/**
|
|
||||||
|
|
||||||
bedtools_merge:
|
|
||||||
- software/bedtools/merge/**
|
|
||||||
- tests/software/bedtools/merge/**
|
|
||||||
|
|
||||||
bedtools_slop:
|
|
||||||
- software/bedtools/slop/**
|
|
||||||
- tests/software/bedtools/slop/**
|
|
||||||
|
|
||||||
bedtools_sort:
|
|
||||||
- software/bedtools/sort/**
|
|
||||||
- tests/software/bedtools/sort/**
|
|
||||||
|
|
14
README.md
14
README.md
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
> THIS REPOSITORY IS UNDER ACTIVE DEVELOPMENT. SYNTAX, ORGANISATION AND LAYOUT MAY CHANGE WITHOUT NOTICE!
|
> THIS REPOSITORY IS UNDER ACTIVE DEVELOPMENT. SYNTAX, ORGANISATION AND LAYOUT MAY CHANGE WITHOUT NOTICE!
|
||||||
|
|
||||||
|
> PLEASE BE KIND TO OUR CODE REVIEWERS AND SUBMIT ONE PR PER MODULE UPDATE :)
|
||||||
|
|
||||||
A repository for hosting [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) module files containing tool-specific process definitions and their associated documentation.
|
A repository for hosting [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) module files containing tool-specific process definitions and their associated documentation.
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
@ -119,19 +121,19 @@ for examples.
|
||||||
|
|
||||||
### Module template
|
### Module template
|
||||||
|
|
||||||
We have added a directory called [`software/SOFTWARE/TOOL/`](software/SOFTWARE/TOOL/) that serves as a template with which to create your own module submission. Where applicable, we have added extensive `TODO` statements to the files in this directory for general information, to help guide you as to where to make the appropriate changes, and how to make them. If in doubt, have a look at how we have done things for other modules.
|
We have added a directory called [`software/TOOL/SUBTOOL/`](software/TOOL/SUBTOOL/) that serves as a template with which to create your own module and [`tests/TOOL/SUBTOOL/`](tests/TOOL/SUBTOOL/) for adding the required CI tests. Where applicable, we have added extensive `TODO` statements for general information, to help guide you as to where to make the appropriate changes, and how to make them. If in doubt, have a look at how we have done things for other modules.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
.
|
.
|
||||||
├── software
|
├── software
|
||||||
│ └── SOFTWARE
|
│ └── TOOL
|
||||||
│ └── TOOL
|
│ └── SUBTOOL
|
||||||
│ ├── functions.nf ## Utility functions imported in main module script
|
│ ├── functions.nf ## Utility functions imported in main module script
|
||||||
│ ├── main.nf ## Main module script
|
│ ├── main.nf ## Main module script
|
||||||
│ └── meta.yml ## Documentation for module, input, output, params, author
|
│ └── meta.yml ## Documentation for module, input, output, params, author
|
||||||
├── test
|
├── tests
|
||||||
│ └── SOFTWARE
|
│ └── TOOL
|
||||||
│ └── TOOL
|
│ └── SUBTOOL
|
||||||
│ ├── main.nf ## Minimal workflow to test module
|
│ ├── main.nf ## Minimal workflow to test module
|
||||||
│ └── test.yml ## Pytest-workflow test file
|
│ └── test.yml ## Pytest-workflow test file
|
||||||
```
|
```
|
||||||
|
|
|
@ -22,8 +22,8 @@ params.options = [:]
|
||||||
def options = initOptions(params.options)
|
def options = initOptions(params.options)
|
||||||
|
|
||||||
// TODO nf-core: Process name MUST be all uppercase,
|
// TODO nf-core: Process name MUST be all uppercase,
|
||||||
// "SOFTWARE" and (ideally) "TOOL" MUST be all one word separated by an "_".
|
// "TOOL" and (ideally) "SUBTOOL" MUST be all one word separated by an "_".
|
||||||
process SOFTWARE_TOOL {
|
process TOOL_SUBTOOL {
|
||||||
// TODO nf-core: If a meta map of sample information is NOT provided in "input:" section
|
// TODO nf-core: If a meta map of sample information is NOT provided in "input:" section
|
||||||
// change tag value to another appropriate input value e.g. tag "$fasta"
|
// change tag value to another appropriate input value e.g. tag "$fasta"
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
|
@ -40,10 +40,7 @@ process SOFTWARE_TOOL {
|
||||||
// Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10") and build (i.e. "h9402c20_2") as in the example below.
|
// Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10") and build (i.e. "h9402c20_2") as in the example below.
|
||||||
conda (params.enable_conda ? "bioconda::samtools=1.10=h9402c20_2" : null)
|
conda (params.enable_conda ? "bioconda::samtools=1.10=h9402c20_2" : null)
|
||||||
|
|
||||||
// TODO nf-core: Fetch "docker pull" address for latest BioContainer image of software: e.g. https://biocontainers.pro/#/tools/samtools
|
// TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below.
|
||||||
// Click on the Pacakages and Containers tab, sort by Version and get the portion of the link after the docker pull command where Type is Docker.
|
|
||||||
// You may need to double-check that you are using the latest version of the software because you may find that containers for older versions have been rebuilt more recently.
|
|
||||||
// If required, multi-tool containers may also be available and are usually named to start with "mulled".
|
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
container "https://depot.galaxyproject.org/singularity/samtools:1.10--h9402c20_2"
|
container "https://depot.galaxyproject.org/singularity/samtools:1.10--h9402c20_2"
|
||||||
} else {
|
} else {
|
||||||
|
@ -57,7 +54,7 @@ process SOFTWARE_TOOL {
|
||||||
// https://github.com/nf-core/modules/blob/master/software/bwa/index/main.nf
|
// https://github.com/nf-core/modules/blob/master/software/bwa/index/main.nf
|
||||||
// TODO nf-core: Where applicable please provide/convert compressed files as input/output
|
// TODO nf-core: Where applicable please provide/convert compressed files as input/output
|
||||||
// e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc.
|
// e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc.
|
||||||
tuple val(meta), path(reads)
|
tuple val(meta), path(bam)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
// TODO nf-core: Named file extensions MUST be emitted for ALL output channels
|
// TODO nf-core: Named file extensions MUST be emitted for ALL output channels
|
||||||
|
@ -66,6 +63,7 @@ process SOFTWARE_TOOL {
|
||||||
// TODO nf-core: List additional required output channels/values here
|
// TODO nf-core: List additional required output channels/values here
|
||||||
path "*.version.txt" , emit: version
|
path "*.version.txt" , emit: version
|
||||||
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
// TODO nf-core: If a meta map of sample information is NOT provided in "input:" section delete the line below
|
// TODO nf-core: If a meta map of sample information is NOT provided in "input:" section delete the line below
|
||||||
|
@ -78,11 +76,13 @@ process SOFTWARE_TOOL {
|
||||||
// using the Nextflow "task" variable e.g. "--threads $task.cpus"
|
// using the Nextflow "task" variable e.g. "--threads $task.cpus"
|
||||||
// TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;)
|
// TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;)
|
||||||
"""
|
"""
|
||||||
software tool \\
|
samtools \\
|
||||||
|
sort \\
|
||||||
$options.args \\
|
$options.args \\
|
||||||
--threads $task.cpus \\
|
-@ $task.cpus \\
|
||||||
$reads \\
|
-o ${prefix}.bam \\
|
||||||
> ${prefix}.bam
|
-T $prefix \\
|
||||||
|
$bam
|
||||||
|
|
||||||
echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' > ${software}.version.txt
|
echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' > ${software}.version.txt
|
||||||
"""
|
"""
|
|
@ -1,25 +1,24 @@
|
||||||
## TODO nf-core: Please delete all of these TODO statements once the file has been curated
|
## TODO nf-core: Please delete all of these TODO statements once the file has been curated
|
||||||
## TODO nf-core: Change the name of "software_tool" below
|
## TODO nf-core: Change the name of "tool_subtool" below
|
||||||
name: software_tool
|
name: tool_subtool
|
||||||
## TODO nf-core: Add a description and keywords
|
## TODO nf-core: Add a description and keywords
|
||||||
description: Run FastQC on sequenced reads
|
description: Sort SAM/BAM/CRAM file
|
||||||
keywords:
|
keywords:
|
||||||
- quality control
|
- sort
|
||||||
- qc
|
- bam
|
||||||
- adapters
|
- sam
|
||||||
- fastq
|
- cram
|
||||||
tools:
|
tools:
|
||||||
## TODO nf-core: Change the name of "software" below
|
## TODO nf-core: Change the name of the tool below
|
||||||
- software:
|
- samtools:
|
||||||
## TODO nf-core: Add a description and other details for the software below
|
## TODO nf-core: Add a description and other details for the software below
|
||||||
description: |
|
description: |
|
||||||
FastQC gives general quality metrics about your reads.
|
SAMtools is a set of utilities for interacting with and post-processing
|
||||||
It provides information about the quality score distribution
|
short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li.
|
||||||
across your reads, the per base sequence content (%A/C/G/T).
|
These files are generated as output by short read aligners like BWA.
|
||||||
You get information about adapter contamination and other
|
homepage: http://www.htslib.org/
|
||||||
overrepresented sequences.
|
documentation: hhttp://www.htslib.org/doc/samtools.html
|
||||||
homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/
|
doi: 10.1093/bioinformatics/btp352
|
||||||
documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/
|
|
||||||
## TODO nf-core: If you are using any additional "params" in the main.nf script of the module add them below
|
## TODO nf-core: If you are using any additional "params" in the main.nf script of the module add them below
|
||||||
params:
|
params:
|
||||||
- outdir:
|
- outdir:
|
||||||
|
@ -49,11 +48,10 @@ input:
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
- reads:
|
- bam:
|
||||||
type: file
|
type: file
|
||||||
description: |
|
description: BAM/CRAM/SAM file
|
||||||
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
|
pattern: "*.{bam,cram,sam}"
|
||||||
respectively.
|
|
||||||
## TODO nf-core: Add a description of all of the variables used as output
|
## TODO nf-core: Add a description of all of the variables used as output
|
||||||
output:
|
output:
|
||||||
- meta:
|
- meta:
|
||||||
|
@ -61,14 +59,10 @@ output:
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
- html:
|
- bam:
|
||||||
type: file
|
type: file
|
||||||
description: FastQC report
|
description: Sorted BAM/CRAM/SAM file
|
||||||
pattern: "*_{fastqc.html}"
|
pattern: "*.{bam,cram,sam}"
|
||||||
- zip:
|
|
||||||
type: file
|
|
||||||
description: FastQC report archive
|
|
||||||
pattern: "*_{fastqc.zip}"
|
|
||||||
- version:
|
- version:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software version
|
description: File containing software version
|
13
tests/software/TOOL/SUBTOOL/main.nf
Normal file
13
tests/software/TOOL/SUBTOOL/main.nf
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { TOOL_SUBTOOL } from '../../../../software/TOOL/SUBTOOL/main.nf' addParams( options: [:] )
|
||||||
|
|
||||||
|
workflow test_tool_subtool {
|
||||||
|
def input = []
|
||||||
|
input = [ [ id:'test', single_end:false ], // meta map
|
||||||
|
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true) ]
|
||||||
|
|
||||||
|
TOOL_SUBTOOL ( input )
|
||||||
|
}
|
8
tests/software/TOOL/SUBTOOL/test.yml
Normal file
8
tests/software/TOOL/SUBTOOL/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
- name: tool subtool
|
||||||
|
command: nextflow run ./tests/software/TOOL/SUBTOOL -entry test_tool_subtool -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- tool
|
||||||
|
- tool_subtool
|
||||||
|
files:
|
||||||
|
- path: output/tool/test.bam
|
||||||
|
md5sum: a41bfadacd2eeef1d31e05c135cc4f4e
|
Loading…
Reference in a new issue