From 34148ec3d354244474fff6ac9fb4337fd38f5088 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Wed, 13 Sep 2023 07:47:27 +0200 Subject: [PATCH 01/20] Fix prefix for eukulele columns in summary --- modules/local/sum_taxonomy.nf | 22 +++++++++------------- subworkflows/local/eukulele.nf | 15 ++++++++++++--- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/modules/local/sum_taxonomy.nf b/modules/local/sum_taxonomy.nf index e3f03b1b..a3c9ee89 100644 --- a/modules/local/sum_taxonomy.nf +++ b/modules/local/sum_taxonomy.nf @@ -9,8 +9,8 @@ process SUM_TAXONOMY { input: - tuple val(meta), path(taxonomy) - path(fcs) + tuple val(meta), val(db), path(taxonomy) + path feature_counts output: @@ -29,21 +29,17 @@ process SUM_TAXONOMY { library(tidyverse) - TYPE_ORDER = c('sample', 'database', 'field', 'value') - # call the tables into variables - taxonomy <- read_tsv("${prefix}.taxonomy_classification.tsv.gz", show_col_types = FALSE ) + # Read the taxonomy and counts tables + taxonomy <- read_tsv("${taxonomy}", show_col_types = FALSE ) - counts <- list.files(pattern = "*.counts.tsv.gz") %>% - map_df(~read_tsv(., show_col_types = FALSE)) %>% + counts <- read_tsv("${feature_counts}", show_col_types = FALSE) %>% mutate(sample = as.character(sample)) + # Join the two and count the number of ORFs with assigned taxonomy counts %>% - right_join(taxonomy, by = 'orf') %>% - group_by(sample) %>% - drop_na() %>% - count(orf) %>% - summarise( value = sum(n), .groups = 'drop') %>% - add_column(database = "${prefix}", field = "n_orfs") %>% + inner_join(taxonomy, by = 'orf') %>% + count(sample, name = 'value') %>% + mutate(database = "${db}", field = "eukulele_n_orfs") %>% relocate(value, .after = last_col()) %>% write_tsv('${prefix}_summary.tsv.gz') diff --git a/subworkflows/local/eukulele.nf b/subworkflows/local/eukulele.nf index a483f57d..26efaacd 100644 --- a/subworkflows/local/eukulele.nf +++ b/subworkflows/local/eukulele.nf @@ -11,12 +11,13 @@ workflow SUB_EUKULELE { take: eukulele // Channel: val(meta), path(fasta), val(database), path(directory) - collect_fcs + feature_counts main: ch_versions = Channel.empty() - EUKULELE_DOWNLOAD ( eukulele.filter{ it[2] }.map { [ it[2], it[3] ] } ) + + EUKULELE_DOWNLOAD ( eukulele.filter { it[2] }.map { [ it[2], it[3] ] } ) ch_download = EUKULELE_DOWNLOAD.out.db Channel.empty() @@ -28,7 +29,15 @@ workflow SUB_EUKULELE { EUKULELE_SEARCH( ch_eukulele ) FORMAT_TAX( EUKULELE_SEARCH.out.taxonomy_estimation.map { [ it[0], it[1] ] } ) - SUM_TAXONOMY( FORMAT_TAX.out.tax, collect_fcs ) + + FORMAT_TAX.out.tax + .join(ch_eukulele) + .map { [ it[0], it[3], it[1] ] } + .set { ch_sum_taxonomy } + ch_sum_taxonomy.view() + feature_counts.view() + + SUM_TAXONOMY ( ch_sum_taxonomy, feature_counts ) emit: taxonomy_summary = SUM_TAXONOMY.out.taxonomy_summary From 44ae6ef3a58a135f257caaa9649955b7f5ff330a Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Wed, 13 Sep 2023 15:25:38 +0200 Subject: [PATCH 02/20] Remove views --- subworkflows/local/eukulele.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/subworkflows/local/eukulele.nf b/subworkflows/local/eukulele.nf index 26efaacd..7f152265 100644 --- a/subworkflows/local/eukulele.nf +++ b/subworkflows/local/eukulele.nf @@ -34,8 +34,6 @@ workflow SUB_EUKULELE { .join(ch_eukulele) .map { [ it[0], it[3], it[1] ] } .set { ch_sum_taxonomy } - ch_sum_taxonomy.view() - feature_counts.view() SUM_TAXONOMY ( ch_sum_taxonomy, feature_counts ) From c4cf4c4f17ef38d4dbc7bbb7b335baa8e67fef6c Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 21 Sep 2023 17:26:52 +0200 Subject: [PATCH 03/20] Add seqtk/seq module --- modules.json | 5 ++++ modules/nf-core/seqtk/seq/main.nf | 40 +++++++++++++++++++++++++++ modules/nf-core/seqtk/seq/meta.yml | 44 ++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 modules/nf-core/seqtk/seq/main.nf create mode 100644 modules/nf-core/seqtk/seq/meta.yml diff --git a/modules.json b/modules.json index b557b53d..bd274e16 100644 --- a/modules.json +++ b/modules.json @@ -95,6 +95,11 @@ "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", "installed_by": ["modules"] }, + "seqtk/seq": { + "branch": "master", + "git_sha": "23e7fed6d975b0132cdd564c809a75e6c0215f05", + "installed_by": ["modules"] + }, "spades": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", diff --git a/modules/nf-core/seqtk/seq/main.nf b/modules/nf-core/seqtk/seq/main.nf new file mode 100644 index 00000000..b4524854 --- /dev/null +++ b/modules/nf-core/seqtk/seq/main.nf @@ -0,0 +1,40 @@ +process SEQTK_SEQ { + tag "$meta.id" + label 'process_single' + + conda "bioconda::seqtk=1.4" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqtk:1.4--he4a0461_1' : + 'biocontainers/seqtk:1.4--he4a0461_1' }" + + input: + tuple val(meta), path(fastx) + + output: + tuple val(meta), path("*.gz") , emit: fastx + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def extension = "fastq" + if ("$fastx" ==~ /.+\.fasta|.+\.fasta.gz|.+\.fa|.+\.fa.gz|.+\.fas|.+\.fas.gz|.+\.fna|.+\.fna.gz/ || "$args" ==~ /\-[aA]/ ) { + extension = "fasta" + } + """ + seqtk \\ + seq \\ + $args \\ + $fastx | \\ + gzip -c > ${prefix}.seqtk-seq.${extension}.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqtk: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/seqtk/seq/meta.yml b/modules/nf-core/seqtk/seq/meta.yml new file mode 100644 index 00000000..87b2fd97 --- /dev/null +++ b/modules/nf-core/seqtk/seq/meta.yml @@ -0,0 +1,44 @@ +name: seqtk_seq +description: Common transformation operations on FASTA or FASTQ files. +keywords: + - seq + - filter + - transformation +tools: + - seqtk: + description: Seqtk is a fast and lightweight tool for processing sequences in the FASTA or FASTQ format. The seqtk seq command enables common transformation operations on FASTA or FASTQ files. + homepage: https://github.com/lh3/seqtk + documentation: https://docs.csc.fi/apps/seqtk/ + tool_dev_url: https://github.com/lh3/seqtk + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - sequences: + type: file + description: A FASTQ or FASTA file + pattern: "*.{fastq.gz, fastq, fq, fq.gz, fasta, fastq.gz, fa, fa.gz, fas, fas.gz, fna, fna.gz}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - sequences: + type: file + description: FASTQ/FASTA file containing renamed sequences + pattern: "*.{fastq.gz, fasta.gz}" + +authors: + - "@hseabolt" + - "@mjcipriano" + - "@sateeshperi" From 0fe01c7f4fdfa31f047e1f0851149be2ff577958 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 21 Sep 2023 17:38:55 +0200 Subject: [PATCH 04/20] Tidying up some configs --- conf/modules.config | 2 +- nextflow.config | 7 +++++-- nextflow_schema.json | 34 +++++++++++++++++++++++++--------- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index b0b602e5..53eae3df 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -78,7 +78,7 @@ process { path : { "${params.outdir}/bbmap/bbnorm/"}, mode : 'copy', pattern: "*.fastq.gz", - enabled: params.save_bam + enabled: params.save_bbnorm_fastq ] ] } diff --git a/nextflow.config b/nextflow.config index e6fd1dad..52f57c0d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -28,18 +28,21 @@ params { save_trimmed = false skip_trimming = false - // BBmap options + // BBDuk options sequence_filter = null - save_bam = false // Digital normalization options bbnorm = false bbnorm_target = 100 bbnorm_min = 5 + save_bbnorm_fastq = false // assembler option assembler = 'megahit' + // Mapping options + save_bam = false + // orf caller options orf_caller = 'prodigal' prodigal_trainingfile = null diff --git a/nextflow_schema.json b/nextflow_schema.json index f61aaccb..394e13e0 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -24,7 +24,7 @@ }, "se_reads": { "type": "boolean", - "default": "false", + "default": false, "description": "activate when using single end reads input" }, "outdir": { @@ -113,7 +113,7 @@ "description": "all the trim option are listed below" }, "bbnorm_options": { - "title": "BBnorm options", + "title": "Filtering options", "type": "object", "description": "", "default": "", @@ -123,11 +123,6 @@ "description": "Fasta file with sequences to filter away before running assembly etc..", "help_text": "Read sequences matching this file will be filtered out from samples with BBDuk before mapping. If no file is specified, BBDuk will not be run.", "fa_icon": "fas fa-filter" - }, - "save_bam": { - "type": "boolean", - "description": "save the output from BBMap align", - "fa_icon": "fas fa-align-center" } }, "fa_icon": "fas fa-filter" @@ -156,6 +151,11 @@ "default": 5, "description": "Reads with an apparent depth of under nx will be presumed to be errors and discarded", "fa_icon": "fas fa-align-justify" + }, + "save_bbnorm_fastq": { + "type": "boolean", + "description": "save the resulting fastq files from normalization", + "fa_icon": "fas fa-align-center" } } }, @@ -182,6 +182,20 @@ }, "fa_icon": "fas fa-bezier-curve" }, + "mapping_options": { + "title": "Mapping options", + "type": "object", + "description": "", + "default": "", + "properties": { + "save_bam": { + "type": "boolean", + "description": "save the bam files from mapping", + "fa_icon": "fas fa-align-center" + } + }, + "fa_icon": "fas fa-filter" + }, "orf_caller_options": { "title": "Orf Caller options", "type": "object", @@ -292,9 +306,8 @@ }, "cat_db": { "type": "string", - "default": "None", "description": "path to cat database", - "help_text": "This parameter is mutual exclusive with \u00b4cat_db_generate\u00b4. You need to provide a version of CAT database that has the same DIAMOND version of the module (DIAMOND 2.0.8) otherwise you might encounter issues of incompatibility and the module will fail. We recommend to always use the database provided by CAT website: https://tbb.bio.uu.nl/bastiaan/CAT_prepare/", + "help_text": "This parameter is mutually exclusive with \u00b4cat_db_generate\u00b4. You need to provide a version of CAT database that has the same DIAMOND version of the module (DIAMOND 2.0.8) otherwise you might encounter issues of incompatibility and the module will fail. We recommend to always use the database provided by CAT website: https://tbb.bio.uu.nl/bastiaan/CAT_prepare/", "fa_icon": "fas fa-database" }, "cat_db_generate": { @@ -536,6 +549,9 @@ { "$ref": "#/definitions/assembler_options" }, + { + "$ref": "#/definitions/mapping_options" + }, { "$ref": "#/definitions/orf_caller_options" }, From 237539cbe36e32100ebb1852d76022a70f9073fb Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 21 Sep 2023 18:26:05 +0200 Subject: [PATCH 05/20] Add length filtering for contigs --- conf/modules.config | 4 ++++ nextflow.config | 1 + nextflow_schema.json | 8 +++++++- workflows/metatdenovo.nf | 7 +++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 53eae3df..f3e90bb6 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -114,6 +114,10 @@ process { ] } + withName: SEQTK_SEQ_CONTIG_FILTER { + ext.args = "-L ${params.min_contig_length}" + } + withName: BBMAP_INDEX { publishDir = [ enabled: false diff --git a/nextflow.config b/nextflow.config index 52f57c0d..bc087bc8 100644 --- a/nextflow.config +++ b/nextflow.config @@ -39,6 +39,7 @@ params { // assembler option assembler = 'megahit' + min_contig_length = 0 // Mapping options save_bam = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 394e13e0..15ac5ada 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -143,7 +143,7 @@ "bbnorm_target": { "type": "integer", "default": 100, - "description": "produce an output file of reads with an average depth of nx. ", + "description": "Reduce the number of reads for assembly average coverage of this number.", "fa_icon": "fas fa-align-justify" }, "bbnorm_min": { @@ -178,6 +178,12 @@ "mimetype": "text/plain", "description": "Path to a fasta file with a finished assembly. Assembly will be skipped by the pipeline.", "fa_icon": "far fa-file-code" + }, + "min_contig_length": { + "type": "integer", + "default": 0, + "description": "Filter out contigs shorter than this.", + "fa_icon": "fas fa-align-justify" } }, "fa_icon": "fas fa-bezier-curve" diff --git a/workflows/metatdenovo.nf b/workflows/metatdenovo.nf index 9f2df9cd..aefc8f1b 100644 --- a/workflows/metatdenovo.nf +++ b/workflows/metatdenovo.nf @@ -147,6 +147,7 @@ include { BBMAP_BBNORM } from '../modules/nf-core/ include { SEQTK_MERGEPE } from '../modules/nf-core/seqtk/mergepe/main' include { SUBREAD_FEATURECOUNTS as FEATURECOUNTS_CDS } from '../modules/nf-core/subread/featurecounts/main' include { SPADES } from '../modules/nf-core/spades/main' +include { SEQTK_SEQ as SEQTK_SEQ_CONTIG_FILTER } from '../modules/nf-core/seqtk/seq/main' include { CAT_FASTQ } from '../modules/nf-core/cat/fastq/main' include { FASTQC } from '../modules/nf-core/fastqc/main' include { MULTIQC } from '../modules/nf-core/multiqc/main' @@ -338,6 +339,12 @@ workflow METATDENOVO { ch_versions = ch_versions.mix(MEGAHIT_INTERLEAVED.out.versions) } + // If the user asked for length filtering, perform that with SEQTK_SEQ (the actual length parameter is used in modules.config) + if ( params.min_contig_length > 0 ) { + SEQTK_SEQ_CONTIG_FILTER ( ch_assembly_contigs ) + ch_assembly_contigs = SEQTK_SEQ_CONTIG_FILTER.out.fastx + } + // // Call ORFs // From cb095acca3be3244c7610de3bc1653e71116f3d4 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Tue, 26 Sep 2023 13:42:53 +0200 Subject: [PATCH 06/20] Output concatenated ffn files from Prokka --- conf/modules.config | 9 +++++++++ subworkflows/local/prokka_subsets.nf | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/conf/modules.config b/conf/modules.config index f3e90bb6..b67b15c8 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -192,6 +192,15 @@ process { ] } + withName: 'FFN_CAT' { + ext.prefix = 'prokka.ffn.gz' + publishDir = [ + path: { "${params.outdir}/prokka" }, + mode: 'copy', + pattern: "*.gz" + ] + } + withName: 'FNA_CAT' { ext.prefix = 'prokka.fna.gz' publishDir = [ diff --git a/subworkflows/local/prokka_subsets.nf b/subworkflows/local/prokka_subsets.nf index f40cb4de..aacf307c 100644 --- a/subworkflows/local/prokka_subsets.nf +++ b/subworkflows/local/prokka_subsets.nf @@ -5,6 +5,7 @@ include { PROKKA } from '../../modules/nf-core/prokka/main' include { CAT_CAT as GFF_CAT } from '../../modules/nf-core/cat/cat/main' include { CAT_CAT as FAA_CAT } from '../../modules/nf-core/cat/cat/main' +include { CAT_CAT as FFN_CAT } from '../../modules/nf-core/cat/cat/main' include { CAT_CAT as FNA_CAT } from '../../modules/nf-core/cat/cat/main' include { PROKKAGFF2TSV } from '../../modules/local/prokkagff2tsv' @@ -31,6 +32,12 @@ workflow PROKKA_SUBSETS { FAA_CAT ( ch_faa ) ch_versions = ch_versions.mix(FAA_CAT.out.versions) + contigs.map{ [ id:"${it[0].id}.prokka" ] } + .combine(PROKKA.out.ffn.collect { it[1] }.map { [ it ] }) + .set { ch_ffn } + FFN_CAT ( ch_ffn ) + ch_versions = ch_versions.mix(FFN_CAT.out.versions) + contigs.map{ [ id:"${it[0].id}.prokka" ] } .combine(PROKKA.out.fna.collect { it[1] }.map { [ it ] }) .set { ch_fna } From be351ba93589f568ab2dfc1b20e08805adeb7b70 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Tue, 26 Sep 2023 14:02:37 +0200 Subject: [PATCH 07/20] Remove concatenation of Prokka fna files --- conf/modules.config | 9 --------- subworkflows/local/prokka_subsets.nf | 9 +-------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index b67b15c8..88e09321 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -201,15 +201,6 @@ process { ] } - withName: 'FNA_CAT' { - ext.prefix = 'prokka.fna.gz' - publishDir = [ - path: { "${params.outdir}/prokka" }, - mode: 'copy', - pattern: "*.gz" - ] - } - withName: 'GFF_CAT' { ext.prefix = 'prokka.gff.gz' publishDir = [ diff --git a/subworkflows/local/prokka_subsets.nf b/subworkflows/local/prokka_subsets.nf index aacf307c..7445461e 100644 --- a/subworkflows/local/prokka_subsets.nf +++ b/subworkflows/local/prokka_subsets.nf @@ -6,7 +6,6 @@ include { PROKKA } from '../../modules/nf-core/prokka/main' include { CAT_CAT as GFF_CAT } from '../../modules/nf-core/cat/cat/main' include { CAT_CAT as FAA_CAT } from '../../modules/nf-core/cat/cat/main' include { CAT_CAT as FFN_CAT } from '../../modules/nf-core/cat/cat/main' -include { CAT_CAT as FNA_CAT } from '../../modules/nf-core/cat/cat/main' include { PROKKAGFF2TSV } from '../../modules/local/prokkagff2tsv' workflow PROKKA_SUBSETS { @@ -38,19 +37,13 @@ workflow PROKKA_SUBSETS { FFN_CAT ( ch_ffn ) ch_versions = ch_versions.mix(FFN_CAT.out.versions) - contigs.map{ [ id:"${it[0].id}.prokka" ] } - .combine(PROKKA.out.fna.collect { it[1] }.map { [ it ] }) - .set { ch_fna } - FNA_CAT ( ch_fna ) - ch_versions = ch_versions.mix(FNA_CAT.out.versions) - PROKKAGFF2TSV ( GFF_CAT.out.file_out) ch_versions = ch_versions.mix(PROKKAGFF2TSV.out.versions) emit: gff = GFF_CAT.out.file_out faa = FAA_CAT.out.file_out - fna = FNA_CAT.out.file_out + ffn = FFN_CAT.out.file_out gfftsv = PROKKAGFF2TSV.out.tsv prokka_log = ch_log versions = ch_versions From 70b0c7ac5dcb68c7169534be31de9e0313382d36 Mon Sep 17 00:00:00 2001 From: Danilo Di Leo Date: Wed, 27 Sep 2023 04:26:40 +0200 Subject: [PATCH 08/20] collect stats grouping correctly --- workflows/metatdenovo.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workflows/metatdenovo.nf b/workflows/metatdenovo.nf index 9f2df9cd..4be13cba 100644 --- a/workflows/metatdenovo.nf +++ b/workflows/metatdenovo.nf @@ -227,7 +227,7 @@ workflow METATDENOVO { } else { if ( params.se_reads ) { ch_collect_stats - .combine(FASTQC_TRIMGALORE.out.trim_log.collect { it[1] } ) + .combine(FASTQC_TRIMGALORE.out.trim_log.collect { it[1] }.map { [ it ] }) .set { ch_collect_stats } } else { ch_collect_stats @@ -455,7 +455,6 @@ workflow METATDENOVO { File kofam_dir = new File(params.kofam_dir) if ( ! kofam_dir.exists() ) { kofam_dir.mkdir() } ch_aa - //.map { [ [ id:"${it[0].id}" ], it[1] ] } .map { [ it[0], it[1] ] } .set { ch_kofamscan } KOFAMSCAN( ch_kofamscan, Channel.fromPath(params.kofam_dir), ch_fcs_for_summary) From c4c243215f89f2f734fa2ee673a709abd44dc7ff Mon Sep 17 00:00:00 2001 From: Danilo Di Leo Date: Thu, 28 Sep 2023 06:43:32 +0200 Subject: [PATCH 09/20] Template update for nf-core/tools version 2.10 --- .devcontainer/devcontainer.json | 1 + .github/CONTRIBUTING.md | 4 +- .github/workflows/linting.yml | 2 +- .github/workflows/release-announcments.yml | 68 +++++++++ CITATIONS.md | 2 +- CODE_OF_CONDUCT.md | 133 ++++++++++++++---- README.md | 21 +-- assets/multiqc_config.yml | 6 +- conf/modules.config | 9 ++ docs/output.md | 5 +- docs/usage.md | 16 ++- lib/NfcoreTemplate.groovy | 16 +++ lib/WorkflowMetatdenovo.groovy | 2 +- main.nf | 3 + modules.json | 6 +- .../custom/dumpsoftwareversions/main.nf | 2 +- modules/nf-core/fastqc/main.nf | 8 +- modules/nf-core/multiqc/main.nf | 2 +- nextflow.config | 7 +- nextflow_schema.json | 15 -- workflows/metatdenovo.nf | 1 + 21 files changed, 253 insertions(+), 76 deletions(-) create mode 100644 .github/workflows/release-announcments.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ea27a584..4ecfbfe3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,6 +2,7 @@ "name": "nfcore", "image": "nfcore/gitpod:latest", "remoteUser": "gitpod", + "runArgs": ["--privileged"], // Configure tool-specific properties. "customizations": { diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index bbe0d3e8..c403cf13 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,7 +9,9 @@ Please use the pre-filled template to save time. However, don't be put off by this template - other more general issues and suggestions are welcome! Contributions to the code are even more welcome ;) -> If you need help using or modifying nf-core/metatdenovo then the best place to ask is on the nf-core Slack [#metatdenovo](https://nfcore.slack.com/channels/metatdenovo) channel ([join our Slack here](https://nf-co.re/join/slack)). +:::info +If you need help using or modifying nf-core/metatdenovo then the best place to ask is on the nf-core Slack [#metatdenovo](https://nfcore.slack.com/channels/metatdenovo) channel ([join our Slack here](https://nf-co.re/join/slack)). +::: ## Contribution workflow diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 888cb4bc..b8bdd214 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: "3.8" + python-version: "3.11" architecture: "x64" - name: Install dependencies diff --git a/.github/workflows/release-announcments.yml b/.github/workflows/release-announcments.yml new file mode 100644 index 00000000..6ad33927 --- /dev/null +++ b/.github/workflows/release-announcments.yml @@ -0,0 +1,68 @@ +name: release-announcements +# Automatic release toot and tweet anouncements +on: + release: + types: [published] + workflow_dispatch: + +jobs: + toot: + runs-on: ubuntu-latest + steps: + - uses: rzr/fediverse-action@master + with: + access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} + host: "mstdn.science" # custom host if not "mastodon.social" (default) + # GitHub event payload + # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release + message: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + + send-tweet: + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: pip install tweepy==4.14.0 + - name: Send tweet + shell: python + run: | + import os + import tweepy + + client = tweepy.Client( + access_token=os.getenv("TWITTER_ACCESS_TOKEN"), + access_token_secret=os.getenv("TWITTER_ACCESS_TOKEN_SECRET"), + consumer_key=os.getenv("TWITTER_CONSUMER_KEY"), + consumer_secret=os.getenv("TWITTER_CONSUMER_SECRET"), + ) + tweet = os.getenv("TWEET") + client.create_tweet(text=tweet) + env: + TWEET: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} + TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} + TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} + + bsky-post: + runs-on: ubuntu-latest + steps: + - uses: zentered/bluesky-post-action@v0.0.2 + with: + post: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + env: + BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }} + BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} + # diff --git a/CITATIONS.md b/CITATIONS.md index 71ed902f..1c61ba2d 100644 --- a/CITATIONS.md +++ b/CITATIONS.md @@ -12,7 +12,7 @@ - [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) - > Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. Available online https://www.bioinformatics.babraham.ac.uk/projects/fastqc/. + > Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. - [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f4fd052f..c089ec78 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,18 +1,20 @@ -# Code of Conduct at nf-core (v1.0) +# Code of Conduct at nf-core (v1.4) ## Our Pledge -In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core, pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: +In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: - Age +- Ability - Body size +- Caste - Familial status - Gender identity and expression - Geographical location - Level of experience - Nationality and national origins - Native language -- Physical and neurological ability +- Neurodiversity - Race or ethnicity - Religion - Sexual identity and orientation @@ -22,80 +24,133 @@ Please note that the list above is alphabetised and is therefore not ranked in a ## Preamble -> Note: This Code of Conduct (CoC) has been drafted by the nf-core Safety Officer and been edited after input from members of the nf-core team and others. "We", in this document, refers to the Safety Officer and members of the nf-core core team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will amended periodically to keep it up-to-date, and in case of any dispute, the most current version will apply. +:::note +This Code of Conduct (CoC) has been drafted by Renuka Kudva, Cris Tuñí, and Michael Heuer, with input from the nf-core Core Team and Susanna Marquez from the nf-core community. "We", in this document, refers to the Safety Officers and members of the nf-core Core Team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will be amended periodically to keep it up-to-date. In case of any dispute, the most current version will apply. +::: -An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). Our current safety officer is Renuka Kudva. +An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). + +Our Safety Officers are Saba Nafees, Cris Tuñí, and Michael Heuer. nf-core is a young and growing community that welcomes contributions from anyone with a shared vision for [Open Science Policies](https://www.fosteropenscience.eu/taxonomy/term/8). Open science policies encompass inclusive behaviours and we strive to build and maintain a safe and inclusive environment for all individuals. -We have therefore adopted this code of conduct (CoC), which we require all members of our community and attendees in nf-core events to adhere to in all our workspaces at all times. Workspaces include but are not limited to Slack, meetings on Zoom, Jitsi, YouTube live etc. +We have therefore adopted this CoC, which we require all members of our community and attendees of nf-core events to adhere to in all our workspaces at all times. Workspaces include, but are not limited to, Slack, meetings on Zoom, gather.town, YouTube live etc. -Our CoC will be strictly enforced and the nf-core team reserve the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. +Our CoC will be strictly enforced and the nf-core team reserves the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. -We ask all members of our community to help maintain a supportive and productive workspace and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. +We ask all members of our community to help maintain supportive and productive workspaces and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. -Questions, concerns or ideas on what we can include? Contact safety [at] nf-co [dot] re +Questions, concerns, or ideas on what we can include? Contact members of the Safety Team on Slack or email safety [at] nf-co [dot] re. ## Our Responsibilities -The safety officer is responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. +Members of the Safety Team (the Safety Officers) are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. -The safety officer in consultation with the nf-core core team have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +The Safety Team, in consultation with the nf-core core team, have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this CoC, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. -Members of the core team or the safety officer who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and be subject to the same actions as others in violation of the CoC. +Members of the core team or the Safety Team who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and will be subject to the same actions as others in violation of the CoC. -## When are where does this Code of Conduct apply? +## When and where does this Code of Conduct apply? -Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events. This includes but is not limited to the following listed alphabetically and therefore in no order of preference: +Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events, such as hackathons, workshops, bytesize, and collaborative workspaces on gather.town. These guidelines include, but are not limited to, the following (listed alphabetically and therefore in no order of preference): - Communicating with an official project email address. - Communicating with community members within the nf-core Slack channel. - Participating in hackathons organised by nf-core (both online and in-person events). -- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence. -- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, Jitsi, YouTube live etc. +- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence, and on the nf-core gather.town workspace. +- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, gather.town, Jitsi, YouTube live etc. - Representing nf-core on social media. This includes both official and personal accounts. ## nf-core cares 😊 -nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include but are not limited to the following (listed in alphabetical order): +nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include, but are not limited to, the following (listed in alphabetical order): - Ask for consent before sharing another community member’s personal information (including photographs) on social media. - Be respectful of differing viewpoints and experiences. We are all here to learn from one another and a difference in opinion can present a good learning opportunity. -- Celebrate your accomplishments at events! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) +- Celebrate your accomplishments! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) - Demonstrate empathy towards other community members. (We don’t all have the same amount of time to dedicate to nf-core. If tasks are pending, don’t hesitate to gently remind members of your team. If you are leading a task, ask for help if you feel overwhelmed.) - Engage with and enquire after others. (This is especially important given the geographically remote nature of the nf-core community, so let’s do this the best we can) - Focus on what is best for the team and the community. (When in doubt, ask) -- Graciously accept constructive criticism, yet be unafraid to question, deliberate, and learn. +- Accept feedback, yet be unafraid to question, deliberate, and learn. - Introduce yourself to members of the community. (We’ve all been outsiders and we know that talking to strangers can be hard for some, but remember we’re interested in getting to know you and your visions for open science!) -- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communications to be kind.**) +- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communication to be kind.**) - Take breaks when you feel like you need them. -- Using welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack.) +- Use welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack) ## nf-core frowns on 😕 -The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this code of conduct. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces. +The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this CoC. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces: - Deliberate intimidation, stalking or following and sustained disruption of communication among participants of the community. This includes hijacking shared screens through actions such as using the annotate tool in conferencing software such as Zoom. - “Doxing” i.e. posting (or threatening to post) another person’s personal identifying information online. - Spamming or trolling of individuals on social media. -- Use of sexual or discriminatory imagery, comments, or jokes and unwelcome sexual attention. -- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion or work experience. +- Use of sexual or discriminatory imagery, comments, jokes, or unwelcome sexual attention. +- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion, or work experience. ### Online Trolling -The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the added issue of online trolling. This is unacceptable, reports of such behaviour will be taken very seriously, and perpetrators will be excluded from activities immediately. +The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the risk of online trolling. This is unacceptable — reports of such behaviour will be taken very seriously and perpetrators will be excluded from activities immediately. -All community members are required to ask members of the group they are working within for explicit consent prior to taking screenshots of individuals during video calls. +All community members are **required** to ask members of the group they are working with for explicit consent prior to taking screenshots of individuals during video calls. -## Procedures for Reporting CoC violations +## Procedures for reporting CoC violations If someone makes you feel uncomfortable through their behaviours or actions, report it as soon as possible. -You can reach out to members of the [nf-core core team](https://nf-co.re/about) and they will forward your concerns to the safety officer(s). +You can reach out to members of the Safety Team (Saba Nafees, Cris Tuñí, and Michael Heuer) on Slack. Alternatively, contact a member of the nf-core core team [nf-core core team](https://nf-co.re/about), and they will forward your concerns to the Safety Team. + +Issues directly concerning members of the Core Team or the Safety Team will be dealt with by other members of the core team and the safety manager — possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson and details will be shared in due course. + +All reports will be handled with the utmost discretion and confidentiality. + +You can also report any CoC violations to safety [at] nf-co [dot] re. In your email report, please do your best to include: + +- Your contact information. +- Identifying information (e.g. names, nicknames, pseudonyms) of the participant who has violated the Code of Conduct. +- The behaviour that was in violation and the circumstances surrounding the incident. +- The approximate time of the behaviour (if different than the time the report was made). +- Other people involved in the incident, if applicable. +- If you believe the incident is ongoing. +- If there is a publicly available record (e.g. mailing list record, a screenshot). +- Any additional information. + +After you file a report, one or more members of our Safety Team will contact you to follow up on your report. + +## Who will read and handle reports + +All reports will be read and handled by the members of the Safety Team at nf-core. + +If members of the Safety Team are deemed to have a conflict of interest with a report, they will be required to recuse themselves as per our Code of Conduct and will not have access to any follow-ups. + +To keep this first report confidential from any of the Safety Team members, please submit your first report by direct messaging on Slack/direct email to any of the nf-core members you are comfortable disclosing the information to, and be explicit about which member(s) you do not consent to sharing the information with. + +## Reviewing reports + +After receiving the report, members of the Safety Team will review the incident report to determine whether immediate action is required, for example, whether there is immediate threat to participants’ safety. + +The Safety Team, in consultation with members of the nf-core core team, will assess the information to determine whether the report constitutes a Code of Conduct violation, for them to decide on a course of action. + +In the case of insufficient information, one or more members of the Safety Team may contact the reporter, the reportee, or any other attendees to obtain more information. -Issues directly concerning members of the core team will be dealt with by other members of the core team and the safety manager, and possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson, and details will be shared in due course. +Once additional information is gathered, the Safety Team will collectively review and decide on the best course of action to take, if any. The Safety Team reserves the right to not act on a report. -All reports will be handled with utmost discretion and confidentially. +## Confidentiality + +All reports, and any additional information included, are only shared with the team of safety officers (and possibly members of the core team, in case the safety officer is in violation of the CoC). We will respect confidentiality requests for the purpose of protecting victims of abuse. + +We will not name harassment victims, beyond discussions between the safety officer and members of the nf-core team, without the explicit consent of the individuals involved. + +## Enforcement + +Actions taken by the nf-core’s Safety Team may include, but are not limited to: + +- Asking anyone to stop a behaviour. +- Asking anyone to leave the event and online spaces either temporarily, for the remainder of the event, or permanently. +- Removing access to the gather.town and Slack, either temporarily or permanently. +- Communicating to all participants to reinforce our expectations for conduct and remind what is unacceptable behaviour; this may be public for practical reasons. +- Communicating to all participants that an incident has taken place and how we will act or have acted — this may be for the purpose of letting event participants know we are aware of and dealing with the incident. +- Banning anyone from participating in nf-core-managed spaces, future events, and activities, either temporarily or permanently. +- No action. ## Attribution and Acknowledgements @@ -106,6 +161,22 @@ All reports will be handled with utmost discretion and confidentially. ## Changelog -### v1.0 - March 12th, 2021 +### v1.4 - February 8th, 2022 + +- Included a new member of the Safety Team. Corrected a typographical error in the text. + +### v1.3 - December 10th, 2021 + +- Added a statement that the CoC applies to nf-core gather.town workspaces. Corrected typographical errors in the text. + +### v1.2 - November 12th, 2021 + +- Removed information specific to reporting CoC violations at the Hackathon in October 2021. + +### v1.1 - October 14th, 2021 + +- Updated with names of new Safety Officers and specific information for the hackathon in October 2021. + +### v1.0 - March 15th, 2021 - Complete rewrite from original [Contributor Covenant](http://contributor-covenant.org/) CoC. diff --git a/README.md b/README.md index f1ddc15f..106f3cea 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # ![nf-core/metatdenovo](docs/images/nf-core-metatdenovo_logo_light.png#gh-light-mode-only) ![nf-core/metatdenovo](docs/images/nf-core-metatdenovo_logo_dark.png#gh-dark-mode-only) -[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/metatdenovo/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX) +[![GitHub Actions CI Status](https://github.com/nf-core/metatdenovo/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/metatdenovo/actions?query=workflow%3A%22nf-core+CI%22) +[![GitHub Actions Linting Status](https://github.com/nf-core/metatdenovo/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/metatdenovo/actions?query=workflow%3A%22nf-core+linting%22)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/metatdenovo/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX) [![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/) [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) @@ -29,10 +30,11 @@ ## Usage -> **Note** -> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how -> to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) -> with `-profile test` before running the workflow on actual data. +:::note +If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how +to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) +with `-profile test` before running the workflow on actual data. +:::