Skip to content

Commit 5fce884

Browse files
committed
rename input_folder -> input
1 parent b0ca702 commit 5fce884

6 files changed

Lines changed: 51 additions & 47 deletions

File tree

FastOMA.nf

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ include { validateParameters; paramsHelp; paramsSummaryLog } from 'plugin/nf-sch
33

44

55
//Set dynamic defaults for input/output paths before validation
6-
params.input_folder = params.input_folder ?: "${projectDir}/testdata/in_folder"
7-
params.proteome_folder = params.proteome_folder ?: "${params.input_folder}/proteome"
8-
params.hogmap_in = params.hogmap_in ?: "${params.input_folder}/hogmap_in"
9-
params.splice_folder = params.splice_folder ?: "${params.input_folder}/splice"
10-
params.species_tree = params.species_tree ?: "${params.input_folder}/species_tree.nwk"
6+
params.input = params.input ?: "${projectDir}/testdata/in_folder"
7+
params.proteome_folder = params.proteome_folder ?: "${params.input}/proteome"
8+
params.hogmap_in = params.hogmap_in ?: "${params.input}/hogmap_in"
9+
params.splice_folder = params.splice_folder ?: "${params.input}/splice"
10+
params.species_tree = params.species_tree ?: "${params.input}/species_tree.nwk"
1111

