Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move long read preprocessing into a subworkflow #674

Merged
merged 37 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
08445cf
Added modules porechop/abi and chopper for QC of long reads
Sep 20, 2024
5aa3049
Move long read preprocessing into subworkflow, and swapping porechop …
Sep 20, 2024
451612a
Remove module import from main workflow, and add PORECHOP_ABI in conf…
Sep 20, 2024
59ef702
Exchange local filtlong module to nf-core/filtlong
muabnezor Sep 24, 2024
cd5ce2f
Add filtlong and porechop logs to multiqc
muabnezor Sep 24, 2024
5820fb4
Added --longread_preprocessing_tools parameters, to let user specify …
muabnezor Sep 24, 2024
5335fc5
Merge branch 'dev' into move_lr_qc
muabnezor Sep 25, 2024
1496ce9
Update modules/nf-core/filtlong/main.nf
muabnezor Sep 25, 2024
c11601a
make subworkflow name more verbose
muabnezor Sep 30, 2024
31deb5c
make --longread_adaptertrimming_tool as enum porechop or porechop_abi
muabnezor Sep 30, 2024
b2da50b
Make prefix for porechop/porechop-abi more verbose
muabnezor Sep 30, 2024
8955e31
lint
muabnezor Sep 30, 2024
644e2b1
Change default search pattern for filtlong.log files for the filtlong…
muabnezor Oct 1, 2024
3e15502
Update CHANGELOG.md
muabnezor Oct 3, 2024
ec8538c
Update CHANGELOG.md
muabnezor Oct 3, 2024
c6fb9b3
Update nextflow_schema.json
muabnezor Oct 3, 2024
b24f52f
Update conf/modules.config
muabnezor Oct 3, 2024
fcf509c
Update conf/modules.config
muabnezor Oct 3, 2024
8f9cac6
Update conf/modules.config
muabnezor Oct 3, 2024
10ecdc5
Update nextflow_schema.json
muabnezor Oct 3, 2024
ea6f9a4
Update nextflow.config
muabnezor Oct 3, 2024
b43b9f6
Update subworkflows/local/longread_preprocessing.nf
muabnezor Oct 3, 2024
25981a1
Update subworkflows/local/longread_preprocessing.nf
muabnezor Oct 3, 2024
edf8dab
Update subworkflows/local/longread_preprocessing.nf
muabnezor Oct 3, 2024
0a06944
Merge branch 'dev' into move_lr_qc
muabnezor Oct 3, 2024
669a854
Linting fix
muabnezor Oct 3, 2024
a1098f3
make porechop-abi default long read adapter trimming tool
muabnezor Oct 3, 2024
17ba45c
Fix changelog
muabnezor Oct 4, 2024
f54c967
Fix porechop_abi pattern in modules.config
muabnezor Oct 4, 2024
110b5dd
Merge branch 'dev' into move_lr_qc
muabnezor Oct 4, 2024
3472c87
remove chopper citation for now
muabnezor Oct 4, 2024
ab5f482
retrigger checks
muabnezor Oct 4, 2024
2cfd5e5
Merge branch 'dev' into move_lr_qc
muabnezor Oct 4, 2024
7b31394
Apply suggestions from code review
jfy133 Oct 11, 2024
78edf25
Apply suggestions from code review
jfy133 Oct 11, 2024
3c3b46a
Add previouysly undocumented output files to docs
jfy133 Oct 11, 2024
7c7e954
[automated] Fix code linting
nf-core-bot Oct 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [#665](https://github.com/nf-core/mag/pull/648) - Add support for supplying pre-made bowtie host reference index (requested by @simone-pignotti, added by @jfy133)
- [#670](https://github.com/nf-core/mag/pull/670) - Added --gtdbtk_pplacer_useram to run GTDBTk in memory mode rather than write to disk (reported by @harper357, fixed by @jfy133)
- Added optional use of porechop-abi, instead of porechop, for long read adapter trimming.
muabnezor marked this conversation as resolved.
Show resolved Hide resolved
muabnezor marked this conversation as resolved.
Show resolved Hide resolved

### `Changed`

Expand All @@ -20,6 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#667](https://github.com/nf-core/mag/pull/667) - Fix pipeline crashing if only CONCOCT selected during binning (reported and fixed by @jfy133)
- [#670](https://github.com/nf-core/mag/pull/670) - Re-add missing GTDBTk parameters into GTDBTk module (reported by harper357, fixed by @jfy133)
- [#672](https://github.com/nf-core/mag/pull/673) - Fix GTDB-Tk per-sample TSV files not being published in output directory (reported by @jhayer, fix by @jfy133)
- Make longread preprocessing a subworkflow
- Add porechop and filtlong logs to multiqc
- Change local filtlong module to the official nf-core/filtlong module
muabnezor marked this conversation as resolved.
Show resolved Hide resolved

### `Dependencies`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A table here should be added (copy from previous releases) listing at least the filtlong verison update 0.2.0 -> 0.2.1 and any other tool version updates.

You can also add the versions of the new tools too.


Expand Down
6 changes: 6 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@

> Parks, D. H., Imelfort, M., Skennerton, C. T., Hugenholtz, P., & Tyson, G. W. (2015). CheckM: assessing the quality of microbial genomes recovered from isolates, single cells, and metagenomes. Genome Research, 25(7), 1043–1055. doi: 10.1101/gr.186072.114

- [Chopper](https://github.com/wdecoster/chopper)

> De Coster W, Rademakers R. NanoPack2: population-scale evaluation of long-read sequencing data. Bioinformatics. 2023 May 4;39(5):btad311. doi: 10.1093/bioinformatics/btad311. PMID: 37171891; PMCID: PMC10196664.

- [CONCOCT](https://doi.org/10.1038/nmeth.3103)

> Alneberg, J., Bjarnason, B. S., de Bruijn, I., Schirmer, M., Quick, J., Ijaz, U. Z., Lahti, L., Loman, N. J., Andersson, A. F., & Quince, C. (2014). Binning metagenomic contigs by coverage and composition. Nature Methods, 11(11), 1144–1146. doi: 10.1038/nmeth.3103
Expand Down Expand Up @@ -116,6 +120,8 @@

- [Porechop](https://github.com/rrwick/Porechop)

- [Porechop-abi](https://github.com/bonsai-team/Porechop_ABI)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [Porechop-abi](https://github.com/bonsai-team/Porechop_ABI)
- [Porechop-abi](https://github.com/bonsai-team/Porechop_ABI)
> Bonenfant, Q., Noé, L., & Touzet, H. (2022). Porechop_ABI: discovering unknown adapters in ONT sequencing reads for downstream trimming. In BioRxiv. doi: 10.1101/2022.07.07.499093


- [Prodigal](https://pubmed.ncbi.nlm.nih.gov/20211023/)

> Hyatt D, Chen GL, Locascio PF, Land ML, Larimer FW, Hauser LJ. Prodigal: prokaryotic gene recognition and translation initiation site identification. BMC Bioinformatics. 2010 Mar 8;11:119. doi: 10.1186/1471-2105-11-119. PMID: 20211023; PMCID: PMC2848648.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Other code contributors include:
- [Jim Downie](https://github.com/prototaxites)
- [Phil Palmer](https://github.com/PhilPalmer)
- [@willros](https://github.com/willros)
- [Adam Rosenbaum](https://github.com/muabnezor)

Long read processing was inspired by [caspargross/HybridAssembly](https://github.com/caspargross/HybridAssembly) written by Caspar Gross [@caspargross](https://github.com/caspargross)

Expand Down
6 changes: 6 additions & 0 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ run_modules:
- quast
- kraken
- prokka
- porechop
- filtlong

## Module order
top_modules:
Expand All @@ -35,6 +37,7 @@ top_modules:
- "fastp"
- "adapterRemoval"
- "porechop"
- "filtlong"
- "fastqc":
name: "FastQC: after preprocessing"
info: "After trimming and, if requested, contamination removal."
Expand Down Expand Up @@ -109,6 +112,9 @@ sp:
fn_re: ".*[kraken2|centrifuge].*report.txt"
quast:
fn_re: "report.*.tsv"
filtlong:
num_lines: 20
fn_re: ".*_filtlong.log"
jfy133 marked this conversation as resolved.
Show resolved Hide resolved

## File name cleaning
extra_fn_clean_exts:
Expand Down
32 changes: 24 additions & 8 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,36 @@ process {
publishDir = [
path: { "${params.outdir}/QC_longreads/porechop" },
mode: params.publish_dir_mode,
pattern: "*_trimmed.fastq",
pattern: "*_porechop_trimmed.fastq",
muabnezor marked this conversation as resolved.
Show resolved Hide resolved
enabled: params.save_porechop_reads
]
ext.prefix = { "${meta.id}_run${meta.run}_trimmed" }
ext.prefix = { "${meta.id}_run${meta.run}_porechop_trimmed" }
}

withName: PORECHOP_ABI {
publishDir = [
path: { "${params.outdir}/QC_longreads/porechop" },
mode: params.publish_dir_mode,
pattern: "*_porechop-abi_trimmed.fastq",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be .fastq.gz no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok that was an earlier issue 😅 you identified another bug!

enabled: params.save_porechop_reads
]
ext.prefix = { "${meta.id}_run${meta.run}_porechop-abi_trimmed" }
}

withName: FILTLONG {
ext.args = [
"--min_length ${params.longreads_min_length}",
"--keep_percent ${params.longreads_keep_percent}",
"--trim",
"--length_weight ${params.longreads_length_weight}"
].join(' ').trim()
publishDir = [
path: { "${params.outdir}/QC_longreads/Filtlong" },
mode: params.publish_dir_mode,
pattern: "*_lr_filtlong.fastq.gz",
enabled: params.save_filtlong_reads
]
ext.prefix = { "${meta.id}_run${meta.run}_lengthfiltered" }
path: { "${params.outdir}/QC_longreads/Filtlong" },
mode: params.publish_dir_mode,
pattern: "*_lr_filtlong.fastq.gz",
muabnezor marked this conversation as resolved.
Show resolved Hide resolved
enabled: params.save_filtlong_reads
]
ext.prefix = { "${meta.id}_run${meta.run}_lr_filtlong" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _lr is not necessary here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(even if it was in the old module)

muabnezor marked this conversation as resolved.
Show resolved Hide resolved
}

withName: NANOLYSE {
Expand Down
15 changes: 15 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"chopper": {
"branch": "master",
"git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48",
"installed_by": ["modules"]
},
"concoct/concoct": {
"branch": "master",
"git_sha": "baa30accc6c50ea8a98662417d4f42ed18966353",
Expand Down Expand Up @@ -107,6 +112,11 @@
"git_sha": "285a50500f9e02578d90b3ce6382ea3c30216acd",
"installed_by": ["modules"]
},
"filtlong": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"freebayes": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
Expand Down Expand Up @@ -202,6 +212,11 @@
"git_sha": "3135090b46f308a260fc9d5991d7d2f9c0785309",
"installed_by": ["modules"]
},
"porechop/abi": {
"branch": "master",
"git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48",
"installed_by": ["modules"]
},
"porechop/porechop": {
"branch": "master",
"git_sha": "1d68c7f248d1a480c5959548a9234602b771199e",
Expand Down
33 changes: 0 additions & 33 deletions modules/local/filtlong.nf

This file was deleted.

5 changes: 5 additions & 0 deletions modules/nf-core/chopper/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions modules/nf-core/chopper/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions modules/nf-core/chopper/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions modules/nf-core/chopper/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions modules/nf-core/chopper/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions modules/nf-core/chopper/tests/tags.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions modules/nf-core/filtlong/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading