Skip to content

Commit 3664460

Browse files
Copilotseandavi
andcommitted
Fix prettier linting issues and code review feedback
- Remove unused METAPHLAN_UNKNOWN_LIST import from workflow - Fix typo: 'fasterqc-dump' -> 'fasterq-dump' - Remove global singularity.enabled to avoid container engine conflicts - Format markdown files with prettier (CODE_OF_CONDUCT, README, REFACTORING_SUMMARY) - Add .prettierignore to exclude Nextflow/Groovy files and pre-existing files Co-authored-by: seandavi <92435+seandavi@users.noreply.github.com>
1 parent 8920032 commit 3664460

File tree

6 files changed

+62
-16
lines changed

6 files changed

+62
-16
lines changed

.prettierignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Ignore Nextflow and Groovy files (no parser available)
2+
*.nf
3+
*.config
4+
5+
# Ignore existing files from before refactoring
6+
docker/cloudbuild.yaml
7+
nextflow_schema.json
8+
unitn_setup.md
9+
10+
# Ignore build artifacts and dependencies
11+
work/
12+
.nextflow*
13+
results/

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool
3838
```
3939

4040
Note that some form of configuration will be needed so that Nextflow knows how to fetch the required software. This is usually done in the form of a config profile (`YOURPROFILE` in the example command above). You can chain multiple config profiles in a comma-separated string.
41-
4241
- The pipeline comes with config profiles called `docker`, `singularity`, `podman`, `shifter`, `charliecloud` and `conda` which instruct the pipeline to use the named tool for software management. For example, `-profile test,docker`.
4342
- Please check [nf-core/configs](https://github.com/nf-core/configs#documentation) to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use `-profile <institute>` in your command. This will enable either `docker` or `singularity` and set the appropriate execution settings for your local compute environment.
4443
- If you are using `singularity`, please use the [`nf-core download`](https://nf-co.re/tools/#downloading-pipelines-for-offline-use) command to download images first, before running the pipeline. Setting the [`NXF_SINGULARITY_CACHEDIR` or `singularity.cacheDir`](https://www.nextflow.io/docs/latest/singularity.html?#singularity-docker-hub) Nextflow options enables you to store and re-use the images from a central location for future pipeline runs.
@@ -65,6 +64,7 @@ The samplesheet should be a tab-separated file with the following columns:
6564
- `NCBI_accession`: SRA accession number(s), separated by semicolons for multiple runs
6665

6766
For local FASTQ files (with `--local_input`):
67+
6868
- `sample_id`: Unique sample identifier
6969
- `file_paths`: Path(s) to FASTQ file(s), separated by semicolons for multiple files
7070

@@ -127,17 +127,21 @@ Multiple profiles can be specified by separating them with a comma.
127127
### Main arguments
128128

129129
#### `--input`
130+
130131
Path to input samplesheet (TSV format). This replaces the older `--metadata_tsv` parameter.
131132

132133
#### `--outdir`
134+
133135
The output directory where the results will be saved. You must use absolute paths to storage on Cloud infrastructure.
134136

135137
#### `--local_input`
138+
136139
Set to `true` to provide local FASTQ file paths instead of downloading from SRA.
137140

138141
Default: `false`
139142

140143
#### `--skip_humann`
144+
141145
Skip HUMAnN functional profiling step.
142146

143147
Default: `false`
@@ -152,26 +156,31 @@ The pipeline will automatically download and cache reference databases in the lo
152156
- Human and mouse reference genomes for KneadData
153157

154158
#### `--store_dir`
159+
155160
Directory to store reference databases.
156161

157162
Default: `'databases'`
158163

159164
#### `--metaphlan_index`
165+
160166
MetaPhlAn database index version.
161167

162168
Default: `'latest'`
163169

164170
#### `--chocophlan`
171+
165172
ChocoPhlAn database version for HUMAnN.
166173

167174
Default: `'full'`
168175

169176
#### `--uniref`
177+
170178
UniRef database version for HUMAnN.
171179

172180
Default: `'uniref90_diamond'`
173181

174182
#### `--organism_database`
183+
175184
Organism reference database for KneadData contamination removal.
176185

177186
Options: `'human_genome'`, `'mouse_C57BL'`
@@ -207,15 +216,19 @@ If you use seandavi/curatedmetagenomicsnextflow for your analysis, please cite t
207216
### Pipeline tools
208217

209218
- [MetaPhlAn](https://github.com/biobakery/MetaPhlAn)
219+
210220
> Blanco-Míguez A, Beghini F, Cumbo F, et al. Extending and improving metagenomic taxonomic profiling with uncharacterized species using MetaPhlAn 4. Nat Biotechnol. 2023;41(11):1633-1644. doi:10.1038/s41587-023-01688-w
211221
212222
- [HUMAnN](https://github.com/biobakery/humann)
223+
213224
> Beghini F, McIver LJ, Blanco-Míguez A, et al. Integrating taxonomic, functional, and strain-level profiling of diverse microbial communities with bioBakery 3. eLife. 2021;10:e65088. doi:10.7554/eLife.65088
214225
215226
- [KneadData](https://github.com/biobakery/kneaddata)
227+
216228
> The KneadData tool is part of the bioBakery suite of tools for metagenomic analysis.
217229
218230
- [Nextflow](https://pubmed.ncbi.nlm.nih.gov/28398311/)
231+
219232
> Di Tommaso P, Chatzou M, Floden EW, et al. Nextflow enables reproducible computational workflows. Nat Biotechnol. 2017;35(4):316-319. doi:10.1038/nbt.3820
220233
221234
- [Docker](https://dl.acm.org/doi/10.5555/2600239.2600241)

REFACTORING_SUMMARY.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The pipeline has been successfully refactored from a monolithic structure to a m
1111
### 1. Directory Structure
1212

1313
**Before:**
14+
1415
```
1516
curatedMetagenomicsNextflow/
1617
├── main.nf (800+ lines)
@@ -20,6 +21,7 @@ curatedMetagenomicsNextflow/
2021
```
2122

2223
**After:**
24+
2325
```
2426
curatedMetagenomicsNextflow/
2527
├── main.nf (73 lines)
@@ -80,49 +82,57 @@ All processes have been extracted into individual modules:
8082
13. **HUMANN** - Functional profiling
8183

