Skip to content

Commit 8b8eae9

Browse files
authored
Merge pull request #4 from sanger-tol/rearrange
clean params
2 parents fe80dc2 + 7004305 commit 8b8eae9

13 files changed

Lines changed: 77 additions & 43 deletions

File tree

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool
2222
## Pipeline Summary
2323

2424
1. Input validation and parameter checks
25-
2. Align protein sequences to genome using Miniprot
26-
3. Filter alignments based on scaffold length
27-
4. Sort FASTA file based on filtered alignments
28-
5. Generate pipeline reports and logs
25+
2. Index reference genome using Miniprot
26+
3. Align protein sequences to genome using Miniprot
27+
4. Filter alignments based on quality thresholds (identity ≥70%, score ≥60)
28+
5. Sort FASTA file based on filtered alignments to prioritize microchromosomes
29+
6. Generate final reordered assembly and pipeline reports
2930

3031
## Quick Start
3132

@@ -44,7 +45,11 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool
4445
4. Start running your own analysis!
4546

4647
```bash
47-
nextflow run main.nf --input genome.fa --outdir <OUTDIR>
48+
nextflow run main.nf \
49+
--input genome.fa \
50+
--pep_file proteins.fa \
51+
--output_prefix my_analysis \
52+
--outdir <OUTDIR>
4853
```
4954

5055
## Documentation

conf/test.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ params {
2424

2525
// Input data
2626
input = params.pipelines_testdata_base_path + 'viralrecon/genome/NC_045512.2/GCF_009858895.2_ASM985889v3_genomic.200409.fna.gz'
27+
output_prefix = "test"
2728
}

conf/test_full.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
params {
1414
config_profile_name = 'Full test profile'
1515
config_profile_description = 'Full test dataset to check pipeline function'
16-
17-
// Fasta references
1816
input = 'https://tolit.cog.sanger.ac.uk/test-data/Aythya_fuligula/assembly/bAytFul3.fa.gz'
17+
output_prefix = 'bAytFul3'
1918
}

docs/usage.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
> _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._
66
7-
**nfmicrofinder** is a bioinformatics pipeline that aids in the curation of bird genome assemblies by identifying putative microchromosome scaffolds and moving them to the start of the genome assembly FASTA file.
7+
**nfmicrofinder** is a bioinformatics pipeline that aids in the curation of bird genome assemblies by identifying putative microchromosome scaffolds using protein alignments and reordering them to the start of the genome assembly FASTA file.
8+
9+
The pipeline uses Miniprot to align a curated set of bird proteins to the genome, filters high-quality alignments, and reorders scaffolds based on the density of protein matches - prioritizing scaffolds with more protein alignments (likely microchromosomes) at the beginning of the assembly.
810

911
The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies.
1012

