From a547f27f2181c821d09b1caf5a47414c03c4759f Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 11 Jul 2020 13:41:31 +0200 Subject: [PATCH 1/7] New GitHub Action to lint code style --- .github/workflows/lint-code.yml | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/lint-code.yml diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml new file mode 100644 index 00000000..df26d0b0 --- /dev/null +++ b/.github/workflows/lint-code.yml @@ -0,0 +1,53 @@ +name: Lint Code +on: [push, pull_request] + +jobs: + Markdown: + name: Test Markdown syntax + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + with: + node-version: '10' + + - name: Install markdownlint + run: npm install -g markdownlint-cli + + - name: Run Markdownlint + run: markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml + + EditorConfig: + name: Test Editor Config rules + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + with: + node-version: '10' + + - name: Install ECLint + run: npm install -g eclint + + - name: Run ECLint check + run: eclint check $(git ls-files | grep -v test) + + YAML: + name: Test YAML syntax + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v1 + + - name: Install NodeJS + uses: actions/setup-node@v1 + with: + node-version: '10' + + - name: Install yaml-lint + run: npm install -g yaml-lint + + - name: Run yaml-lint + run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yaml" -or -name "*.yml") From ae38a9bf4164f502a113c1fadabd1e9474cbb595 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 11 Jul 2020 13:42:13 +0200 Subject: [PATCH 2/7] Fix editor config styles --- .gitmodules | 4 +- README.md | 2 +- tools/bowtie2/main.nf | 74 +++++++++++++++++------------------ tools/bowtie2/meta.yml | 2 +- tools/bwa/index/main.nf | 2 +- tools/bwa/mem/Dockerfile | 4 +- tools/cutadapt/main.nf | 28 ++++++------- tools/cutadapt/meta.yml | 6 +-- tools/fastq_screen/main.nf | 54 ++++++++++++------------- tools/fastqc/Dockerfile | 2 +- tools/fastqc/main.nf | 44 ++++++++++----------- tools/fastqc/meta.yml | 2 +- tools/gatk/dict/main.nf | 2 +- tools/gatk/dict/meta.yml | 2 +- tools/hisat2/main.nf | 8 ++-- tools/hisat2/meta.yml | 2 +- tools/htslib/tabix/meta.yml | 2 +- tools/multiqc/main.nf | 32 +++++++-------- tools/samtools/Dockerfile | 2 +- tools/samtools/faidx/meta.yml | 2 +- tools/shovill/main.nf | 4 +- tools/tcoffee/main.nf | 1 - tools/trim_galore/Dockerfile | 2 +- tools/trim_galore/main.nf | 65 +++++++++++++++--------------- tools/trim_galore/meta.yml | 2 +- tools/umi_tools/Dockerfile | 4 +- tools/umi_tools/main.nf | 2 +- tools/umi_tools/umi_tools.yml | 7 ++-- 28 files changed, 179 insertions(+), 184 deletions(-) diff --git a/.gitmodules b/.gitmodules index 15bfef35..44e06649 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "test-datasets"] - path = test-datasets - url = https://github.com/nf-core/test-datasets.git + path = test-datasets + url = https://github.com/nf-core/test-datasets.git diff --git a/README.md b/README.md index 276f8943..7730d9c7 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The features offered by Nextflow DSL 2 can be used in various ways depending on * *Module*: A `process`that can be used within different pipelines and is as atomic as possible i.e. cannot be split into another module. An example of this would be a module file containing the process definition for a single tool such as `FastQC`. This repository has been created to only host atomic module files that should be added to the `tools` sub-directory along with the required documentation, software and tests. * *Sub-workflow*: A chain of multiple modules that offer a higher-level of functionality within the context of a pipeline. For example, a sub-workflow to run multiple QC tools with FastQ files as input. Sub-workflows should be shipped with the pipeline implementation and if required they should be shared amongst different pipelines directly from there. As it stands, this repository will not host sub-workflows. -* *Workflow*: What DSL 1 users would consider an end-to-end pipeline. For example, from one or more inputs to a series of outputs. This can either be implemented using a large monolithic script as with DSL 1, or by using a combination of DSL 2 individual modules and sub-workflows. +* *Workflow*: What DSL 1 users would consider an end-to-end pipeline. For example, from one or more inputs to a series of outputs. This can either be implemented using a large monolithic script as with DSL 1, or by using a combination of DSL 2 individual modules and sub-workflows. ## Using existing modules diff --git a/tools/bowtie2/main.nf b/tools/bowtie2/main.nf index 6d1dc55e..467a5761 100644 --- a/tools/bowtie2/main.nf +++ b/tools/bowtie2/main.nf @@ -2,51 +2,51 @@ nextflow.preview.dsl=2 params.genome = '' process BOWTIE2 { - // depending on the genome used one might want/need to adjust the memory settings. - // For the E. coli test data this is probably not required + // depending on the genome used one might want/need to adjust the memory settings. + // For the E. coli test data this is probably not required + + // label 'bigMem' + // label 'multiCore' - // label 'bigMem' - // label 'multiCore' - input: - tuple val(name), path(reads) - val (outdir) - val (bowtie2_args) - val (verbose) + tuple val(name), path(reads) + val (outdir) + val (bowtie2_args) + val (verbose) - output: - path "*bam", emit: bam - path "*stats.txt", emit: stats + output: + path "*bam", emit: bam + path "*stats.txt", emit: stats - publishDir "$outdir/bowtie2", - mode: "copy", overwrite: true + publishDir "$outdir/bowtie2", + mode: "copy", overwrite: true - script: - if (verbose){ - println ("[MODULE] BOWTIE2 ARGS: " + bowtie2_args) - } + script: + if (verbose){ + println ("[MODULE] BOWTIE2 ARGS: " + bowtie2_args) + } - cores = 4 + cores = 4 - readString = "" + readString = "" - // Options we add are - bowtie2_options = bowtie2_args - bowtie2_options += " --no-unal " // We don't need unaligned reads in the BAM file - - // single-end / paired-end distinction. Might also be handled via params.single_end - if (reads instanceof List) { - readString = "-1 " + reads[0] + " -2 " + reads[1] - } - else { - readString = "-U " + reads - } - - index = params.genome["bowtie2"] - bowtie2_name = name + "_" + params.genome["name"] + // Options we add are + bowtie2_options = bowtie2_args + bowtie2_options += " --no-unal " // We don't need unaligned reads in the BAM file - """ - bowtie2 -x ${index} -p ${cores} ${bowtie2_options} ${readString} 2>${bowtie2_name}_bowtie2_stats.txt | samtools view -bS -F 4 -F 8 -F 256 -> ${bowtie2_name}_bowtie2.bam - """ + // single-end / paired-end distinction. Might also be handled via params.single_end + if (reads instanceof List) { + readString = "-1 " + reads[0] + " -2 " + reads[1] + } + else { + readString = "-U " + reads + } + + index = params.genome["bowtie2"] + bowtie2_name = name + "_" + params.genome["name"] + + """ + bowtie2 -x ${index} -p ${cores} ${bowtie2_options} ${readString} 2>${bowtie2_name}_bowtie2_stats.txt | samtools view -bS -F 4 -F 8 -F 256 -> ${bowtie2_name}_bowtie2.bam + """ } diff --git a/tools/bowtie2/meta.yml b/tools/bowtie2/meta.yml index b3b31a94..f30ee823 100644 --- a/tools/bowtie2/meta.yml +++ b/tools/bowtie2/meta.yml @@ -1,4 +1,4 @@ -name: Bowtie 2 +name: Bowtie 2 description: Ultrafast alignment to reference genome keywords: - Alignment diff --git a/tools/bwa/index/main.nf b/tools/bwa/index/main.nf index 0c943bb4..051ed70e 100644 --- a/tools/bwa/index/main.nf +++ b/tools/bwa/index/main.nf @@ -13,4 +13,4 @@ process bwa_index { """ bwa index ${fasta} """ -} \ No newline at end of file +} diff --git a/tools/bwa/mem/Dockerfile b/tools/bwa/mem/Dockerfile index 0be4dc78..9a3e0caa 100644 --- a/tools/bwa/mem/Dockerfile +++ b/tools/bwa/mem/Dockerfile @@ -1,9 +1,7 @@ FROM nfcore/base LABEL authors="Jeremy Guntoro" \ - description="Docker image containing all requirements for nf-core/modules/bwa/mem module" + 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 - - diff --git a/tools/cutadapt/main.nf b/tools/cutadapt/main.nf index bdd444af..734b30b1 100644 --- a/tools/cutadapt/main.nf +++ b/tools/cutadapt/main.nf @@ -13,27 +13,27 @@ process cutadapt { forward_fq = "trimmed_1.fastq" reverse_fq = "trimmed_2.fastq" - + if (params.singleEnd) { processing = """ cutadapt \ - -j ${task.cpus} \ - -q $params.cutadapt_min_quality \ - --minimum-length $params.cutadapt_min_length \ - --output ${forward_fq} \ - ${reads} + -j ${task.cpus} \ + -q $params.cutadapt_min_quality \ + --minimum-length $params.cutadapt_min_length \ + --output ${forward_fq} \ + ${reads} """ } else { processing = """ cutadapt \ - -j ${task.cpus} \ - -q $params.cutadapt_min_quality \ - --minimum-length $params.cutadapt_min_length \ - --pair-filter=any \ - --output ${forward_fq} \ - --paired-output ${reverse_fq} ${reads} - - + -j ${task.cpus} \ + -q $params.cutadapt_min_quality \ + --minimum-length $params.cutadapt_min_length \ + --pair-filter=any \ + --output ${forward_fq} \ + --paired-output ${reverse_fq} ${reads} + + """ } diff --git a/tools/cutadapt/meta.yml b/tools/cutadapt/meta.yml index 8df0b244..bb3bb8a8 100644 --- a/tools/cutadapt/meta.yml +++ b/tools/cutadapt/meta.yml @@ -9,10 +9,10 @@ tools: description: | Cutadapt finds and removes adapter sequences, primers, poly-A tails and other types of unwanted sequence from your high-throughput sequencing reads. - + Cleaning your data in this way is often required: Reads from small-RNA sequencing contain the 3’ - sequencing adapter because the read is longer than the molecule that is sequenced. Amplicon reads - start with a primer sequence. Poly-A tails are useful for pulling out RNA from your sample, but + sequencing adapter because the read is longer than the molecule that is sequenced. Amplicon reads + start with a primer sequence. Poly-A tails are useful for pulling out RNA from your sample, but often you don’t want them to be in your reads. homepage: https://cutadapt.readthedocs.io/en/stable/ documentation: https://cutadapt.readthedocs.io/en/stable/ diff --git a/tools/fastq_screen/main.nf b/tools/fastq_screen/main.nf index be088ff5..2eccf31f 100644 --- a/tools/fastq_screen/main.nf +++ b/tools/fastq_screen/main.nf @@ -1,38 +1,38 @@ nextflow.preview.dsl=2 process FASTQ_SCREEN { - - // depending on the number of genomes and the type of genome (e.g. plants!), memory needs to be ample! - // label 'bigMem' - // label 'multiCore' + + // depending on the number of genomes and the type of genome (e.g. plants!), memory needs to be ample! + // label 'bigMem' + // label 'multiCore' input: - tuple val(name), path(reads) - val (outputdir) - // fastq_screen_args are best passed in to the workflow in the following manner: - // --fastq_screen_args="--subset 200000 --force" - val (fastq_screen_args) - val (verbose) + tuple val(name), path(reads) + val (outputdir) + // fastq_screen_args are best passed in to the workflow in the following manner: + // --fastq_screen_args="--subset 200000 --force" + val (fastq_screen_args) + val (verbose) - output: - path "*png", emit: png - path "*html", emit: html - path "*txt", emit: report + output: + path "*png", emit: png + path "*html", emit: html + path "*txt", emit: report - publishDir "$outputdir", - mode: "link", overwrite: true + publishDir "$outputdir", + mode: "link", overwrite: true script: - println(name) - println(reads) - println(outputdir) - if (verbose){ - println ("[MODULE] FASTQ SCREEN ARGS: "+ fastq_screen_args) - } + println(name) + println(reads) + println(outputdir) + if (verbose){ + println ("[MODULE] FASTQ SCREEN ARGS: "+ fastq_screen_args) + } - """ - module load fastq_screen - fastq_screen $fastq_screen_args $reads - """ + """ + module load fastq_screen + fastq_screen $fastq_screen_args $reads + """ -} \ No newline at end of file +} diff --git a/tools/fastqc/Dockerfile b/tools/fastqc/Dockerfile index a6f4f8ce..5bfca1b9 100644 --- a/tools/fastqc/Dockerfile +++ b/tools/fastqc/Dockerfile @@ -1,6 +1,6 @@ FROM nfcore/base:1.7 LABEL authors="phil.ewels@scilifelab.se" \ - description="Docker image for nf-core modules fastqc" + description="Docker image for nf-core modules fastqc" # foobar COPY environment.yml / diff --git a/tools/fastqc/main.nf b/tools/fastqc/main.nf index 83956ae8..3ecf31ed 100644 --- a/tools/fastqc/main.nf +++ b/tools/fastqc/main.nf @@ -1,37 +1,37 @@ nextflow.preview.dsl = 2 -process FASTQC { - +process FASTQC { + // tag "FastQC - $sample_id" - input: - tuple val(name), path(reads) - val (outputdir) + input: + tuple val(name), path(reads) + val (outputdir) // fastqc_args are best passed into the workflow in the following manner: // --fastqc_args="--nogroup -a custom_adapter_file.txt" - val (fastqc_args) - val (verbose) + val (fastqc_args) + val (verbose) - output: - tuple val(name), path ("*fastqc*"), emit: all - path "*.zip", emit: report // e.g. for MultiQC later - - // container 'quay.io/biocontainers/fastqc:0.11.8--2' + output: + tuple val(name), path ("*fastqc*"), emit: all + path "*.zip", emit: report // e.g. for MultiQC later - publishDir "$outputdir", - mode: "copy", overwrite: true + // container 'quay.io/biocontainers/fastqc:0.11.8--2' - script: + publishDir "$outputdir", + mode: "copy", overwrite: true - if (verbose){ - println ("[MODULE] FASTQC ARGS: " + fastqc_args) - } + script: - """ - module load fastqc - fastqc $fastqc_args -q -t 2 $reads + if (verbose){ + println ("[MODULE] FASTQC ARGS: " + fastqc_args) + } + + """ + module load fastqc + fastqc $fastqc_args -q -t 2 $reads fastqc --version &> fastqc.version.txt - """ + """ } diff --git a/tools/fastqc/meta.yml b/tools/fastqc/meta.yml index 0d67f866..bfe0f6cf 100644 --- a/tools/fastqc/meta.yml +++ b/tools/fastqc/meta.yml @@ -29,6 +29,6 @@ output: description: FastQC report pattern: *_fastqc.{zip,html} authors: - - + - - @ewels - @FelixKrueger diff --git a/tools/gatk/dict/main.nf b/tools/gatk/dict/main.nf index 49edf5a1..9de2e2f8 100644 --- a/tools/gatk/dict/main.nf +++ b/tools/gatk/dict/main.nf @@ -16,4 +16,4 @@ process gatk_dict { --REFERENCE ${fasta} \ --OUTPUT ${fasta.baseName}.dict """ -} \ No newline at end of file +} diff --git a/tools/gatk/dict/meta.yml b/tools/gatk/dict/meta.yml index bc9e18b6..527d6a69 100644 --- a/tools/gatk/dict/meta.yml +++ b/tools/gatk/dict/meta.yml @@ -22,4 +22,4 @@ output: description: gatk dictionary file pattern: *.{fasta,fa}.{dict} authors: - - @maxulysse \ No newline at end of file + - @maxulysse diff --git a/tools/hisat2/main.nf b/tools/hisat2/main.nf index 55e6fe78..85baa120 100644 --- a/tools/hisat2/main.nf +++ b/tools/hisat2/main.nf @@ -15,17 +15,17 @@ process HISAT2 { output: path "*bam", emit: bam - path "*stats.txt", emit: stats + path "*stats.txt", emit: stats publishDir "$outdir/hisat2", mode: "copy", overwrite: true script: - + if (verbose){ println ("[MODULE] HISAT2 ARGS: " + hisat2_args) } - + cores = 4 readString = "" hisat_options = hisat2_args @@ -41,7 +41,7 @@ process HISAT2 { readString = "-U "+reads } index = params.genome["hisat2"] - + splices = '' if (params.genome.containsKey("hisat2_splices")){ splices = " --known-splicesite-infile " + params.genome["hisat2_splices"] diff --git a/tools/hisat2/meta.yml b/tools/hisat2/meta.yml index ee79ba99..d5f5e403 100644 --- a/tools/hisat2/meta.yml +++ b/tools/hisat2/meta.yml @@ -1,4 +1,4 @@ -name: HISAT2 +name: HISAT2 description: Graph-based alignment of next generation sequencing reads to a population of genomes keywords: - Alignment diff --git a/tools/htslib/tabix/meta.yml b/tools/htslib/tabix/meta.yml index 027780c3..d35ec2f2 100644 --- a/tools/htslib/tabix/meta.yml +++ b/tools/htslib/tabix/meta.yml @@ -23,4 +23,4 @@ output: description: tabix index file pattern: *.{vcf.gz.tbi} authors: - - @maxulysse \ No newline at end of file + - @maxulysse diff --git a/tools/multiqc/main.nf b/tools/multiqc/main.nf index 493497c1..ab932a2f 100644 --- a/tools/multiqc/main.nf +++ b/tools/multiqc/main.nf @@ -1,31 +1,31 @@ nextflow.preview.dsl=2 process MULTIQC { - + // tag "FastQC - $sample_id" - + input: - path (file) - val (outdir) - val (multiqc_args) + path (file) + val (outdir) + val (multiqc_args) // multiqc_args are best passed into the workflow in the following manner: // --multiqc_args="--exlude STAR --title custom_report_title" - val (verbose) + val (verbose) - output: - path "*html", emit: html + output: + path "*html", emit: html - publishDir "${outdir}/multiqc", - mode: "copy", overwrite: true + publishDir "${outdir}/multiqc", + mode: "copy", overwrite: true script: - if (verbose){ - println ("[MODULE] MULTIQC ARGS: " + multiqc_args) - } + if (verbose){ + println ("[MODULE] MULTIQC ARGS: " + multiqc_args) + } - """ - multiqc $multiqc_args -x work . - """ + """ + multiqc $multiqc_args -x work . + """ } diff --git a/tools/samtools/Dockerfile b/tools/samtools/Dockerfile index 3d5cf586..ff8c7c64 100644 --- a/tools/samtools/Dockerfile +++ b/tools/samtools/Dockerfile @@ -1,6 +1,6 @@ FROM nfcore/base:1.7 LABEL authors="phil.ewels@scilifelab.se" \ - description="Docker image for nf-core modules samtools" + description="Docker image for nf-core modules samtools" # foobar COPY environment.yml / diff --git a/tools/samtools/faidx/meta.yml b/tools/samtools/faidx/meta.yml index 1e402057..777eb051 100644 --- a/tools/samtools/faidx/meta.yml +++ b/tools/samtools/faidx/meta.yml @@ -24,4 +24,4 @@ output: description: samtools index fasta file pattern: *.fasta.fai authors: - - @maxulysse \ No newline at end of file + - @maxulysse diff --git a/tools/shovill/main.nf b/tools/shovill/main.nf index cf52ba10..5c6a3ee5 100644 --- a/tools/shovill/main.nf +++ b/tools/shovill/main.nf @@ -3,7 +3,7 @@ process shovill { tag { shovill } publishDir "${params.outdir}", pattern: '*.fasta', mode: 'copy' - + container "quay.io/biocontainers/shovill:1.0.9--0" input: @@ -11,7 +11,7 @@ process shovill { output: path("${sample_id}.fasta") - + script: """ shovill --R1 ${forward} --R2 ${reverse} --outdir shovill_out diff --git a/tools/tcoffee/main.nf b/tools/tcoffee/main.nf index 42945850..5d863a7d 100644 --- a/tools/tcoffee/main.nf +++ b/tools/tcoffee/main.nf @@ -14,4 +14,3 @@ process tcoffee { t_coffee -seq $fasta -outfile ${fasta}.aln """ } - diff --git a/tools/trim_galore/Dockerfile b/tools/trim_galore/Dockerfile index 56f75baa..ef13a1bf 100644 --- a/tools/trim_galore/Dockerfile +++ b/tools/trim_galore/Dockerfile @@ -1,6 +1,6 @@ FROM nfcore/base:1.7 LABEL authors="phil.ewels@scilifelab.se" \ - description="Docker image for nf-core modules trimgalore" + description="Docker image for nf-core modules trimgalore" # foobar COPY environment.yml / diff --git a/tools/trim_galore/main.nf b/tools/trim_galore/main.nf index 3a4e8496..eedbe896 100644 --- a/tools/trim_galore/main.nf +++ b/tools/trim_galore/main.nf @@ -13,43 +13,43 @@ params.three_prime_clip_r1 = 0 params.three_prime_clip_r2 = 0 -process TRIM_GALORE { - +process TRIM_GALORE { + // container 'quay.io/biocontainers/trim-galore:0.6.5--0' // maybe later // tag "$sample_id" - input: - tuple val (name), path (reads) - val (outdir) - val (trim_galore_args) - val (verbose) + input: + tuple val (name), path (reads) + val (outdir) + val (trim_galore_args) + val (verbose) + + output: + tuple val(name), path ("*fq.gz"), emit: reads + path "*trimming_report.txt", optional: true, emit: report - output: - tuple val(name), path ("*fq.gz"), emit: reads - path "*trimming_report.txt", optional: true, emit: report - // Trimming reports are not generated for e.g. --hardtrim5, --clock etc // saveAs: {filename -> // else if (filename.indexOf("trimming_report.txt") > 0) "logs/$filename" // else filename // } - publishDir "${outdir}/trim_galore", - mode: "copy", overwrite: true + publishDir "${outdir}/trim_galore", + mode: "copy", overwrite: true script: - if (verbose){ - println ("[MODULE] TRIM GALORE ARGS: " + trim_galore_args) - } - + if (verbose){ + println ("[MODULE] TRIM GALORE ARGS: " + trim_galore_args) + } + trim_galore_args += " --gzip " // we like small files - pairedString = 0 - if (reads instanceof List) { - pairedString = 1 + pairedString = 0 + if (reads instanceof List) { + pairedString = 1 trim_galore_args += " --paired " - } - + } + if (params.clip_r1 > 0){ trim_galore_args += " --clip_r1 ${params.clip_r1} " } @@ -62,12 +62,12 @@ process TRIM_GALORE { if (params.three_prime_clip_r2 > 0){ trim_galore_args += " --three_prime_clip_r2 ${params.three_prime_clip_r2} " } - + if (params.trim_nextseq > 0){ trim_galore_args += " --nextseq ${params.trim_nextseq} " - } - - + } + + // Pre-set parameters for certain bisulfite-seq applications if (params.singlecell){ trim_galore_args += " --clip_r1 6 " @@ -77,7 +77,7 @@ process TRIM_GALORE { } if (params.rrbs){ trim_galore_args += " --rrbs " - } + } if (params.pbat){ trim_galore_args += " --clip_r1 $params.pbat " if (pairedString == 1){ @@ -85,17 +85,16 @@ process TRIM_GALORE { } } - """ - module load trim_galore - trim_galore $trim_galore_args $reads - """ + """ + module load trim_galore + trim_galore $trim_galore_args $reads + """ } - - + diff --git a/tools/trim_galore/meta.yml b/tools/trim_galore/meta.yml index d6944fb6..b3d42f81 100644 --- a/tools/trim_galore/meta.yml +++ b/tools/trim_galore/meta.yml @@ -36,6 +36,6 @@ output: pattern: *trimming_report.txt authors: - - + - - @ewels - @FelixKrueger diff --git a/tools/umi_tools/Dockerfile b/tools/umi_tools/Dockerfile index 691f576f..19a390f3 100644 --- a/tools/umi_tools/Dockerfile +++ b/tools/umi_tools/Dockerfile @@ -1,8 +1,8 @@ FROM nfcore/base:1.7 LABEL authors="chris.cheshire@crick.ac.uk" \ - description="Docker image containing all requirements for the nf-core umi_tools module" + description="Docker image containing all requirements for the nf-core umi_tools module" # Install conda packages COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -ENV PATH /opt/conda/envs/nfcore-module-umitools/bin:$PATH \ No newline at end of file +ENV PATH /opt/conda/envs/nfcore-module-umitools/bin:$PATH diff --git a/tools/umi_tools/main.nf b/tools/umi_tools/main.nf index 049ceaf8..b3c89a97 100644 --- a/tools/umi_tools/main.nf +++ b/tools/umi_tools/main.nf @@ -12,7 +12,7 @@ process umitools_dedup { input: tuple val(sample_id), path(bam) - + output: tuple val(sample_id), path("${sample_id}.dedup.bam"), emit: dedupBam tuple val(sample_id), path("${sample_id}.dedup.bam.bai"), emit: dedupBai diff --git a/tools/umi_tools/umi_tools.yml b/tools/umi_tools/umi_tools.yml index 64bcb6aa..b04f0f4e 100644 --- a/tools/umi_tools/umi_tools.yml +++ b/tools/umi_tools/umi_tools.yml @@ -1,6 +1,6 @@ name: umi_tools version: 1.0 -description: Tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) and single cell RNA-Seq cell barcodes. +description: Tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) and single cell RNA-Seq cell barcodes. keywords: - UMI - RMT @@ -8,7 +8,7 @@ keywords: tools: - umi_tools: description: | - Tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) and single cell RNA-Seq cell barcodes. + Tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) and single cell RNA-Seq cell barcodes. homepage: https://github.com/CGATOxford/UMI-tools documentation: https://umi-tools.readthedocs.io/en/latest/ processes: @@ -18,7 +18,7 @@ processes: The program will execute with the following pattern: umi_tools dedup --log={SAMPLE_ID}.dedup.log {params.umitools_dedup_args} -I {SAMPLE_ID}.bam -S {SAMPLE_ID}.dedup.bam --output-stats={SAMPLE_ID} description: | - Groups PCR duplicates and de-duplicates reads to yield one read per group. + Groups PCR duplicates and de-duplicates reads to yield one read per group. Use this when you want to remove the PCR duplicates prior to any downstream analysis. input: - sample_id: @@ -43,4 +43,3 @@ processes: authors: - @candiceh08 - @chris-cheshire - From fc53a6f0b5e4d2b3bfe24cc41a06420ced1d8df7 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 11 Jul 2020 13:44:28 +0200 Subject: [PATCH 3/7] Added markdown lint config file --- .github/markdownlint.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/markdownlint.yml diff --git a/.github/markdownlint.yml b/.github/markdownlint.yml new file mode 100644 index 00000000..e052a635 --- /dev/null +++ b/.github/markdownlint.yml @@ -0,0 +1,9 @@ +# Markdownlint configuration file +default: true, +line-length: false +no-multiple-blanks: 0 +blanks-around-headers: false +blanks-around-lists: false +header-increment: false +no-duplicate-header: + siblings_only: true From 45fb2ff4f4284b6eedd304e462f625227a473a34 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 11 Jul 2020 13:45:08 +0200 Subject: [PATCH 4/7] Remove verbose job names --- .github/workflows/lint-code.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml index df26d0b0..fb9385c7 100644 --- a/.github/workflows/lint-code.yml +++ b/.github/workflows/lint-code.yml @@ -3,7 +3,6 @@ on: [push, pull_request] jobs: Markdown: - name: Test Markdown syntax runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -19,7 +18,6 @@ jobs: run: markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml EditorConfig: - name: Test Editor Config rules runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -35,7 +33,6 @@ jobs: run: eclint check $(git ls-files | grep -v test) YAML: - name: Test YAML syntax runs-on: ubuntu-latest steps: - name: Check out repository From 263f48d5203054c7a4305282d667a807bbb3ded3 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 11 Jul 2020 13:48:11 +0200 Subject: [PATCH 5/7] Fix markdownlint --- .github/markdownlint.yml | 2 ++ README.md | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/markdownlint.yml b/.github/markdownlint.yml index e052a635..9d1a3083 100644 --- a/.github/markdownlint.yml +++ b/.github/markdownlint.yml @@ -7,3 +7,5 @@ blanks-around-lists: false header-increment: false no-duplicate-header: siblings_only: true +ul-indent: + indent: 4 diff --git a/README.md b/README.md index 7730d9c7..74f5115a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ A repository for hosting nextflow [`DSL2`](https://www.nextflow.io/docs/edge/dsl2.htmlhttps://www.nextflow.io/docs/edge/dsl2.html) module files containing tool-specific process definitions and their associated documentation. ## Table of contents + * [Using existing modules](#using-existing-modules) * [Configuration and parameters](#configuration-and-parameters) * [Offline usage](#offline-usage) From 47d55001fad1b74a3603725cdacbc29655a7cb9a Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 11 Jul 2020 13:54:12 +0200 Subject: [PATCH 6/7] Fix YAML validation errors --- test-datasets | 2 +- tools/bowtie2/meta.yml | 6 +++--- tools/bwa/index/meta.yml | 6 +++--- tools/bwa/mem/meta.yml | 10 +++++----- tools/cutadapt/meta.yml | 2 +- tools/fastq_screen/meta.yml | 6 +++--- tools/fastqc/meta.yml | 7 +++---- tools/gatk/dict/meta.yml | 6 +++--- tools/hisat2/meta.yml | 6 +++--- tools/htslib/tabix/meta.yml | 6 +++--- tools/multiqc/meta.yml | 4 ++-- tools/samtools/faidx/meta.yml | 6 +++--- tools/samtools/index/meta.yml | 6 +++--- tools/samtools/sort/meta.yml | 6 +++--- tools/shovill/meta.yml | 2 +- tools/tcoffee/meta.yml | 6 +++--- tools/trim_galore/meta.yml | 9 ++++----- tools/umi_tools/umi_tools.yml | 10 +++++----- 18 files changed, 52 insertions(+), 54 deletions(-) diff --git a/test-datasets b/test-datasets index aae85a5c..e5fef889 160000 --- a/test-datasets +++ b/test-datasets @@ -1 +1 @@ -Subproject commit aae85a5c9c72238959108212481ce83bae569709 +Subproject commit e5fef88994b8d34c7bf4b07116e5f7a330d2ee3b diff --git a/tools/bowtie2/meta.yml b/tools/bowtie2/meta.yml index f30ee823..e742b1d0 100644 --- a/tools/bowtie2/meta.yml +++ b/tools/bowtie2/meta.yml @@ -28,10 +28,10 @@ output: - report: type: file description: mapping statistics report - pattern: *bowtie2_stats.txt + pattern: "*bowtie2_stats.txt" - alignment: type: file description: alignment file in BAM format - pattern: *bowtie2.bam + pattern: "*bowtie2.bam" authors: - - @FelixKrueger + - "@FelixKrueger" diff --git a/tools/bwa/index/meta.yml b/tools/bwa/index/meta.yml index d03c71a2..49fa3c44 100644 --- a/tools/bwa/index/meta.yml +++ b/tools/bwa/index/meta.yml @@ -14,12 +14,12 @@ input: - input: type: file description: Input fasta file - pattern: *.{fasta,fa} + pattern: "*.{fasta,fa}" output: - - index: type: file description: bwa indexes file - pattern: *.{fasta,fa}.{amb,ann,bwt,pac,sa} + pattern: "*.{fasta,fa}.{amb,ann,bwt,pac,sa}" authors: - - @maxulysse + - "@maxulysse" diff --git a/tools/bwa/mem/meta.yml b/tools/bwa/mem/meta.yml index 2ea48a28..d8ae9a7d 100644 --- a/tools/bwa/mem/meta.yml +++ b/tools/bwa/mem/meta.yml @@ -19,11 +19,11 @@ input: - reads: type: file description: Input fastq file - pattern: *.{fastq,fq} + pattern: "*.{fastq,fq}" - index: type: file description: bwa indexes file - pattern: *.{amb,ann,bwt,pac,sa} + pattern: "*.{amb,ann,bwt,pac,sa}" - prefix: type: val description: bwa index prefix, equivalent to index file names without extensions. Usually the reference genome file name unless otherwise specified. @@ -32,11 +32,11 @@ output: - bam: type: file description: Output bam file - pattern: *.bam + pattern: "*.bam" - bamindex: type: file description: Output bam index file - pattern: *.bai + pattern: "*.bai" authors: - - @jeremy1805 + - "@jeremy1805" diff --git a/tools/cutadapt/meta.yml b/tools/cutadapt/meta.yml index bb3bb8a8..eee43a07 100644 --- a/tools/cutadapt/meta.yml +++ b/tools/cutadapt/meta.yml @@ -33,4 +33,4 @@ output: type: file description: trimmed FastQ file, or pair of files authors: - - @piotr-faba-ardigen + - "@piotr-faba-ardigen" diff --git a/tools/fastq_screen/meta.yml b/tools/fastq_screen/meta.yml index 4b4e56bd..8ec1348e 100644 --- a/tools/fastq_screen/meta.yml +++ b/tools/fastq_screen/meta.yml @@ -25,7 +25,7 @@ output: - report: type: file description: FastQ Screen report - pattern: *_screen.{txt,html,png} - optional_pattern: *_screen.bisulfite_orientation.png + pattern: "*_screen.{txt,html,png}" + optional_pattern: "*_screen.bisulfite_orientation.png" authors: - - @FelixKrueger + - "@FelixKrueger" diff --git a/tools/fastqc/meta.yml b/tools/fastqc/meta.yml index bfe0f6cf..113ca464 100644 --- a/tools/fastqc/meta.yml +++ b/tools/fastqc/meta.yml @@ -27,8 +27,7 @@ output: - report: type: file description: FastQC report - pattern: *_fastqc.{zip,html} + pattern: "*_fastqc.{zip,html}" authors: - - - - @ewels - - @FelixKrueger + - "@ewels" + - "@FelixKrueger" diff --git a/tools/gatk/dict/meta.yml b/tools/gatk/dict/meta.yml index 527d6a69..e03282bb 100644 --- a/tools/gatk/dict/meta.yml +++ b/tools/gatk/dict/meta.yml @@ -14,12 +14,12 @@ input: - input: type: file description: Input fasta file - pattern: *.{fasta,fa} + pattern: "*.{fasta,fa}" output: - - dict: type: file description: gatk dictionary file - pattern: *.{fasta,fa}.{dict} + pattern: "*.{fasta,fa}.{dict}" authors: - - @maxulysse + - "@maxulysse" diff --git a/tools/hisat2/meta.yml b/tools/hisat2/meta.yml index d5f5e403..811727a7 100644 --- a/tools/hisat2/meta.yml +++ b/tools/hisat2/meta.yml @@ -28,10 +28,10 @@ output: - report: type: file description: mapping statistics report - pattern: *hisat2_stats.txt + pattern: "*hisat2_stats.txt" - alignment: type: file description: alignment file in BAM format - pattern: *hisat2.bam + pattern: "*hisat2.bam" authors: - - @FelixKrueger + - "@FelixKrueger" diff --git a/tools/htslib/tabix/meta.yml b/tools/htslib/tabix/meta.yml index d35ec2f2..b8261b92 100644 --- a/tools/htslib/tabix/meta.yml +++ b/tools/htslib/tabix/meta.yml @@ -15,12 +15,12 @@ input: - input: type: file description: Input vcf.gz file - pattern: *.{vcf.gz} + pattern: "*.{vcf.gz}" output: - - index: type: file description: tabix index file - pattern: *.{vcf.gz.tbi} + pattern: "*.{vcf.gz.tbi}" authors: - - @maxulysse + - "@maxulysse" diff --git a/tools/multiqc/meta.yml b/tools/multiqc/meta.yml index 04e9ca42..86a9799b 100644 --- a/tools/multiqc/meta.yml +++ b/tools/multiqc/meta.yml @@ -21,6 +21,6 @@ output: - multiqc_report: type: file description: MultiQC report - pattern: *multiqc*.html + pattern: "*multiqc*.html" authors: - - @FelixKrueger + - "@FelixKrueger" diff --git a/tools/samtools/faidx/meta.yml b/tools/samtools/faidx/meta.yml index 777eb051..95c2bf4b 100644 --- a/tools/samtools/faidx/meta.yml +++ b/tools/samtools/faidx/meta.yml @@ -16,12 +16,12 @@ input: - input: type: file description: Input fasta file - pattern: *.{fasta,fa} + pattern: "*.{fasta,fa}" output: - - faidx: type: file description: samtools index fasta file - pattern: *.fasta.fai + pattern: "*.fasta.fai" authors: - - @maxulysse + - "@maxulysse" diff --git a/tools/samtools/index/meta.yml b/tools/samtools/index/meta.yml index e665789b..35d34802 100644 --- a/tools/samtools/index/meta.yml +++ b/tools/samtools/index/meta.yml @@ -16,12 +16,12 @@ input: - input: type: file description: Input BAM or CRAM file - pattern: *.{bam,cram} + pattern: "*.{bam,cram}" output: - - index: type: file description: BAM or CRAM index file - pattern: *.{bai} + pattern: "*.{bai}" authors: - - @ewels + - "@ewels" diff --git a/tools/samtools/sort/meta.yml b/tools/samtools/sort/meta.yml index 60f9e96b..1e042f0d 100644 --- a/tools/samtools/sort/meta.yml +++ b/tools/samtools/sort/meta.yml @@ -16,12 +16,12 @@ input: - input: type: file description: Input BAM or CRAM file - pattern: *.{bam,cram} + pattern: "*.{bam,cram}" output: - - sorted_file: type: file description: Sorted BAM or CRAM file - pattern: *.{bam,cram} + pattern: "*.{bam,cram}" authors: - - @ewels + - "@ewels" diff --git a/tools/shovill/meta.yml b/tools/shovill/meta.yml index 7c204c24..f955fa59 100644 --- a/tools/shovill/meta.yml +++ b/tools/shovill/meta.yml @@ -27,4 +27,4 @@ output: description: fasta file pattern: ${sample_id}.fasta authors: - - @annacprice + - "@annacprice" diff --git a/tools/tcoffee/meta.yml b/tools/tcoffee/meta.yml index e15c2e12..1e4a49eb 100644 --- a/tools/tcoffee/meta.yml +++ b/tools/tcoffee/meta.yml @@ -16,13 +16,13 @@ input: - fasta: type: path description: Input fasta file - pattern: *.{fasta,fa,tfa} + pattern: "*.{fasta,fa,tfa}" output: - - alignment: type: file description: tcoffee alignment file - pattern: *.aln + pattern: "*.aln" authors: - - @JoseEspinosa + - "@JoseEspinosa" diff --git a/tools/trim_galore/meta.yml b/tools/trim_galore/meta.yml index b3d42f81..642fb51b 100644 --- a/tools/trim_galore/meta.yml +++ b/tools/trim_galore/meta.yml @@ -28,14 +28,13 @@ output: - trimmed_fastq: type: file description: Trimmed FastQ files - pattern: *fq.gz + pattern: "*fq.gz" - - report: type: file description: Trim Galore! trimming report - pattern: *trimming_report.txt + pattern: "*trimming_report.txt" authors: - - - - @ewels - - @FelixKrueger + - "@ewels" + - "@FelixKrueger" diff --git a/tools/umi_tools/umi_tools.yml b/tools/umi_tools/umi_tools.yml index b04f0f4e..fcc53b46 100644 --- a/tools/umi_tools/umi_tools.yml +++ b/tools/umi_tools/umi_tools.yml @@ -31,15 +31,15 @@ processes: - dedupBam: type: tuple description: A tuple of samples id and output bam file - pattern: [sample_id, *SAMPLE_ID.dedup.bam] + pattern: [sample_id, "*SAMPLE_ID.dedup.bam"] - dedupBam: type: tuple description: A tuple of samples id and output bai file - pattern: [sample_id, *SAMPLE_ID.dedup.bam.bai] + pattern: [sample_id, "*SAMPLE_ID.dedup.bam.bai"] - report: type: file description: Log file for the umi_tools operation - pattern: *SAMPLE_ID.dedup.log + pattern: "*SAMPLE_ID.dedup.log" authors: - - @candiceh08 - - @chris-cheshire + - "@candiceh08" + - "@chris-cheshire" From 229bd5d0855ac33de1a26ab7e8dfa5cedc9156e9 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 11 Jul 2020 13:57:17 +0200 Subject: [PATCH 7/7] Update test-datasets --- test-datasets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-datasets b/test-datasets index e5fef889..ddbd0c4c 160000 --- a/test-datasets +++ b/test-datasets @@ -1 +1 @@ -Subproject commit e5fef88994b8d34c7bf4b07116e5f7a330d2ee3b +Subproject commit ddbd0c4cf7f1721c78673c4dcc91fcd7940e67f8