Skip to content

Commit 45ee855

Browse files
authored
Merge pull request #1 from mhoban/dev
Getting everything more or less ready to go
2 parents fcf2e97 + 9ee4188 commit 45ee855

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2262
-2576
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ indent_style = space
1010

1111
[*.{md,yml,yaml,html,css,scss,js,r,rmd,R,Rmd}]
1212
indent_size = 2
13+
trim_trailing_whitespace = false
1314

1415
# These files are edited and tested upstream in nf-core/modules
1516
[/modules/nf-core/**]

.nf-core.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
lint:
2-
files_exist:
3-
- conf/igenomes.config
4-
- conf/igenomes_ignored.config
5-
- assets/multiqc_config.yml
6-
- conf/igenomes.config
7-
- conf/igenomes_ignored.config
8-
- assets/multiqc_config.yml
2+
nextflow_config:
3+
- manifest.homePage
94
files_unchanged:
105
- .github/CONTRIBUTING.md
6+
- assets/email_template.html
117
- assets/sendmail_template.txt
128
- .github/CONTRIBUTING.md
139
- assets/sendmail_template.txt
10+
template_strings:
11+
- assets/assesspool_report.Rmd
1412
multiqc_config: false
1513
nf_core_version: 3.3.1
1614
repository_type: pipeline

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# nf-core/assesspool: Changelog
1+
# assessPool: Changelog
22

33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

66
## v1.0.0dev - [date]
77

8-
Initial release of nf-core/assesspool, created with the [nf-core](https://nf-co.re/) template.
8+
Initial release of assessPool, created with the [nf-core](https://nf-co.re/) template.
99

1010
### `Added`
1111

CITATIONS.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,38 @@
1010
1111
## Pipeline tools
1212

13+
- [PoPoolation2](https://sourceforge.net/p/popoolation2/wiki/Tutorial/)
14+
15+
> Kofler, R., Pandey, R. V., & Schlötterer, C. (2011). PoPoolation2: identifying differentiation between populations using sequencing of pooled DNA samples (Pool-Seq). Bioinformatics, 27(24), 3435-3436.
16+
17+
- [poolfstat](https://doi.org/10.1111/1755-0998.13557)
18+
19+
> Gautier, M., Vitalis, R., Flori, L., & Estoup, A. (2022). f‐Statistics estimation and admixture graph construction with Pool‐Seq or allele count data using the R package poolfstat. Molecular Ecology Resources, 22(4), 1394-1416.
20+
21+
- [grenedalf](https://github.com/lczech/grenedalf)
22+
23+
> Czech, L., Spence, J. P., & Expósito-Alonso, M. (2024). grenedalf: population genetic statistics for the next generation of pool sequencing. Bioinformatics, 40(8), btae508.
24+
25+
- [bcftools](https://samtools.github.io/bcftools/bcftools.html)
26+
27+
> Danecek, P., Bonfield, J. K., Liddle, J., Marshall, J., Ohan, V., Pollard, M. O., ... & Li, H. (2021). Twelve years of SAMtools and BCFtools. Gigascience, 10(2), giab008.
28+
29+
- [vcftools](https://vcftools.github.io/)
30+
31+
> Danecek, P., Auton, A., Abecasis, G., Albers, C. A., Banks, E., DePristo, M. A., ... & 1000 Genomes Project Analysis Group. (2011). The variant call format and VCFtools. Bioinformatics, 27(15), 2156-2158.
32+
33+
- [samtools](https://samtools.github.io/)
34+
35+
> Danecek, P., Bonfield, J. K., Liddle, J., Marshall, J., Ohan, V., Pollard, M. O., ... & Li, H. (2021). Twelve years of SAMtools and BCFtools. Gigascience, 10(2), giab008.
36+
37+
- [Rsamtools](https://www.bioconductor.org/packages/release/bioc/html/Rsamtools.html)
38+
39+
> Morgan M, Pagès H, Obenchain V, Hayden N (2024). _Rsamtools: Binary alignment (BAM), FASTA, variant call (BCF), and tabix
40+
file import_. doi:10.18129/B9.bioc.Rsamtools <https://doi.org/10.18129/B9.bioc.Rsamtools>, R package version 2.22.0,
41+
<https://bioconductor.org/packages/Rsamtools>.
42+
43+
44+
1345
## Software packaging/containerisation tools
1446

1547
- [Anaconda](https://anaconda.com)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) The nf-core/assesspool team
3+
Copyright (c) The assessPool team
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 84 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,93 @@
11
<h1>
22
<picture>
3-
<source media="(prefers-color-scheme: dark)" srcset="docs/images/nf-core-assesspool_logo_dark.png">
4-
<img alt="nf-core/assesspool" src="docs/images/nf-core-assesspool_logo_light.png">
3+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/logo.png" >
4+
<img height="150px" alt="assessPool" src="docs/images/logo.png" >
55
</picture>
66
</h1>
77

8-
[![GitHub Actions CI Status](https://github.com/nf-core/assesspool/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/assesspool/actions/workflows/ci.yml)
9-
[![GitHub Actions Linting Status](https://github.com/nf-core/assesspool/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/assesspool/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/assesspool/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)
10-
[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)
11-
12-
[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.04.2-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)
13-
[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.3.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.3.1)
14-
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
15-
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)
16-
[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)
17-
[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/assesspool)
18-
19-
[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23assesspool-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/assesspool)[![Follow on Bluesky](https://img.shields.io/badge/bluesky-%40nf__core-1185fe?labelColor=000000&logo=bluesky)](https://bsky.app/profile/nf-co.re)[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core)
8+
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.24.04.2-brightgreen.svg)](https://www.nextflow.io/)
209

2110
## Introduction
2211

23-
**nf-core/assesspool** is a bioinformatics pipeline that ...
24-
25-
<!-- TODO nf-core:
26-
Complete this sentence with a 2-3 sentence summary of what types of data the pipeline ingests, a brief overview of the
27-
major pipeline sections and the types of output it produces. You're giving an overview to someone new
28-
to nf-core here, in 15-20 seconds. For an example, see https://github.com/nf-core/rnaseq/blob/master/README.md#introduction
29-
-->
12+
**assessPool** is a population genetics analysis pipeline designed for pooled sequencing runs (pool-seq). Starting from raw genomic variants (VCF or sync format), assessPool performs the following operations:
13+
14+
* Filters SNPs based on adjustable criteria with suggestions for pooled data
15+
* Calculates population genetic statistics using [PoPoolation2](https://sourceforge.net/p/popoolation2/wiki/Main/), [poolfstat](https://doi.org/10.1111/1755-0998.13557), and/or [grenedalf](https://github.com/lczech/grenedalf).
16+
* Generates an HTML report including visualizations of population genetic statistics
17+
* Outputs results in tabular format for downstream analyses
18+
19+
Required inputs are a variant description file (sync or VCF) and a reference assembly (FASTA). These can be output from any number of reduced representation data processing pipelines (e.g., [grenepipe](https://github.com/moiexpositoalonsolab/grenepipe), [dDocent](https://ddocent.com/), etc.).
20+
21+
Major pipeline operations:
22+
23+
1. Import, index, and/or compress variant description and reference
24+
1. Perform stepwise filtering to determine effects of individual filter options (count lost loci):
25+
1. Min/max read depth
26+
1. Minor allele count
27+
1. Hardy-Weinberg equilibrium cutoff
28+
1. Missing data
29+
1. Allele length
30+
1. Quality:depth ratio
31+
1. Minimum read quality
32+
1. Variant type
33+
1. Mispaired read likelihood
34+
1. Alternate observations
35+
1. Mapping quality
36+
1. Mapping ratio
37+
1. Overall depth
38+
1. Number of pools with data
39+
1. Read balance
40+
1. Variant thinning
41+
1. Perform cumulative filtering (for VCF input)
42+
1. Generate sync files
43+
1. Unified (all pools)
44+
1. Split pairwise
45+
1. Generate allele frequency table
46+
1. Calculate F<sub>st</sub>
47+
1. PoPoolation2
48+
1. &#123;poolfstat&#125;
49+
1. grenedalf
50+
1. Calculate Fisher's exact test for individual SNPs
51+
1. PoPoolation2
52+
1. assessPool native
53+
1. Join frequency data to F<sub>st</sub> results
54+
1. Extract contigs containing (user-configurable) strongly-differentiated loci
55+
1. Create HTML report
56+
1. Save all output data in tabular format for downstream analysis
3057

3158
<!-- TODO nf-core: Include a figure that guides the user through the major workflow steps. Many nf-core
3259
workflows use the "tube map" design for that. See https://nf-co.re/docs/guidelines/graphic_design/workflow_diagrams#examples for examples. -->
33-
<!-- TODO nf-core: Fill in short bullet-pointed list of the default steps in the pipeline -->
3460

3561
## Usage
3662

3763
> [!NOTE]
3864
> 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.
3965
40-
<!-- TODO nf-core: Describe the minimum required steps to execute the pipeline, e.g. how to prepare samplesheets.
41-
Explain what rows and columns represent. For instance (please edit as appropriate):
42-
43-
First, prepare a samplesheet with your input data that looks as follows:
66+
First, prepare a sample sheet with your input data that looks as follows:
4467

4568
`samplesheet.csv`:
4669

4770
```csv
48-
sample,fastq_1,fastq_2
49-
CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz
71+
project,input,vcf_index,reference,pools,pool_sizes
72+
poolseq_test,data/pools.vcf.gz,data/pools.vcf.gz.tbi,data/ref.fasta,,"35,38,22,52,17,19"
5073
```
5174

52-
Each row represents a fastq file (single-end) or a pair of fastq files (paired end).
75+
Each row represents a complete pool-seq project or experiment. Column descriptions:
5376

54-
-->
77+
`project` (required): A brief unique identifier for this pool-seq project
78+
`input` (required): Variant description file in sync or VCF format (optionally compressed using `bgzip`)
79+
`vcf_index` (optional): TABIX-format index of the input VCF file (generated if not supplied)
80+
`reference` (required): Reference assembly (FASTA)
81+
`pools` (optional): Comma-separated list of pool names (will replace any names in the input file)
82+
`pool_sizes` (required): Number of individuals in each pool. Either a single number for uniform pool sizes or a comma-separated list of sizes for each pool.
5583

56-
Now, you can run the pipeline using:
5784

58-
<!-- TODO nf-core: update the following command to include all required parameters for a minimal example -->
85+
Required columns are `project`, `input`, `reference`, and `pool_sizes`.
86+
87+
Now, you can run the pipeline using:
5988

6089
```bash
61-
nextflow run nf-core/assesspool \
90+
nextflow run tobodev/assesspool \
6291
-profile <docker/singularity/.../institute> \
6392
--input samplesheet.csv \
6493
--outdir <OUTDIR>
@@ -67,41 +96,47 @@ nextflow run nf-core/assesspool \
6796
> [!WARNING]
6897
> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).
6998
70-
For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/assesspool/usage) and the [parameter documentation](https://nf-co.re/assesspool/parameters).
99+
For more details and further functionality, please refer to the [usage documentation](docs/usage.md) and the [parameter documentation](parameters.md).
100+
101+
## Testing the pipeline
102+
assessPool comes with two built-in profiles that allow the user to test the pipeline with a fully-functional input dataset. These profiles (whose descriptions can be found in [conf/test.confg](conf/test.config) and [conf/test_full.config](conf/test_full.config)) will run assessPool with either a full or reduced dataset of SNPs sequenced from wild populations of the coral *Montipora capitata*. Pipeline tests can be run by passing either `test` or `test_full` to the `-profile` option, along with a software/container management subsystem. For example, using singularity:
103+
104+
```
105+
nextflow run tobodev/assesspool \
106+
-profile test,singularity
107+
```
108+
or
109+
```
110+
nextflow run tobodev/assesspool \
111+
-profile test_full,singularity
112+
```
71113

72114
## Pipeline output
73115

74-
To see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/assesspool/results) tab on the nf-core website pipeline page.
116+
Results of an example test run with a full size dataset can be found [here](https://tobodev.github.io/assesspool/).
75117
For more details about the output files and reports, please refer to the
76-
[output documentation](https://nf-co.re/assesspool/output).
118+
[output documentation](docs/output.md).
77119

78120
## Credits
79121

80-
nf-core/assesspool was originally written by Evan B Freel, Emily E Conklin, Mykle L Hoban, Derek W Kraft, Jonathan L Whitney, Ingrid SS Knapp, Zac H Forsman, Robert J Toonen.
122+
assessPool was originally written by Evan B Freel, Emily E Conklin, Mykle L Hoban, Derek W Kraft, Jonathan L Whitney, Ingrid SS Knapp, Zac H Forsman, Robert J Toonen.
81123

82124
We thank the following people for their extensive assistance in the development of this pipeline:
83125

84-
<!-- TODO nf-core: If applicable, make list of people who have also contributed -->
126+
Richard Coleman, &#x02bb;Ale&#x02bb;alani Dudoit, and Cataixa López, who used assessPool during development and helped identify issues and suggest key feature improvements. We would also like to thank Iliana Baums, Tanya Beirne, Dave Carlon, Greg Conception, Matt Craig, Jeff Eble, Scott Godwin, Matt Iacchei, Frederique Kandel, Steve Karl, Jim Maragos, Bob Moffitt, Joe O'Malley, Lawrie Provost, Jennifer Salerno, Derek Skillings, Michael Stat, Ben Wainwright, and Kim Weersing, for their efforts in sample collection.
85127

86128
## Contributions and Support
87129

88130
If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).
89131

90-
For further information or help, don't hesitate to get in touch on the [Slack `#assesspool` channel](https://nfcore.slack.com/channels/assesspool) (you can join with [this invite](https://nf-co.re/join/slack)).
91-
92132
## Citations
93133

94-
<!-- TODO nf-core: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file. -->
95-
<!-- If you use nf-core/assesspool for your analysis, please cite it using the following doi: [10.5281/zenodo.XXXXXX](https://doi.org/10.5281/zenodo.XXXXXX) -->
96-
97-
<!-- TODO nf-core: Add bibliography of tools and data used in your pipeline -->
98-
99-
An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.
134+
A list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.
100135

101-
You can cite the `nf-core` publication as follows:
136+
This pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).
102137

103-
> **The nf-core framework for community-curated bioinformatics pipelines.**
138+
> The nf-core framework for community-curated bioinformatics pipelines.
104139
>
105140
> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
106141
>
107-
> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).
142+
> Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.

assets/adaptivecard.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"size": "Large",
1818
"weight": "Bolder",
1919
"color": "<% if (success) { %>Good<% } else { %>Attention<%} %>",
20-
"text": "nf-core/assesspool v${version} - ${runName}",
20+
"text": "assessPool v${version} - ${runName}",
2121
"wrap": true
2222
},
2323
{

0 commit comments

Comments
 (0)