@@ -29,6 +31,8 @@ nextflow run main.nf \
2931
-profile <docker/singularity/podman/shifter/charliecloud/conda/institute> \
3032
--input genome.fa \
3133
--pep_file proteins.fa \
34+
--output_prefix my_analysis \
35+
--scaffold_length_cutoff 5000000 \
3236
--outdir <OUTDIR>
3337
```
3438

@@ -116,6 +120,30 @@ nextflow run main.nf -profile docker --input bGalGal4.fa
116120

117121
The output directory where the results will be saved.
118122

123+
### `--output_prefix`
124+
125+
Prefix for output files. If not specified, uses the input filename basename.
126+
127+
**Example:**
128+
129+
```bash
130+
--output_prefix bAytFul3 # Creates bAytFul3.MicroFinder.ordered.fa
131+
```
132+
133+
### `--pep_file`
134+
135+
Path to protein FASTA file used for alignment (e.g. UniProt or predicted proteins).
136+
137+
**Default:** MicroFinder protein set v0.1 for bird microchromosome detection
138+
**Supported formats:** .fa, .faa, .fasta (with optional .gz compression)
139+
140+
### `--scaffold_length_cutoff`
141+
142+
Minimum scaffold length to consider for filtering and sorting (in bases).
143+
144+
**Default:** 5000000 (5 Mbp)
145+
**Purpose:** Scaffolds shorter than this may be deprioritized in the final assembly ordering
146+
119147
### `--email`
120148

121149
Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits. If set in your user config file (`~/.nextflow/config`) then you don't need to specify this on the command line for every run.

main.nf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ workflow SANGERTOL_NFMICROFINDER {
3131
reference // channel: path(fasta)
3232
pep_file // channel: val(pep_file_path)
3333
scaffold_length_cutoff // channel: val(cutoff)
34+
output_prefix // channel: val(prefix)
3435

3536
main:
3637

@@ -40,7 +41,8 @@ workflow SANGERTOL_NFMICROFINDER {
4041
NFMICROFINDER (
4142
reference,
4243
pep_file,
43-
scaffold_length_cutoff
44+
scaffold_length_cutoff,
45+
output_prefix
4446
)
4547
}
4648
/*
@@ -63,7 +65,8 @@ workflow {
6365
params.outdir,
6466
params.input,
6567
params.pep_file,
66-
params.scaffold_length_cutoff
68+
params.scaffold_length_cutoff,
69+
params.output_prefix
6770
)
6871

6972
//
@@ -72,7 +75,8 @@ workflow {
7275
SANGERTOL_NFMICROFINDER (
7376
PIPELINE_INITIALISATION.out.fasta,
7477
PIPELINE_INITIALISATION.out.pep_file,
75-
PIPELINE_INITIALISATION.out.scaffold_length_cutoff
78+
PIPELINE_INITIALISATION.out.scaffold_length_cutoff,
79+
PIPELINE_INITIALISATION.out.output_prefix
7680
)
7781
//
7882
// SUBWORKFLOW: Run completion tasks

nextflow.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ params {
1313
input = null
1414
pep_file = 'https://tolit.cog.sanger.ac.uk/test-data/birds_protein/MicroFinder_prot_set.v0.1.fa.gz'
1515
scaffold_length_cutoff = 5000000
16+
output_prefix = null
1617

1718
// Boilerplate options
1819
outdir = null

nextflow_schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@
3939
"help_text": "Scaffolds shorter than this length may be deprioritized or filtered depending on the workflow step.",
4040
"fa_icon": "fas fa-ruler"
4141
},
42+
"output_prefix": {
43+
"type": "string",
44+
"description": "Prefix for output files. If not specified, uses input filename basename.",
45+
"help_text": "This prefix will be used for naming the final output files from the microfinder analysis.",
46+
"fa_icon": "fas fa-tag"
47+
},
4248
"outdir": {
4349
"type": "string",
4450
"format": "directory-path",

ro-crate-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@type": "Dataset",
77
"creativeWorkStatus": "Stable",
88
"datePublished": "2025-08-25T10:19:41+00:00",
9-
"description": "# nf-core/nfmicrofinder\n\n[![GitHub Actions CI Status](https://github.com/nf-core/nfmicrofinder/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/nfmicrofinder/actions/workflows/ci.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/nfmicrofinder/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/nfmicrofinder/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/nfmicrofinder/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.10.5-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![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)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![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/nfmicrofinder)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23nfmicrofinder-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/nfmicrofinder)[![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)\n\n## Introduction\n\n**nf-core/nfmicrofinder** is a bioinformatics pipeline that aids in the curation of bird genome assemblies by identifying putative microchromosome scaffolds and moving them to the start of the genome assembly FASTA file.\n\nThe pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies.\n\n## Pipeline Summary\n\n1. Input validation and parameter checks\n2. Align protein sequences to genome using Miniprot\n3. Filter alignments based on scaffold length\n4. Sort FASTA file based on filtered alignments\n5. Generate pipeline reports and logs\n\n## Quick Start\n\n1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=24.10.5`)\n\n2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(please only use [`Conda`](https://conda.io/miniconda.html) as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_\n\n3. Download the pipeline and test it on a minimal dataset with a single command:\n\n ```bash\n nextflow run main.nf -profile test,docker\n ```\n\n > Note that it is recommend to use the `-profile` parameter to specify the container technology of your choice. See the [nf-core pipeline documentation](https://nf-co.re/usage/running#software-dependencies) for more information.\n\n4. Start running your own analysis!\n\n ```bash\n nextflow run main.nf --input genome.fa --outdir <OUTDIR>\n ```\n\n## Documentation\n\nThe nfmicrofinder pipeline comes with documentation about the pipeline [usage](docs/usage.md) and [output](docs/output.md).\n\n## Credits\n\nnfmicrofinder was originally written by Yumi Sims and Will Eagle ([@weaglesBio](https://github.com/weaglesBio)).\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- Jim Downie ([@prototaxites](https://github.com/prototaxites))\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Citations\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nYou can cite the `nf-core` publication as follows:\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n",
9+
"description": "# nf-core/nfmicrofinder\n\n[![GitHub Actions CI Status](https://github.com/nf-core/nfmicrofinder/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/nfmicrofinder/actions/workflows/ci.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-core/nfmicrofinder/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/nfmicrofinder/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/nfmicrofinder/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.10.5-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![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)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![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/nfmicrofinder)\n\n[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23nfmicrofinder-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/nfmicrofinder)[![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)\n\n## Introduction\n\n**nf-core/nfmicrofinder** is a bioinformatics pipeline that aids in the curation of bird genome assemblies by identifying putative microchromosome scaffolds and moving them to the start of the genome assembly FASTA file.\n\nThe pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies.\n\n## Pipeline Summary\n\n1. Input validation and parameter checks\n2. Index reference genome using Miniprot\n3. Align protein sequences to genome using Miniprot\n4. Filter alignments based on quality thresholds (identity \u226570%, score \u226560)\n5. Sort FASTA file based on filtered alignments to prioritize microchromosomes\n6. Generate final reordered assembly and pipeline reports\n\n## Quick Start\n\n1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=24.10.5`)\n\n2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(please only use [`Conda`](https://conda.io/miniconda.html) as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_\n\n3. Download the pipeline and test it on a minimal dataset with a single command:\n\n ```bash\n nextflow run main.nf -profile test,docker\n ```\n\n > Note that it is recommend to use the `-profile` parameter to specify the container technology of your choice. See the [nf-core pipeline documentation](https://nf-co.re/usage/running#software-dependencies) for more information.\n\n4. Start running your own analysis!\n\n ```bash\n nextflow run main.nf \\\n --input genome.fa \\\n --pep_file proteins.fa \\\n --output_prefix my_analysis \\\n --outdir <OUTDIR>\n ```\n\n## Documentation\n\nThe nfmicrofinder pipeline comes with documentation about the pipeline [usage](docs/usage.md) and [output](docs/output.md).\n\n## Credits\n\nnfmicrofinder was originally written by Yumi Sims and Will Eagle ([@weaglesBio](https://github.com/weaglesBio)).\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- Jim Downie ([@prototaxites](https://github.com/prototaxites))\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Citations\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nYou can cite the `nf-core` publication as follows:\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n",
1010
"hasPart": [
1111
{
1212
"@id": "main.nf"

0 commit comments

Comments
 (0)