1212
// Utility process to fetch remote datasets
1313
process fetchRemoteData {
@@ -379,10 +379,10 @@ workflow {
379379
log.info paramsSummaryLog(workflow)
380380

381381
// Detect input type
382-
def inputType = detectInputType(params.input_folder)
383-
log.info "Detected input type '${inputType}' for: ${params.input_folder}"
382+
def inputType = detectInputType(params.input)
383+
log.info "Detected input type '${inputType}' for: ${params.input}"
384384
if (inputType == "directory") {
385-
log.info "Using local input folder: ${params.input_folder}"
385+
log.info "Using local input folder: ${params.input}"
386386
// Local/custom dataset - allow parameter overrides
387387
proteome_folder = Channel.value(params.proteome_folder)
388388
proteomes = Channel.fromPath("${params.proteome_folder}/*.{fa,fasta}", checkIfExists: true)
@@ -393,24 +393,24 @@ workflow {
393393
// Input is either a URL or an archive file - fetch and extract
394394
// Fetch test dataset from remote URL
395395
if (inputType == "url") {
396-
log.info "Fetching test dataset from URL: ${params.input_folder}"
397-
input_folder_path = fetchRemoteData(Channel.value(params.input_folder))
396+
log.info "Fetching test dataset from URL: ${params.input}"
397+
input_path = fetchRemoteData(Channel.value(params.input))
398398
} else if (inputType == "archive") {
399-
log.info "Extracting test dataset from local archive: ${params.input_folder}"
399+
log.info "Extracting test dataset from local archive: ${params.input}"
400400

401-
input_folder_path = extractLocalArchive(Channel.fromPath(params.input_folder))
401+
input_path = extractLocalArchive(Channel.fromPath(params.input))
402402
}
403403

404404
// Set up all channels based on the downloaded folder structure
405-
proteome_folder = input_folder_path.map { "${it}/proteome" }
406-
proteomes = input_folder_path.flatMap { dir ->
405+
proteome_folder = input_path.map { "${it}/proteome" }
406+
proteomes = input_path.flatMap { dir ->
407407
file("${dir}/proteome").listFiles().findAll {
408408
it.name.endsWith('.fa') || it.name.endsWith('.fasta') || it.name.endsWith('.faa')
409409
}
410410
}
411-
species_tree = input_folder_path.map { "${it}/species_tree.nwk" }
412-
splice_folder = input_folder_path.map { "${it}/splice" }
413-
hogmap_in = input_folder_path.map { "${it}/hogmap_in" }
411+
species_tree = input_path.map { "${it}/species_tree.nwk" }
412+
splice_folder = input_path.map { "${it}/splice" }
413+
hogmap_in = input_path.map { "${it}/hogmap_in" }
414414
}
415415

416416
// Static channels

FastOMA/fastoma_notebook_stat.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
},
9090
"source": [
9191
"output_folder = \"Output\"\n",
92-
"input_folder = \"testdata/in_folder\"\n",
93-
"proteome_folder = input_folder + \"/proteome\"\n",
92+
"input = \"testdata/in_folder\"\n",
93+
"proteome_folder = input + \"/proteome\"\n",
9494
"min_sequence_length = 50"
9595
],
9696
"outputs": [],

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ any installation steps given the system supports running either docker container
5858
installed.
5959

6060
```bash
61-
nextflow run dessimozlab/FastOMA -profile docker --input_folder /path/to/in_folder --output_folder /path/to/out_folder
61+
nextflow run dessimozlab/FastOMA -profile docker --input /path/to/in_folder --output_folder /path/to/out_folder
6262
```
6363
You could also add specific version to be used by adding `-r v0.4.0` to the command line. Without any `-r` argument,
6464
always the latest available release will be used. With `-r dev` the latest development release can be used.
@@ -85,7 +85,7 @@ git checkout version, you can specify this in the following way:
8585
```bash
8686
nextflow run FastOMA.nf -profile docker \
8787
--container_version "sha-$(git rev-list --max-count=1 --abbrev-commit HEAD)" \
88-
--input_folder testdata/in_folder \
88+
--input testdata/in_folder \
8989
--output_folder myresult/
9090
```
9191

@@ -126,7 +126,7 @@ nextflow run FastOMA.nf -profile docker --container_version "sha-$(git rev-list
126126

127127
- run pipeline including with some testdata (For more details, see the section [How to run FastOMA on the test data](https://github.com/DessimozLab/fastoma?tab=readme-ov-file#how-to-run-fastoma-on-the-test-data) )
128128
```bash
129-
nextflow run FastOMA.nf -profile standard --input_folder testdata/in_folder --output_folder output -with-report
129+
nextflow run FastOMA.nf -profile standard --input testdata/in_folder --output_folder output -with-report
130130
```
131131

132132

@@ -172,7 +172,7 @@ mamba activate FastOMA
172172
Afterwards, you can run the workflow using nextflow (which is installed as part of the conda environment)
173173

174174
```
175-
nextflow run FastOMA.nf -profile standard|slurm --input_folder /path/to/input_folder --output_folder /path/to/output
175+
nextflow run FastOMA.nf -profile standard|slurm --input /path/to/input --output_folder /path/to/output
176176
```
177177
Note that you should use either the profile `standard` or `slurm` such the nextflow executor will use the activated environment.
178178

@@ -191,7 +191,7 @@ One can select the desired container via the `--container_version` argument
191191
```
192192
nextflow run FastOMA.nf -profile docker \
193193
--container_version "sha-$(git rev-list --max-count=1 --abbrev-commit HEAD)" \
194-
--input_folder testdata/in_folder \
194+
--input testdata/in_folder \
195195
--output_folder myresult/
196196
```
197197
This will use the container that is tagged with the current commit id. Similarly, one could also use
@@ -251,7 +251,7 @@ Finally, run the package using nextflow as below:
251251
```
252252
# cd FastOMA/testdata
253253
nextflow run ../FastOMA.nf \
254-
--input_folder in_folder \
254+
--input in_folder \
255255
--omamer_db in_folder/omamerdb.h5 \
256256
--output_folder out_folder \
257257
--report \
@@ -421,7 +421,7 @@ For running on a SLURM cluster, you can add the slurm profile argument: `-profi
421421
# ls ../FastOMA.nf
422422
423423
nextflow ../FastOMA.nf -profile slurm \
424-
--input_folder in_folder \
424+
--input in_folder \
425425
--output_folder out_folder
426426
```
427427

conf/test.config

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ process {
99

1010
params {
1111
omamer_db = "${projectDir}/testdata/test.h5"
12-
input_folder = "${projectDir}/testdata/in_folder"
12+
input = "${projectDir}/testdata/in_folder"
1313
report = true
1414

1515
// derived parameters
16-
proteome_folder = "${params.input_folder}/proteome"
17-
hogmap_in = "${params.input_folder}/hogmap_in"
18-
splice_folder = "${params.input_folder}/splice"
19-
species_tree = "${params.input_folder}/species_tree.nwk"
16+
proteome_folder = "${params.input}/proteome"
17+
hogmap_in = "${params.input}/hogmap_in"
18+
splice_folder = "${params.input}/splice"
19+
species_tree = "${params.input}/species_tree.nwk"
2020
}

nextflow.config

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ manifest {
3030
params {
3131
// default parameters for test run
3232
// these can be overridden by the user on the command line
33-
input_folder = null
33+
input = null
3434
// input sub-folders, can also be somewhere else
35-
proteome_folder = "${params.input_folder}/proteome"
36-
hogmap_in = "${params.input_folder}/hogmap_in"
37-
splice_folder = "${params.input_folder}/splice"
38-
species_tree = "${params.input_folder}/species_tree.nwk"
39-
40-
// test/example dataset from remote urls
41-
test_data_url = null
35+
proteome_folder = "${params.input}/proteome"
36+
hogmap_in = "${params.input}/hogmap_in"
37+
splice_folder = "${params.input}/splice"
38+
species_tree = "${params.input}/species_tree.nwk"
39+
// cache path for (remote) archive input files
4240
test_data_cache = null
4341

4442
// main output folder

nextflow_schema.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,24 @@
99
"title": "Input options",
1010
"type": "object",
1111
"description": "Define where the pipeline should find input data ",
12-
"required": ["input_folder", "species_tree"],
12+
"required": ["input", "species_tree"],
1313
"properties": {
14-
"input_folder": {
14+
"input": {
1515
"type": "string",
16-
"description": "Path to input directory containing proteomes and species tree",
17-
"fa_icon": "fas fa-folder-open"
16+
"description": "Input data source: local directory, archive file, or remote URL",
17+
"help": "Can be: (1) Path to a local directory containing proteome/ subfolder and species_tree.nwk file, (2) Path to a local archive file (.tar.gz, .tgz, .zip), or (3) HTTP/HTTPS URL to download an archive. Archives will be automatically extracted and cached.",
18+
"fa_icon": "fas fa-folder-open",
19+
"examples": [
20+
"/path/to/dataset/",
21+
"/path/to/dataset.tar.gz",
22+
"https://zenodo.org/records/12345/files/dataset.tar.gz"
23+
]
1824
},
1925
"proteome_folder": {
2026
"type": "string",
2127
"format": "directory-path",
2228
"description": "Path to input directory containing the proteome files in fasta format",
23-
"help": "If not provided, the proteomes are asumed to be in the input_folder/proteomes directory.",
29+
"help": "Override the default proteome folder location. Only used when input is a local directory. If not specified, defaults to input/proteome/.",
2430
"fa_icon": "fas fa-folder-open"
2531
},
2632
"hogmap_in": {
@@ -33,17 +39,17 @@
3339
"species_tree": {
3440
"type": "string",
3541
"format": "file-path",
36-
"description": "Path to species tree file",
42+
"description": "Path to species tree file in Newick format",
3743
"fa_icon": "fas fa-tree",
3844
"pattern": "^\\S+\\.(nhx|nh|nwk)",
39-
"help": "The species tree should be in Newick or NHX format. By default, the pipeline looks for a file named species_tree.nwk in the input_folder."
45+
"help": "Override the default species tree location. Only used when input is a local directory. If not specified, defaults to input/species_tree.nwk."
4046
},
4147
"splice_folder": {
4248
"type": "string",
4349
"format": "directory-path",
4450
"description": "Path to input directory containing the splice files",
4551
"fa_icon": "fas fa-folder-open",
46-
"help": "If provided, FastOMA will use the splice files to identify and handle alternative splicing isoforms in the proteomes and select the best representative isoform for each gene."
52+
"help": "If provided, FastOMA will use splice variant information to select representative isoforms for each gene. Only used when input is a local directory."
4753
},
4854
"omamer_db": {
4955
"type": "string",

0 commit comments

Comments
 (0)