8284
Each module includes:
85+
8386
- `main.nf` - Process definition
8487
- `meta.yml` - Module metadata and documentation (for key modules)
8588

8689
### 3. Configuration Improvements
8790

8891
#### conf/base.config
92+
8993
- Defines base process settings
9094
- Implements resource labels (process_single, process_low, process_medium, process_high)
9195
- Includes check_max() function for resource management
9296
- Standard error handling strategies
9397

9498
#### conf/modules.config
99+
95100
- Module-specific configurations
96101
- PublishDir settings per module
97102
- Extension arguments support
98103

99104
#### conf/test.config
105+
100106
- Minimal test dataset configuration
101107
- Resource limits for CI/CD
102108
- Skip computationally expensive steps
103109

104110
### 4. Parameter Standardization
105111

106112
**New nf-core standard parameters:**
113+
107114
- `--input` (replaces `--metadata_tsv`)
108115
- `--outdir` (replaces `--publish_dir`)
109116
- `--publish_dir_mode` (replaces `--publish_mode`)
110117
- `--max_cpus`, `--max_memory`, `--max_time`
111118
- `--help`, `--version`
112119

113120
**Backwards compatibility maintained:**
121+
114122
- `--metadata_tsv` still works (maps to `--input`)
115123
- `--publish_dir` still works (maps to `--outdir`)
116124

117125
### 5. Workflow Structure
118126

119127
**New workflow file:** `workflows/curatedmetagenomicsnextflow.nf`
128+
120129
- Clean separation of concerns
121130
- Reusable helper functions
122131
- Improved readability
123132
- Better maintainability
124133

125134
**Updated main.nf:**
135+
126136
- Minimal entry point
127137
- Parameter validation
128138
- Help message
@@ -131,6 +141,7 @@ Each module includes:
131141
### 6. Documentation
132142

