Skip to content

Commit

Permalink
updated changelog, citations and output.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzalab committed Jan 31, 2025
1 parent 4cd16da commit 47b011e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 36 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"image": "nfcore/gitpod:latest",
"remoteUser": "gitpod",
"runArgs": ["--privileged"],

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
Expand All @@ -11,6 +12,7 @@
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"]
}
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Once there, use `nf-core pipelines schema build` to add to `nextflow_schema.json

### Default processes resource requirements

Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/main/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels.
Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels.

The process resources can be passed on to the tool dynamically within the process with the `${task.cpus}` and `${task.memory}` variables in the `script:` block.

Expand Down
28 changes: 18 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0](https://github.com/nf-core/fastqrepair/releases/tag/1.0.0) - Catanzaro YellowRed [25/01/2025]
## v[1.0.0](https://github.com/nf-core/fastqrepair/releases/tag/1.0.0) - Catanzaro YellowRed [25/01/2025]

Initial release of nf-core/fastqrepair, created with the [nf-core](https://nf-co.re/) template.

### Credits
<!--
Added
Fixed
Dependencies
Deprecated
-->

Special thanks to the following for their contributions to the release:

- [Sateesh Peri](https://github.com/sateeshperi)
- [Louis Le Nézet](https://github.com/LouisLeNezet) - reviewer
- [Anabella Trigila](https://github.com/atrigila) - reviewer
- [James A. Fellows Yates](https://github.com/jfy133) - reviewer

### Enhancements & fixes
### `Fixed`

- [PR #2](https://github.com/nf-core/fastqrepair/pull/2) - First release

Expand All @@ -35,3 +33,13 @@ Special thanks to the following for their contributions to the release:
> **NB:** Dependency has been **added** if just the new version information is present.
>
> **NB:** Dependency has been **removed** if new version information isn't present.
### Credits

Special thanks to the following for their contributions to the release:

- [Sateesh Peri](https://github.com/sateeshperi)
- [Louis Le Nézet](https://github.com/LouisLeNezet) - reviewer
- [Anabella Trigila](https://github.com/atrigila) - reviewer
- [James A. Fellows Yates](https://github.com/jfy133) - reviewer
- [Charles Plessy](https://github.com/charles-plessy) - reviewer
2 changes: 1 addition & 1 deletion CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- [Wipertools](https://github.com/mazzalab/fastqwiper)

> Mazza, T. (2025). Wipertools. [![DOI](https://zenodo.org/badge/325529896.svg)](https://doi.org/10.5281/zenodo.14176147){: style="float:right"}
> MazzaLab, Tommaso Mazza, & Jose F Oviedo. (2025). mazzalab/fastqwiper: v1.1.5 (v1.1.5). Zenodo. [https://doi.org/10.5281/zenodo.14774039](https://doi.org/10.5281/zenodo.14774039)
- [BBMap](http://sourceforge.net/projects/bbmap/)

Expand Down
4 changes: 2 additions & 2 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ The nf-core/fastqrepair pipeline is built using [Nextflow](https://www.nextflow.
- `pipeline_info` contains report metrics generated during the [workflow execution](#pipeline-information)
- `QC` contains [FastQC](#fastqc) QC analysis results and [MultiQC](#multiqc) reports
- `repaired` contains repaired fastq files and relative quality reports
- `mysampleA_R1.fastq.gz` and `mysampleA_R2.fastq.gz` are the repaired fastq files
- `mysampleA_R1.report` and `mysampleA_R2.report` are the summaries of the cleaning task
- `mysampleA_R1.fastq.gz` (and `mysampleA_R2.fastq.gz`) are the repaired fastq files
- `mysampleA_R1.report` (and `mysampleA_R2.report`) are the summaries of the cleaning task

</details>

Expand Down
15 changes: 7 additions & 8 deletions subworkflows/local/fastq_repair_wipertools/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ workflow FASTQ_REPAIR_WIPERTOOLS {
ch_fastq // channel: [ val(meta), [ .fastq ] ]

main:
ch_versions = Channel.empty()

// decouple fastq files [sample_id = id; id is the file name]
ch_decoupled = ch_fastq.flatMap {
meta, fastqList -> fastqList instanceof List
Expand All @@ -21,6 +23,7 @@ workflow FASTQ_REPAIR_WIPERTOOLS {
ch_decoupled,
params.num_splits
)
ch_versions = ch_versions.mix(WIPERTOOLS_FASTQSCATTER.out.versions.first())

/* decouple chunks
id = the chunk file name
Expand All @@ -37,6 +40,7 @@ workflow FASTQ_REPAIR_WIPERTOOLS {
WIPERTOOLS_FASTQWIPER {
ch_scattered_fastq
}
ch_versions = ch_versions.mix(WIPERTOOLS_FASTQWIPER.out.versions.first())

// group wiped chunks
ch_cleaned_fastq = Channel.empty()
Expand All @@ -50,6 +54,7 @@ workflow FASTQ_REPAIR_WIPERTOOLS {
WIPERTOOLS_FASTQGATHER(
ch_cleaned_fastq
)
ch_versions = ch_versions.mix(WIPERTOOLS_FASTQGATHER.out.versions.first())

// group wiping reports
ch_gathered_report = Channel.empty()
Expand All @@ -64,18 +69,12 @@ workflow FASTQ_REPAIR_WIPERTOOLS {
WIPERTOOLS_REPORTGATHER(
ch_gathered_report
)
ch_versions = ch_versions.mix(WIPERTOOLS_REPORTGATHER.out.versions.first())

WIPERTOOLS_REPORTGATHER.out.gathered_report
| map { meta, report -> [['id':meta.sample_id, 'single_end':meta.single_end], report]}
| set { ch_final_reports }

// gather versions
ch_versions = Channel.empty()
ch_versions = ch_versions.mix(
WIPERTOOLS_FASTQSCATTER.out.versions.first(),
WIPERTOOLS_FASTQWIPER.out.versions.first(),
WIPERTOOLS_FASTQGATHER.out.versions.first(),
WIPERTOOLS_REPORTGATHER.out.versions.first()
)

emit:
wiped_fastq = WIPERTOOLS_FASTQGATHER.out.gathered_fastq // channel: [ val(meta), [ .fastq|.fastq.gz ] ]
Expand Down
20 changes: 6 additions & 14 deletions workflows/fastqrepair.nf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ workflow FASTQREPAIR {
// Recover corrupted gz files
//
GZRT (ch_fastq_ext.gz_files)
ch_versions = ch_versions.mix(GZRT.out.versions.first())

// Join recovered gz files with non-gz files and filter empty files out
ch_tobewiped_fastq = Channel.empty()
Expand All @@ -54,8 +55,7 @@ workflow FASTQREPAIR {
// If all input files are empty, then skip the rest of the pipeline
ch_tobewiped_fastq
| ifEmpty {
error "No non-empty FASTQ files found after GZRT. Skipping the rest of the pipeline."
// log.warn "No non-empty FASTQ files found. Skipping the rest of the pipeline."
log.warn "No non-empty FASTQ files found after GZRT. Skipping the rest of the pipeline for ${meta.id}"
}

// If ch_tobewiped_fastq has a size < ch_samplesheet but > zero, then some files were empty and we need to log.warn them
Expand All @@ -69,13 +69,14 @@ workflow FASTQREPAIR {
.set { subset_ids }

all_ids.minus(subset_ids).subscribe{ id_list -> if (id_list.size > 0) log.warn "FASTQ files with the following meta.ids are empty: ${id_list.join(', ')}" }
//

//
// Make fastq compliant and wipe bad characters
//
ch_repaired_fastq = Channel.empty()
FASTQ_REPAIR_WIPERTOOLS (ch_tobewiped_fastq)
ch_versions = ch_versions.mix(FASTQ_REPAIR_WIPERTOOLS.out.versions.first())

FASTQ_REPAIR_WIPERTOOLS.out.wiped_fastq
| map { meta, fq -> [meta.subMap('sample_id', 'single_end'), fq]}
| map { meta, fq -> [['id':meta.sample_id, 'single_end':meta.single_end], fq]}
Expand All @@ -89,14 +90,13 @@ workflow FASTQREPAIR {
ch_repaired_fastq.paired_end
| groupTuple
| set { ch_repaired_fastq_paired_end }
//

//
// Settle reads pairing (re-pair, optional)
//
if (!params.skip_bbmap_repair) {
// Re-pair reads
BBMAP_REPAIR (ch_repaired_fastq_paired_end, false)
ch_versions = ch_versions.mix(BBMAP_REPAIR.out.versions.first())

ch_repaired_fastq_paired_end_singleton = Channel.empty()
BBMAP_REPAIR.out.repaired
Expand All @@ -106,7 +106,6 @@ workflow FASTQREPAIR {
| set { ch_repaired_fastq_paired_end_singleton }

ch_final = ch_repaired_fastq_paired_end_singleton.concat(ch_repaired_fastq.single_end)
ch_versions = ch_versions.mix(BBMAP_REPAIR.out.versions.first())
} else {
ch_final = ch_repaired_fastq_paired_end.concat(ch_repaired_fastq.single_end)
}
Expand All @@ -115,15 +114,8 @@ workflow FASTQREPAIR {
// Assess QC of all fastq files (both single and paired end)
//
FASTQC ( ch_final )
ch_versions = ch_versions.mix(FASTQC.out.versions.first())

//
// Collate and save software versions
//
ch_versions = ch_versions.mix(
GZRT.out.versions.first(),
FASTQ_REPAIR_WIPERTOOLS.out.versions,
FASTQC.out.versions.first()
)

softwareVersionsToYAML(ch_versions)
.collectFile(
Expand Down

0 comments on commit 47b011e

Please sign in to comment.