Skip to content

Commit

Permalink
Merge pull request #114 from nf-core/feat/remove-graph-components-rec…
Browse files Browse the repository at this point in the history
…overed

Remove `--save_recovered_components` options for graph outputs
  • Loading branch information
fbdtemme authored Dec 11, 2024
2 parents a2a6c1c + 55927f8 commit 0777f78
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 23 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [[PR #111](https://github.com/nf-core/pixelator/pull/111)] - Template update for nf-core/tools v3.0.2
- [[PR #112](https://github.com/nf-core/pixelator/pull/112)] - Add graph refinement options for pixelator 0.19
- [[PR #113](https://github.com/nf-core/pixelator/pull/113)] - Fix validation issues after nf-core/tools v3.0.2 update
- [[PR #114](https://github.com/nf-core/pixelator/pull/114)] - Remove `--save_recovered_components` options for graph outputs

### Parameters

Expand All @@ -23,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
| `--validationShowHiddenParams` | |
| `--leiden_iterations` | `--graph_max_refinement_recursion_depth` |
| | `--graph_max_edges_to_split` |
| | `--graph_max_edges_to_split` |
| `--save_recovered_components` | |

> [!NOTE]
> Parameter has been **updated** if both old and new parameter information is present.
Expand Down
6 changes: 0 additions & 6 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,6 @@ process {
}

publishDir = [
[
path: { "${params.outdir}/pixelator" },
mode: params.publish_dir_mode,
pattern: 'graph/*.components_recovered.csv',
saveAs: { (params.save_recovered_components || params.save_all) ? it : null }
],
[
path: { "${params.outdir}/pixelator" },
mode: params.publish_dir_mode,
Expand Down
3 changes: 2 additions & 1 deletion conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ params {
input_basedir = params.pipelines_testdata_base_path + 'pixelator/testdata'

multiplet_recovery = true
min_size = 2
min_size = null
max_size = 100000
dynamic_filter = null
compute_polarization = true
use_full_bipartite = true
colocalization_min_region_count = 0
Expand Down
1 change: 1 addition & 0 deletions conf/test_panel_v2.config
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ params {
multiplet_recovery = true
min_size = 2
max_size = 100000
dynamic_filter = null
compute_polarization = true
use_full_bipartite = true
colocalization_min_region_count = 0
Expand Down
4 changes: 1 addition & 3 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ When graphs are computed and identified, their ID names are added back to the ed

The graph command has the option to recover components (technical multiplets) into smaller
components using community detection to find and remove problematic edges
(see `--multiplet_recovery`). These new component IDs are then stored in the "component" column. The information to keep track of the original and
newly recovered components are stored in a file (components_recovered.csv).
This file is not included in the output folder by default, but can be included by passing `--save_recovered_components`.
(see `--multiplet_recovery`). These new component IDs are then stored in the "component" column.

The edge list is intermediate and by default not placed in the output folder with the final files delivered to users.
Set `--save_edgelist` to enable publishing of these file.
Expand Down
1 change: 0 additions & 1 deletion modules/local/pixelator/single-cell/graph/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ process PIXELATOR_GRAPH {

output:
tuple val(meta), path("graph/*.edgelist.parquet") , emit: edgelist
tuple val(meta), path("graph/*.components_recovered.csv"), emit: components_recovered, optional: true
tuple val(meta), path("graph/*.report.json") , emit: report_json
tuple val(meta), path("graph/*.meta.json") , emit: input_params
tuple val(meta), path("graph/*") , emit: all_results
Expand Down
1 change: 0 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ params {
save_demux_processed_reads = false
save_demux_failed_reads = false
save_collapsed_reads = false
save_recovered_components = false
save_edgelist = false
save_annotate_dataset = false
save_raw_component_metrics = false
Expand Down
12 changes: 3 additions & 9 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,6 @@
"default": false,
"description": "Save an intermediate CSV file containing the unfiltered graph edge list.",
"help": "By default, the unfiltered edge list will not be saved to the results directory. Specify this flag (or set to `true` in your config file) to copy these files to the results directory when complete."
},
"save_recovered_components": {
"fa_icon": "fas fa-save",
"type": "boolean",
"default": false,
"description": "Save an intermediate CSV file containing the recovered components after multiplet recovery.",
"help": "By default, the recovered component will not be saved to the results directory. Specify this flag (or set to `true` in your config file) to copy these files to the results directory when complete."
}
}
},
Expand All @@ -283,7 +276,8 @@
"type": "integer"
},
"dynamic_filter": {
"description": " Enable the estimation of dynamic size filters using a log-rank approach both: estimate both min and max size, min: estimate min size (--min-size), max: estimate max size (--max-size)",
"description": "Enable the estimation of dynamic size filters using a log-rank approach.",
"help_text": "Following options are available:\n- both: estimates both minimum and maximum component size\n- min: estimates the minimum component size (or uses {MINIMUM_N_EDGES_CELL_SIZE} edges, whichever is smallest)\n- max: estimates the maximum component size.\n\nNote that this cannot be set at the same time as `--min-size` or `--max-size`.",
"type": "string",
"enum": ["both", "min", "max"],
"default": "min"
Expand Down Expand Up @@ -435,7 +429,7 @@
"type": "boolean",
"default": false,
"description": "Save all intermediate results.",
"help": "This option is equivalent to passing:\n`--save_amplicon_reads --save_qc_passed_reads --save_qc_failed_reads --save_demux_processed_reads --save_demux_failed_reads --save_collapsed_reads --save_edgelist --save_recovered_components --save_annotate_dataset --save_analysis_dataset`"
"help": "This option is equivalent to passing:\n`--save_amplicon_reads --save_qc_passed_reads --save_qc_failed_reads --save_demux_processed_reads --save_demux_failed_reads --save_collapsed_reads --save_edgelist --save_annotate_dataset --save_analysis_dataset`"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/utils_nfcore_pixelator_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ workflow PIPELINE_INITIALISATION {
// Create a set of valid pixelator options to pass to --design
ch_design_options = PIXELATOR_LIST_OPTIONS.out.designs
.splitText()
.map( text -> text.trim())
.map { it.trim() }
.reduce( new HashSet() ) { prev, curr -> prev << curr }

// Create a set of valid pixelator panel keys to pass using --panel
ch_panel_options = PIXELATOR_LIST_OPTIONS.out.panels
.splitText()
.map( text -> text.trim())
.map { it.trim() }
.reduce( new HashSet() ) { prev, curr -> prev << curr }

//
Expand Down

0 comments on commit 0777f78

Please sign in to comment.