133143
#### README.md
144+
134145
- Comprehensive usage guide
135146
- Installation instructions
136147
- Parameter documentation
@@ -139,33 +150,39 @@ Each module includes:
139150
- Quick start examples
140151

141152
#### CHANGELOG.md
153+
142154
- Version history
143155
- Detailed change log
144156
- Migration guide
145157

146158
#### CITATIONS.md
159+
147160
- All tool citations
148161
- Proper attribution
149162
- DOI links
150163

151164
#### CODE_OF_CONDUCT.md
165+
152166
- Community standards
153167
- Contributor guidelines
154168

155169
#### Module meta.yml files
170+
156171
- Input/output specifications
157172
- Tool descriptions
158173
- Keywords and authors
159174

160175
### 7. CI/CD
161176

162177
#### .github/workflows/ci.yml
178+
163179
- Automated testing
164180
- Multiple Nextflow versions
165181
- Stub run testing
166182
- Profile testing
167183

168184
#### .github/workflows/linting.yml
185+
169186
- Code quality checks
170187
- nf-core lint
171188
- Pre-commit hooks
@@ -175,6 +192,7 @@ Each module includes:
175192
### 8. Container Management
176193

177194
Enhanced container support:
195+
178196
- Docker profile
179197
- Singularity profile
180198
- Podman support
@@ -208,16 +226,19 @@ nextflow run . -profile test,docker --outdir results
208226
For users of the previous version:
209227

210228
### Old Command:
229+
211230
```bash
212231
nextflow run main.nf --metadata_tsv samples.tsv --publish_dir results
213232
```
214233

215234
### New Command (recommended):
235+
216236
```bash
217237
nextflow run seandavi/curatedmetagenomicsnextflow --input samples.tsv --outdir results -profile docker
218238
```
219239

220240
### Backwards Compatible:
241+
221242
```bash
222243
nextflow run seandavi/curatedmetagenomicsnextflow --metadata_tsv samples.tsv --publish_dir results
223244
```
@@ -246,6 +267,7 @@ nextflow run seandavi/curatedmetagenomicsnextflow --metadata_tsv samples.tsv --p
246267
## Validation
247268

248269
The refactored pipeline:
270+
249271
- ✅ Maintains all original functionality
250272
- ✅ Follows nf-core directory structure
251273
- ✅ Uses nf-core parameter conventions
@@ -258,6 +280,7 @@ The refactored pipeline:
258280
## Next Steps
259281

260282
Future enhancements could include:
283+
261284
1. Creating subworkflows for related processes (e.g., METAPHLAN_PROFILE)
262285
2. Adding more module metadata files
263286
3. Implementing input validation schema

nextflow.config

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ weblog {
138138
url = 'https://nf-telemetry-819875667022.us-central1.run.app/nextflow-telemetry/events'
139139
}
140140

141-
// Container configuration - enabled by default with singularity
142-
singularity.enabled = true
143-
singularity.pullTimeout = '2h'
141+
// Container configuration
144142
process.container = 'docker://seandavi/curatedmetagenomics:metaphlan4.1.0'
145143

146144
profiles {

workflows/curatedmetagenomicsnextflow.nf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ include { LOCAL_FASTQC } from '../modules/local/local_fastqc/ma
99
include { KNEADDATA } from '../modules/local/kneaddata/main'
1010
include { INSTALL_METAPHLAN_DB } from '../modules/local/install_metaphlan_db/main'
1111
include { METAPHLAN_UNKNOWN_VIRUSES_LISTS } from '../modules/local/metaphlan_unknown_viruses_lists/main'
12-
include { METAPHLAN_UNKNOWN_LIST } from '../modules/local/metaphlan_unknown_list/main'
1312
include { METAPHLAN_MARKERS } from '../modules/local/metaphlan_markers/main'
1413
include { SAMPLE_TO_MARKERS } from '../modules/local/sample_to_markers/main'
1514
include { CHOCOPHLAN_DB } from '../modules/local/chocophlan_db/main'

0 commit comments

Comments
 (0)