Skip to content

Commit 77ff8c9

Browse files
kornkvmirpedrolsainsachikodelfiterradaspeterpru
committed
Add draft of FASTQ_REMOVE_ADAPTERS_AND_MERGE subworkflow with tests (#9521)
* Add draft of FASTQ_REMOVE_ADAPTERS_AND_MERGE subworkflow with tests * Add ontologies to tcoffee/regressive and upp/align modules (#9484) * add ontologies to tcoffee regressive * add ontologies to upp align * Add module PBMARKDUP (#9457) * Add module pbmarkdup * Fix linting * Update path to test data * Update with code review (--dup-file, log, check file name collisions) * Fix linting * Update path to test data * Update modules/nf-core/pbmarkdup/meta.yml * Fix linting * Enable complex contrast strings in DESeq2 (#9473) * Enable complex contrast strings * Update docker image * Add test case with limma contrast string * Format changes and add test with shrinkage * Declare deepvariant optional html output (#9469) * Add deepvariant optional html * update snapshot * Update modules/nf-core/deepvariant/rundeepvariant/main.nf Co-authored-by: Ramprasad Neethiraj <[email protected]> * trigger html generation * revert config change --------- Co-authored-by: Ramprasad Neethiraj <[email protected]> * utils_nfcore_pipeline: fix small lang server error (#9492) fix small lang server error * Fix hisat2/align to support large genome indices (.ht2l) (#9493) HISAT2 uses .ht2l extension instead of .ht2 for large genomes. Updated index detection to match both extensions. Related to nf-core/rnaseq#1643 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]> * Update shinyngs modules to latest release (#9488) * Update semibin/singleeasybin environment (#9495) * add new ontology term to tcoffee align (#9497) * tcoffee_extractfrompdb test: sort file listing so "first" file is deterministic (#9489) * Sort file listing so "first" file is deterministic * Declare closure parameter per strict syntax Co-authored-by: Matthias Hörtenhuber <[email protected]> --------- Co-authored-by: Matthias Hörtenhuber <[email protected]> Co-authored-by: mashehu <[email protected]> * Sambamba depth add region bed input (#9498) * sambamba add region bed input * fix linting * fix linting * Apply suggestions from code review Co-authored-by: Felix Lenner <[email protected]> --------- Co-authored-by: Felix Lenner <[email protected]> * fix fasta_index_methylseq and fastq_align_dedup workflows (#9496) * fix fasta_index_methylseq and fastq_align_dedup workflows for clarity and consistency - Updated variable names in fasta_index_methylseq to use 'channel' instead of 'Channel' for consistency. - Renamed UNTAR to UNTAR_BISMARK and UNTAR_BWAMETH for clarity in fasta_index_methylseq. - Enhanced comments and descriptions in meta.yml files for better understanding of input and output structures. - Adjusted test cases in fastq_align_dedup workflows to reflect changes in input structure from single-end to paired-end. - Updated version numbers in test snapshots to reflect recent changes. * fix: pre-commit lint fixes * Update test files for Glimpse (#9467) * Update glimpse * Update chunk * Update concordance * Revert changes * Fix glimpse test * Fix glimpse * Fix glimpse2 tests * Update sbwf * Remove old snapshots * Update glimpse * Update modules/nf-core/glimpse2/concordance/tests/main.nf.test Co-authored-by: Matthias Hörtenhuber <[email protected]> * Update test --------- Co-authored-by: LouisLeNezet <[email protected]> Co-authored-by: Matthias Hörtenhuber <[email protected]> * meta.yml schema: add `containers` section, fix order and simplify (#9503) * fix order * add container section * simplify schema * require https for singluarity * update and add topics to snakemake module (#9454) * update and add topics * add new topics structure * add stub test and capture version in snapshot * update to 9.14.0 * fix singularity be setting cache_dir * fix stub --------- Co-authored-by: Matthias Hörtenhuber <[email protected]> Co-authored-by: mashehu <[email protected]> * fix sambamba depth stub version (#9509) * fix stub version * stray module * anota2seq: wrong variable name for batch assignment (#9511) rename variable * fix(anota2seq): add gene IDs and handle empty results (#9510) - Add missing gene_id_col parameter definition (defaults to 'gene_id') - Include gene IDs as first column in all results tables using configurable column name - Only write output files when there are significant results to avoid empty files - Mark all results TSV outputs as optional since they're conditionally created - Update test to use buffering results instead of empty mRNA_abundance results - Update test snapshots with new file formats including gene_id column This ensures anota2seq results are consistent with other modules and include gene identifiers for downstream analysis, while gracefully handling cases where no genes pass significance thresholds. Co-authored-by: Sebastian Uhrig <[email protected]> * fix(decoupler): reorder imports and ensure environment variables are … (#9516) fix(decoupler): reorder imports and ensure environment variables are set before importing modules * Add strdrop/build (#9512) Add strdrop build * chore(deps): update infrastructural dependencies * 🔧 update image and bioconda container for VueGen to latest version (#9201) * 🔧 update image and bioconda container to latest version * ✅ update test snapshots * 🐛 fix display of version of vuegen - had no command line interface option to display version, see Multiomics-Analytics-Group/vuegen#167 * 🎨 display versions.yml content in snapshots * 🔧 add Dockerfile to install lastet PyPI vuegen version - does not pass hadolint(er) as of now * 🚧 add wave containers * 🔥 remove README again * 🔥 remove Dockerfile again * 🚧 try to follow Mahesh's advice * 🐛 add explicit cache directory * 🔧 bump to Python 3.12 and remove channel prefix * 🔧 specify singularity image with https ... as specified in the docs: https://nf-co.re/docs/tutorials/nf-core_components/using_seqera_containers * 🚧 set user specified R libarary folder * ⏪ make docker and conda work again (using nf-core 3.5.1) * 🔧 switch again to custom docker image instead of wave - wave leads to too many custom installation issues * 🐛 try to add font package * 🔥 remove code moved to image - singularity runs in devcontainer * ⏪ add back conda quarto flag * 🎨 remove trailing whitespace * 🎨 format again * 🎨 hopefully the last trailing whitespace * 📝 document the build process and why the container is needed * Update image with nf-core one Co-authored-by: Matthias Hörtenhuber <[email protected]> * Update container name Co-authored-by: Matthias Hörtenhuber <[email protected]> * Apply suggestion from @mashehu * Apply suggestion from @mashehu --------- Co-authored-by: Famke Bäuerle <[email protected]> Co-authored-by: Matthias Hörtenhuber <[email protected]> * qsv/cat: bump version (#9518) Bump qsv * Update haplogrep3 recipe to use topics (#9523) Co-authored-by: nf-core-bot <[email protected]> * semibin/singleeasybin: bump version + migrate to topics (#9517) * Update semibin2 module * Update snapshot * Remove unneeded snapshot section --------- Co-authored-by: Matthias Hörtenhuber <[email protected]> * remove unused folder * rename * trimmomatic revisit * cutadapt revisit * trimgalore revisit * bbduk revisit * fastp revisit * adapterremoval revisit * leehom checkpoint (#9534) * leehom checkpoint * debugged with transpose and proper collect on nf-test * leehom change order * remove ngmerge because cant deal with /1 /2 paired reads * paired end no merge test * New module: clusty (#9533) * new module clusty * patch links docs * fix prettier * remove non-mandatory input 'algorithm' * also patch stub input * Bump TRGT to 4.1.0 (#9514) * Bump TRGT to 4.1.0 * Switch to topics * Update modules/nf-core/trgt/genotype/tests/main.nf.test Co-authored-by: Matthias Hörtenhuber <[email protected]> * remove duplicate versions --------- Co-authored-by: Matthias Hörtenhuber <[email protected]> * fix missing quotes (#9535) * Fix dream to show more than 10 results (#9507) * fix: dream to show more than 10 results * test: update snapshots * test: update snapshots * feat: add round digits option and update snapshots again * fix: improve code formatting and update test snapshots * Fix tests and update snapshots * Update snapshot for `abundance_differential_filter` subworkflow * Fix tests with unstable content * Fix unstable files in test for `abundance_differential_filter` subworkflow --------- Co-authored-by: Anabella Trigila <[email protected]> * rename to more appropriate fastq_preprocess_seqkit (#9537) * New module - TD2 (added modules for td2.longorfs & td2.predict) (#9475) * added modules for td2.longorfs & td2.predict * changes to version handling, updated snaps, and tests - resolving comments * added topics section in meta.yml * fix topics section in meta.yml * Update modules/nf-core/td2/longorfs/main.nf Co-authored-by: Simon Pearce <[email protected]> * Update modules/nf-core/td2/longorfs/meta.yml Co-authored-by: Simon Pearce <[email protected]> * Update modules/nf-core/td2/predict/main.nf Co-authored-by: Simon Pearce <[email protected]> * Update modules/nf-core/td2/longorfs/meta.yml Co-authored-by: Simon Pearce <[email protected]> * Update main.nf - stub run * Update meta.yml * resolving comments * updated emad ontologies * Update modules/nf-core/td2/predict/tests/main.nf.test.snap * Update modules/nf-core/td2/predict/main.nf * Update modules/nf-core/td2/longorfs/tests/main.nf.test.snap * Update modules/nf-core/td2/longorfs/main.nf * Update modules/nf-core/td2/predict/tests/main.nf.test.snap * Update modules/nf-core/td2/longorfs/tests/main.nf.test.snap --------- Co-authored-by: Simon Pearce <[email protected]> * Bump ichorCNA package build in ichorcna/createpon and ichorcna/run (#9531) * Bump ichorCNA package build in ichorcna/createpon and ichorcna/run At the moment, creating a PoN without data on chromosome X is bound to fail due to a bug in ichorCNA(GavinHaLab/ichorCNA#26). It is unclear when a new version will be out, so I have patched the current bioconda package (bioconda/bioconda-recipes#61045) and built new container images, which I want to update to in this PR. * Update some md5sums * Update test snapshot * Update test snapshot * RSeQC split_bam.py module implementation (#9536) * RSeQC split_bam.py module implementation Syntax edit Refractored version channel to topic Cleanup * Update modules/nf-core/rseqc/splitbam/main.nf Co-authored-by: Felix Lenner <[email protected]> * Update modules/nf-core/rseqc/splitbam/tests/main.nf.test Co-authored-by: Felix Lenner <[email protected]> * Update modules/nf-core/rseqc/splitbam/tests/main.nf.test Co-authored-by: Felix Lenner <[email protected]> * Updated snapshot --------- Co-authored-by: Felix Lenner <[email protected]> Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * remove topics from multiqc (#9530) * remove topics from multiqc * versions_multiqc -> versions * Apply suggestion from @nvnieuwk * fix meta.yml after merge * bump to MultiQC version 1.33 (#9538) * bump to 1.33 * update snapshots --------- Co-authored-by: Matthias Hörtenhuber <[email protected]> * Add strdrop/call (#9513) * Add strdrop build * Add strdrop/call * remove tag * fix wrong parameter name in error * align * remove duplicate versions * snaps * figure out why snapshots are not stable * different versions of trgt used in setup * Bump TRGT to 5.0.0 (#9541) 5.0.0 * Channel -> channel in some subwfs (#9542) Channel -> channel * Migrate cat/fastq to topic channel (#9543) * Migrate cat/fastq to topic channel * Remove out.versions in related subworkflows * Update snapshots (again) * Add module picard/collectvariantcallingmetrics (#9502) * Add module picard/collectvariantcallingmetrics * Run prettier * Fix format * Make one input tuple * Change test input structure * Add md5 checksum * Update snapshot * Update meta.yml * Support multithreading * Remove TODO Co-authored-by: Famke Bäuerle <[email protected]> --------- Co-authored-by: Famke Bäuerle <[email protected]> * fix tabix/tabix stub (#9544) * fix tabix stub * bump max shards to 16 * Unify msa modules (#9539) * add mafft_align subworkflow to prepare channels for mafft/align like all other msa modules * default output format fasta for tcoffee align and regressive to match other msa modules * [automated] Fix linting with Prettier * Update subworkflows/nf-core/mafft_align/main.nf Co-authored-by: Jose Espinosa-Carrasco <[email protected]> --------- Co-authored-by: nf-core-bot <[email protected]> Co-authored-by: Jose Espinosa-Carrasco <[email protected]> * Fix missing version from subworkflow snapshot (#9548) * New module: whatshap/phase (#9431) * add whatshap phase module * change the vcf-specific test * change test * add versions * remove snapshot * update snapshot * Update modules/nf-core/whatshap/phase/tests/main.nf.test Co-authored-by: Famke Bäuerle <[email protected]> * rm unused args * add snapshot * add ontologies * update the snapshot * add versions to snapshot * fix stub issues * update the test and snap * fix format with "nextflow lint" * fix hardcoded name and file name ambiguity problem --------- Co-authored-by: Famke Bäuerle <[email protected]> * Bump version cat/cat to pigz 2.8 & rewrite nf-test & topic channel (#9549) * bump version cat/cat * reinclude cat tags for other modules * patch test name & meta.yml * Update main.nf.test * plastid metagene_generate, make_wiggle, psite (#9482) * plastid metagene_generate, make_wiggle, psite * pair BAM and BAI files * pair bam and p_offsets * omit optional arguments * metagene generate accepts various input formats * add meta * do not remove variable headers from output files * warning about hard-coded version * make lint happy * make lint happy #2 * plastid/make_wiggle: nf-core standards compliance - Add mapping_rule val input (enum: fiveprime, threeprime, center, fiveprime_variable) - Move output_format to ext.args (optional arg per nf-core standards) - Add validation: error if p_offsets missing with fiveprime_variable - Remove hardcoded --fiveprime_variable - Update meta.yml with mapping_rule input and enum - Update tests with mapping_rule input 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * adapt meta.yml to new parameters * plastid: consolidate test snapshots and fix reproducibility - Consolidate multiple snapshot assertions into single snapshots per test - Remove snapshots of empty stub files (just check existence) - Exclude non-reproducible PNG from psite snapshots (matplotlib drift) - Format metagene_generate command across multiple lines 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * plastid/make_wiggle: remove tracks from snapshot Wig files have non-reproducible md5sums across environments. Content is already validated via getText().contains('track'). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * plastid/psite: remove non-reproducible outputs from snapshot metagene_profiles.txt and p_offsets.txt have non-reproducible md5sums. Content is already validated via getText().contains() checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Jonathan Manning <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]> * Add index and threads to trgt/merge (#9545) * Fix test path modification (#9465) * Update bcftools * Update bcftools csq * Update somalier ancestry * Update bcftools pluginfilltags * Update cnvnator * Update snap cnvnator * Fix extract somalier sbwf * Update snapshot * Update md5 * Fix linting * Upd snapshot * Upd snapshot * Upd snapshot * Upd snapshot --------- Co-authored-by: LouisLeNezet <[email protected]> * Update xenium ranger modules and subworkflows (#9525) * update xeniumranger modules to use xeniumranger v4.0 * update xeniumranger modules to use xeniumranger v4.0 * fix: update xeniumranger import-segmentation tests and logic * update test compute resource spec to follow 10x website * remove extra file * fix: apply topic channels and update meta.yml structure for xeniumranger * fix: update meta.yml structure to satisfy schema * fix: align meta.yml with topic versions blog post example * fix: update meta.yml topics structure to satisfy schema validation * fix: automated lint fix for meta.yml topics structure * fix: use standard container definition syntax * fix: apply topic versions to rename module * fix: apply topic versions and meta.yml schema fixes for xeniumranger modules and subworkflows * untrack files * remove test config files for github workflow * remove config def in tests * remove config def in tests * Update tests and snapshots for xeniumranger modules and subworkflows * remove subworkflows for xeniumranger * remove subworkflows for xeniumranger * fix: update test template * fix relabel meta.yml * make prek hppy * make prek hppy * make prek hppy * update import-segmentation doc * update import-segmentation doc * fix oncologies * Fix snapshot file key order for rename and resegment modules * Apply suggestions from code review Co-authored-by: Copilot <[email protected]> * comment out config * fix: make prek happy * fix typo * remove test files --------- Co-authored-by: Dongze He <[email protected]> Co-authored-by: Sameesh Kher <[email protected]> Co-authored-by: Copilot <[email protected]> * Version update: Modkit repair, callmods and bedmethyltobigwig (#9547) * update to v0.6 * update to v0.6 * update to v0.6 * update yml * update to v0.6 * update snapshot * update snapshot --------- Co-authored-by: ra25wog <[email protected]> * Update `GLIMPSE` sbwf (#9524) * Update glimpse sbwf * Update test * Update filter operation * Update subworkflows/nf-core/vcf_impute_glimpse/main.nf Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Update subworkflows/nf-core/vcf_impute_glimpse/main.nf Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Update subworkflows/nf-core/vcf_impute_glimpse/main.nf Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Update subworkflows/nf-core/vcf_impute_glimpse/main.nf Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Update snapshot --------- Co-authored-by: LouisLeNezet <[email protected]> Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Add quilt imputation subworkflow (#9443) * Add sbwf quilt * Fix tags * Update meta * Use modules repo files * Update glimpse2 imputation subworkflow (#9434) * Update glimpse2 sbwf * Update test * Update subworkflows/nf-core/bam_vcf_impute_glimpse2/main.nf Co-authored-by: Jonathan Manning <[email protected]> * Update subworkflows/nf-core/bam_vcf_impute_glimpse2/tests/main.nf.test Co-authored-by: Jonathan Manning <[email protected]> * Add deprecation * Change ifEmpty --------- Co-authored-by: LouisLeNezet <[email protected]> Co-authored-by: Jonathan Manning <[email protected]> * Add `BEAGLE5` imputation subworkflow (#9550) * Update glimpse2 sbwf * Update test * Add region to beagle5 * Add subworkflow * Fix linting * Fix linting * Fix linting * Update subworkflows/nf-core/vcf_impute_beagle5/main.nf Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Add comment * Update grouping and test * Remove tag * Revert change glimpse2 reference * Revert change glimpse2 sbwf * Revert change glimpse2 sbwf * Revert change glimpse2 sbwf --------- Co-authored-by: LouisLeNezet <[email protected]> Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Add minimac4 imputation subworkfllow (#9451) * Add vcf_impute_minimac4 * Update linting * Update test * Fix linting * Update minimac4 sbwf * Remove tag * Remove tag * Fix linting * Add comment * Update snapshot * Fix nf-test * Add BBSplit stats to MultiQC in fastq_qc_trim_filter_setstrandedness subworkflow (#9559) Add BBSplit stats to MultiQC files in fastq_qc_trim_filter_setstrandedness Pass BBSplit stats output to MultiQC for visualization of read binning statistics. MultiQC 1.33+ includes support for parsing BBSplit stats.txt files and displaying per-sample read distribution across reference genomes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]> * Update cutadapt (#9551) * proper stub for gz and stub test added * topic output syntax and tests update * meta yml updated with topics and ontologies * meta file curated * version bump to latest * update nf-tests properly * adding self to maintainers * removed Z flag as is deprecated after v4.10 * conda bug with different pre-built python version fixed * added cutadapt to stub now that stub gz is properly created, and removed cutadapt versions, since it is now ported to topics * single-end test with tool skips * Standarize and alignment for all imputation and alignment modules (#9566) * Standarize and alignment * Fix glimpse2 sbwf test * Fix test * Add comment * Update snapshot --------- Co-authored-by: LouisLeNezet <[email protected]> * Update Infrastructural dependencies * Remove .view() (#9567) * Bump strdrop to 0.3.1 (#9565) * Remove unecessary tags (#9568) * Remove .view() * Remove unecessary tags * Update trimgalore (#9570) * testing solo trim-galore container, without adding extra cutadapt and pigz * Syntax updates and topic version for manta modules (#9556) * update manta germline * topics convertinversion * topics convertinversion * topics manta/somatic * topics manta/tumoronly * Syntax updates and topics of jasminesv (#9554) syntax updates and topics of jasminesv * Update `Modkit pileup` (#9553) * update yaml * update main.nf * modified test runs * update bedmethyltobigwig tests * update main * update snapshot * fix linting * update snapshots * remove config * update module_args * [automated] Fix linting with Prettier * changed name * update main --------- Co-authored-by: ra25wog <[email protected]> Co-authored-by: nf-core-bot <[email protected]> * Standarize and alignment for all imputation and alignment modules (#9566) * Standarize and alignment * Fix glimpse2 sbwf test * Fix test * Add comment * Update snapshot --------- Co-authored-by: LouisLeNezet <[email protected]> * Update Infrastructural dependencies * Remove .view() (#9567) * Bump strdrop to 0.3.1 (#9565) * Remove unecessary tags (#9568) * Remove .view() * Remove unecessary tags * latest container, with cutadapt 5.2 * new output syntax, nf-tests updated, meta updated * meta yml lint fixed * trying to fix lint * lint fix with nf-core tools 3.6.0dev * removing TRIMGALORE versions output from the FASTQ_FASTQC_UMITOOLS_TRIMGALORE subworkflow --------- Co-authored-by: Nicolas Vannieuwkerke <[email protected]> Co-authored-by: Jinn <[email protected]> Co-authored-by: ra25wog <[email protected]> Co-authored-by: nf-core-bot <[email protected]> Co-authored-by: Louis Le Nézet <[email protected]> Co-authored-by: LouisLeNezet <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Felix Lenner <[email protected]> * trimgalore output versions removed * structure for subworkflow outputs in meta.yml file * Update subworkflows/nf-core/fastq_removeadapters_merge/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * Update subworkflows/nf-core/fastq_removeadapters_merge/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * main and meta updated with new one-tool logic * nf-tests updated * var name change * paired_interleaved dropped * adapterremoval merge logic update similar to eager * Update subworkflows/nf-core/fastq_removeadapters_merge/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * update snapshot --------- Co-authored-by: Júlia Mir Pedrol <[email protected]> Co-authored-by: Hanh Hoang <[email protected]> Co-authored-by: Delfina Terradas <[email protected]> Co-authored-by: Peter Pruisscher <[email protected]> Co-authored-by: Ramprasad Neethiraj <[email protected]> Co-authored-by: Matthias De Smet <[email protected]> Co-authored-by: Jonathan Manning <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: Diego Alvarez S. <[email protected]> Co-authored-by: Nathan Weeks <[email protected]> Co-authored-by: Matthias Hörtenhuber <[email protected]> Co-authored-by: mashehu <[email protected]> Co-authored-by: Felix Lenner <[email protected]> Co-authored-by: Sateesh_Peri <[email protected]> Co-authored-by: Louis Le Nézet <[email protected]> Co-authored-by: LouisLeNezet <[email protected]> Co-authored-by: Maxime U Garcia <[email protected]> Co-authored-by: Sebastian Uhrig <[email protected]> Co-authored-by: Anabella Trigila <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Henry Webel <[email protected]> Co-authored-by: Famke Bäuerle <[email protected]> Co-authored-by: nf-core-bot <[email protected]> Co-authored-by: vagkaratzas <[email protected]> Co-authored-by: Evangelos Karatzas <[email protected]> Co-authored-by: Joon Klaps <[email protected]> Co-authored-by: Sameesh Kher <[email protected]> Co-authored-by: Simon Pearce <[email protected]> Co-authored-by: Luca Beltrame <[email protected]> Co-authored-by: Rayan Hassaïne <[email protected]> Co-authored-by: Nicolas Vannieuwkerke <[email protected]> Co-authored-by: Friederike Hanssen <[email protected]> Co-authored-by: Adrien Coulier <[email protected]> Co-authored-by: Georgia Kesisoglou <[email protected]> Co-authored-by: Jose Espinosa-Carrasco <[email protected]> Co-authored-by: HD Yi <[email protected]> Co-authored-by: Dongze He <[email protected]> Co-authored-by: Dongze He <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Jinn <[email protected]> Co-authored-by: ra25wog <[email protected]> Co-authored-by: Jonathan Manning <[email protected]> Co-authored-by: James A. Fellows Yates <[email protected]>
1 parent 5be99dd commit 77ff8c9

File tree

8 files changed

+826
-1
lines changed

8 files changed

+826
-1
lines changed

setup-nextflow

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
// both SE and PE
2+
include { TRIMMOMATIC } from '../../../modules/nf-core/trimmomatic/main'
3+
include { CUTADAPT } from '../../../modules/nf-core/cutadapt/main'
4+
include { TRIMGALORE } from '../../../modules/nf-core/trimgalore/main'
5+
include { BBMAP_BBDUK } from '../../../modules/nf-core/bbmap/bbduk/main'
6+
include { LEEHOM } from '../../../modules/nf-core/leehom/main'
7+
// both SE and PE, plus merging
8+
include { FASTP } from '../../../modules/nf-core/fastp/main'
9+
include { ADAPTERREMOVAL as ADAPTERREMOVAL_SE } from '../../../modules/nf-core/adapterremoval/main'
10+
include { ADAPTERREMOVAL as ADAPTERREMOVAL_PE } from '../../../modules/nf-core/adapterremoval/main'
11+
// helper module for concatenating adapterremoval paired-end processed reads
12+
include { CAT_FASTQ } from '../../../modules/nf-core/cat/fastq/main'
13+
14+
workflow FASTQ_REMOVEADAPTERS_MERGE {
15+
16+
take:
17+
ch_input_reads // channel: [mandatory] meta, reads
18+
val_adapter_tool // string: [mandatory] tool_name // choose from: ["trimmomatic", "cutadapt", "trimgalore", "bbduk", "leehom", "fastp", "adapterremoval"]
19+
ch_custom_adapters_file // channel: [optional] {fasta,txt} // fasta, for bbduk or fastp, or txt, for adapterremoval
20+
val_save_merged // boolean: [mandatory] if true, will return the merged reads instead, for fastp and adapterremoval
21+
val_fastp_discard_trimmed_pass // boolean: [mandatory] // only for fastp
22+
val_fastp_save_trimmed_fail // boolean: [mandatory] // only for fastp
23+
24+
main:
25+
26+
ch_discarded_reads = channel.empty() // from trimmomatic, trimgalore, leehom, fastp, adapterremoval
27+
ch_log = channel.empty() // from trimmomatic, trimgalore, fastp
28+
ch_report = channel.empty() // from trimmomatic, trimgalore, fastp
29+
ch_versions = channel.empty()
30+
ch_multiqc_files = channel.empty() // from trimmomatic, cutadapt, bbduk, leehom, fastp, adapterremoval
31+
32+
if (val_adapter_tool == "trimmomatic") {
33+
TRIMMOMATIC( ch_input_reads )
34+
35+
ch_processed_reads = TRIMMOMATIC.out.trimmed_reads
36+
ch_discarded_reads = ch_discarded_reads.mix(TRIMMOMATIC.out.unpaired_reads.transpose()) // .transpose() because paired reads will output 2 unpaired files in an array
37+
ch_log = TRIMMOMATIC.out.trim_log
38+
ch_report = TRIMMOMATIC.out.summary
39+
ch_versions = ch_versions.mix(TRIMMOMATIC.out.versions.first())
40+
ch_multiqc_files = ch_multiqc_files.mix(TRIMMOMATIC.out.out_log)
41+
} else if (val_adapter_tool == "cutadapt") {
42+
CUTADAPT( ch_input_reads )
43+
44+
ch_processed_reads = CUTADAPT.out.reads
45+
ch_multiqc_files = ch_multiqc_files.mix(CUTADAPT.out.log)
46+
} else if (val_adapter_tool == "trimgalore") {
47+
TRIMGALORE( ch_input_reads )
48+
49+
ch_processed_reads = TRIMGALORE.out.reads
50+
ch_discarded_reads = ch_discarded_reads.mix(TRIMGALORE.out.unpaired)
51+
ch_log = TRIMGALORE.out.log
52+
ch_report = TRIMGALORE.out.html.mix(TRIMGALORE.out.zip)
53+
} else if (val_adapter_tool == "bbduk") {
54+
BBMAP_BBDUK( ch_input_reads, ch_custom_adapters_file )
55+
56+
ch_processed_reads = BBMAP_BBDUK.out.reads
57+
ch_versions = ch_versions.mix(BBMAP_BBDUK.out.versions.first())
58+
ch_multiqc_files = ch_multiqc_files.mix(BBMAP_BBDUK.out.log)
59+
} else if (val_adapter_tool == "leehom") {
60+
LEEHOM( ch_input_reads )
61+
62+
ch_processed_reads = LEEHOM.out.fq_pass
63+
.join(LEEHOM.out.unmerged_r1_fq_pass, by: 0, remainder: true)
64+
.join(LEEHOM.out.unmerged_r2_fq_pass, by: 0, remainder: true)
65+
.map { meta, single, r1, r2 ->
66+
if (meta.single_end) {
67+
return [meta, single]
68+
} else {
69+
return [meta, [r1, r2]]
70+
}
71+
}
72+
ch_discarded_reads = ch_discarded_reads.mix(LEEHOM.out.fq_fail, LEEHOM.out.unmerged_r1_fq_fail, LEEHOM.out.unmerged_r2_fq_fail)
73+
ch_versions = ch_versions.mix(LEEHOM.out.versions.first())
74+
ch_multiqc_files = ch_multiqc_files.mix(LEEHOM.out.log)
75+
} else if (val_adapter_tool == "fastp") {
76+
FASTP(
77+
ch_input_reads.map { meta, files -> [ meta, files, ch_custom_adapters_file ] },
78+
val_fastp_discard_trimmed_pass,
79+
val_fastp_save_trimmed_fail,
80+
val_save_merged
81+
)
82+
83+
if (val_save_merged) {
84+
ch_processed_reads = FASTP.out.reads_merged
85+
} else {
86+
ch_processed_reads = FASTP.out.reads
87+
}
88+
ch_discarded_reads = ch_discarded_reads.mix(FASTP.out.reads_fail.transpose()) // .transpose() because paired reads have 3 fail files in an array
89+
ch_log = FASTP.out.log
90+
ch_report = FASTP.out.html
91+
ch_versions = ch_versions.mix(FASTP.out.versions.first())
92+
ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json)
93+
} else if (val_adapter_tool == "adapterremoval") {
94+
ch_adapterremoval_in = ch_input_reads
95+
.branch { meta, _reads ->
96+
single: meta.single_end
97+
paired: !meta.single_end
98+
}
99+
100+
ADAPTERREMOVAL_SE( ch_adapterremoval_in.single, ch_custom_adapters_file )
101+
ADAPTERREMOVAL_PE( ch_adapterremoval_in.paired, ch_custom_adapters_file )
102+
103+
if (val_save_merged) { // merge
104+
ch_concat_fastq = channel.empty()
105+
.mix(
106+
ADAPTERREMOVAL_PE.out.collapsed,
107+
ADAPTERREMOVAL_PE.out.collapsed_truncated,
108+
ADAPTERREMOVAL_PE.out.singles_truncated,
109+
)
110+
.map { meta, reads ->
111+
def meta_new = meta.clone()
112+
meta_new.single_end = true
113+
[meta_new, reads]
114+
}
115+
.groupTuple()
116+
// Paired-end reads cause a nested tuple during grouping.
117+
// We want to present a flat list of files to `CAT_FASTQ`.
118+
.map { meta, fastq -> [meta, fastq.flatten()] }
119+
120+
CAT_FASTQ( ch_concat_fastq )
121+
122+
ch_processed_reads = CAT_FASTQ.out.reads.mix(ADAPTERREMOVAL_SE.out.singles_truncated)
123+
} else { // no merge
124+
ch_processed_reads = ADAPTERREMOVAL_PE.out.paired_truncated.mix(ADAPTERREMOVAL_SE.out.singles_truncated)
125+
}
126+
ch_discarded_reads = ch_discarded_reads.mix(ADAPTERREMOVAL_SE.out.discarded, ADAPTERREMOVAL_PE.out.discarded)
127+
ch_versions = ch_versions.mix(ADAPTERREMOVAL_SE.out.versions.first(), ADAPTERREMOVAL_PE.out.versions.first())
128+
ch_multiqc_files = ch_multiqc_files.mix(ADAPTERREMOVAL_PE.out.settings, ADAPTERREMOVAL_SE.out.settings)
129+
} else {
130+
error('Please choose one of the available adapter removal and merging tools: ["trimmomatic", "cutadapt", "trimgalore", "bbduk", "leehom", "fastp", "adapterremoval"]')
131+
}
132+
133+
emit:
134+
processed_reads = ch_processed_reads // channel: [ val(meta), [ fastq.gz ] ]
135+
discarded_reads = ch_discarded_reads // channel: [ val(meta), [ fastq.gz ] ]
136+
logfile = ch_log // channel: [ val(meta), [ {log,txt} ] ]
137+
report = ch_report // channel: [ val(meta), [ {summary,html,zip} ] ]
138+
versions = ch_versions // channel: [ versions.yml ]
139+
multiqc_files = ch_multiqc_files
140+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
2+
name: "fastq_removeadapters_merge"
3+
description: Remove adapters and merge reads based on various module choices
4+
keywords:
5+
- adapters
6+
- removal
7+
- short reads
8+
- merge
9+
- trim
10+
components:
11+
- trimmomatic
12+
- cutadapt
13+
- trimgalore
14+
- bbmap/bbduk
15+
- leehom
16+
- fastp
17+
- adapterremoval
18+
- cat/fastq
19+
input:
20+
- ch_input_reads:
21+
type: file
22+
description: |
23+
List of FastQ files of size 1 and 2 for single-end and paired-end data, respectively.
24+
Structure: [ val(meta), [ path(reads) ] ]
25+
- val_adapter_tool:
26+
type: string
27+
description: |
28+
Choose one of the available adapter removal and/or merging tools
29+
enum: ["trimmomatic", "cutadapt", "trimgalore", "bbduk", "leehom", "fastp", "adapterremoval"]
30+
- ch_custom_adapters_file:
31+
type: file
32+
description: |
33+
Optional reference files, containing adapter and/or contaminant sequences for removal.
34+
In fasta format for bbmap/bbduk and fastp, or in text format for AdapterRemoval (one adapter per line).
35+
- val_save_merged:
36+
type: boolean
37+
description: |
38+
Specify true to output merged reads instead
39+
Used by fastp and adapterremoval
40+
- val_fastp_discard_trimmed_pass:
41+
type: boolean
42+
description: |
43+
Used only by fastp.
44+
Specify true to not write any reads that pass trimming thresholds from the fastp process.
45+
This can be used to use fastp for the output report only.
46+
- val_fastp_save_trimmed_fail:
47+
type: boolean
48+
description: |
49+
Used only by fastp.
50+
Specify true to save files that failed to pass fastp trimming thresholds
51+
output:
52+
- processed_reads:
53+
type: file
54+
description: |
55+
Structure: [ val(meta), path(fastq.gz) ]
56+
The trimmed/modified single or paired end or merged fastq reads
57+
pattern: "*.fastq.gz"
58+
- discarded_reads:
59+
type: file
60+
description: |
61+
Structure: [ val(meta), path(fastq.gz) ]
62+
The discarded reads
63+
pattern: "*.fastq.gz"
64+
- logfile:
65+
type: file
66+
description: |
67+
Execution log file
68+
(trimmomatic {log}, trimgalore {txt}, fastp {log})
69+
pattern: "*.{log,txt}"
70+
- report:
71+
type: file
72+
description: |
73+
Execution report
74+
(trimmomatic {summary}, trimgalore {html,zip}, fastp {html})
75+
pattern: "*.{summary,html,zip}"
76+
- versions:
77+
type: file
78+
description: |
79+
File containing software versions
80+
Structure: [ path(versions.yml) ]
81+
pattern: "versions.yml"
82+
- multiqc_files:
83+
type: file
84+
description: |
85+
MultiQC-compatible output files from tools used in preprocessing
86+
(trimmomatic, cutadapt, bbduk, leehom, fastp, adapterremoval)
87+
authors:
88+
- "@kornkv"
89+
- "@vagkaratzas"
90+
maintainers:
91+
- "@kornkv"
92+
- "@vagkaratzas"

0 commit comments

Comments
 (0)