Skip to content

Commit

Permalink
Merge pull request #90 from PixelgenTechnologies/feature/exe-1732-upd…
Browse files Browse the repository at this point in the history
…ate-to-pixelator-0.17.1

Feature/exe 1732 update to pixelator 0.17.1
  • Loading branch information
johandahlberg authored May 27, 2024
2 parents b8068df + 1e557b2 commit 7a769d9
Show file tree
Hide file tree
Showing 19 changed files with 211 additions and 50 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [[1.2.0](https://github.com/nf-core/pixelator/releases/tag/1.1.0)] - 2024-05-??

### Enhancements & fixes

- [[PR #90](https://github.com/nf-core/pixelator/pull/90)] - Update pixelator to 0.17.1
- [[PR #90](https://github.com/nf-core/pixelator/pull/90)] - Add `pixelator single-cell layout` command
- [[PR #90](https://github.com/nf-core/pixelator/pull/90)] - The `graph` and `annotate` steps are now using `process_high` as their resource tags

### Software dependencies

| Dependency | Old version | New version |
| ----------- | ----------- | ----------- |
| `pixelator` | 0.16.2 | 0.17.1 |

> **NB:** Dependency has been **updated** if both old and new version information is present.
>
> **NB:** Dependency has been **added** if just the new version information is present.
>
> **NB:** Dependency has been **removed** if new version information isn't present.
## [[1.1.0](https://github.com/nf-core/pixelator/releases/tag/1.1.0)] - 2024-03-29

### Enhancements & fixes
Expand Down
14 changes: 12 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,25 @@ process {
params.compute_polarization ? "--compute-polarization" : '',
params.compute_colocalization ? "--compute-colocalization" : '',
params.use_full_bipartite ? "--use-full-bipartite " : '',
params.polarization_normalization ? "--polarization-normalization ${params.polarization_normalization}" : '',
params.polarization_binarization ? "--polarization-binarization" : '',
params.polarization_min_marker_count ? "--polarization-min-marker-count ${params.polarization_min_marker_count}" : '',
params.polarization_transformation ? "--polarization-transformation ${params.polarization_transformation}" : '',
params.colocalization_transformation ? "--colocalization-transformation ${params.colocalization_transformation}" : '',
params.polarization_n_permutations ? "--polarization-n-permutations ${params.polarization_n_permutations}" : '',
(params.colocalization_neighbourhood_size instanceof Integer) ? "--colocalization-neighbourhood-size ${params.colocalization_neighbourhood_size}" : '',
(params.colocalization_n_permutations instanceof Integer) ? "--colocalization-n-permutations ${params.colocalization_n_permutations}" : '',
(params.colocalization_min_region_count instanceof Integer) ? "--colocalization-min-region-count ${params.colocalization_min_region_count}" : '',
].join(' ').trim()
}

withName: PIXELATOR_LAYOUT {
ext.when = { !params.skip_layout }
ext.args = [
params.no_node_marker_counts ? "--no-node-marker-counts" : '',
params.layout_algorithm ? "--layout-algorithm ${params.layout_algorithm} " : '',
].join(' ').trim()
}


withName: PIXELATOR_REPORT {
ext.when = { !params.skip_report }
}
Expand Down
6 changes: 6 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ params {
colocalization_min_region_count = 0
colocalization_n_permutations = 10
colocalization_neighbourhood_size = 1

// For now skip the layout step since it is very slow on these
// small test datasets
skip_layout = true
// using this since the default pmds_3d does not work on very small graphs
layout_algorithm = "fruchterman_reingold_3d"
}
28 changes: 26 additions & 2 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ newly recovered components are stored in a file (components_recovered.csv).
- `pixelator`

- `annotate`
- `<sample-id>.dataset.pxl`
- `<sample-id>.annotated.dataset.pxl`
- `<sample-id>.meta.json`: Command invocation metadata.
- `<sample-id>.rank_vs_size.png`
- `<sample-id>.raw_components_metrics.csv`
Expand All @@ -193,7 +193,7 @@ edgelist to find putative cells, and it will generate a pxl file containing the

- `analysis`

- `<sample-id>.dataset.pxl`: PXL file with the analysis results added to it.
- `<sample-id>.analysis.dataset.pxl`: PXL file with the analysis results added to it.
- `<sample-id>.meta.json`: Command invocation metadata.
- `<sample-id>.report.json`: Statistics for the analysis step.

Expand All @@ -214,6 +214,30 @@ Currently, the following analysis are performed:
Each analysis can be disabled by using respectively `--compute_polarization false` or `--compute_colocalization false`.
This entire step can also be skipped using the `--skip_analysis` option.

### Compute layouts for visualization

<details markdown="1">
<summary>Output files</summary>

- `pixelator`

- `layout`

- `<sample-id>.layout.dataset.pxl`: PXL file with the layout results added to it.
- `<sample-id>.meta.json`: Command invocation metadata.
- `<sample-id>.report.json`: Statistics for the layout step.

- `logs`
- `<sample-id>.pixelator-layout.log`: pixelator log output.

</details>

This step uses the `pixelator single-cell layout` command.
It will generate precomputed layouts that can be used to visualize cells
as part of the downstream analysis.

This entire step can also be skipped using the `--skip_layout` option.

### Generate reports

<details markdown="1">
Expand Down
6 changes: 3 additions & 3 deletions modules/local/pixelator/collect_metadata.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ process PIXELATOR_COLLECT_METADATA {
label 'process_single'
cache false

conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:

Expand Down
6 changes: 3 additions & 3 deletions modules/local/pixelator/list_options.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process PIXELATOR_LIST_OPTIONS {
label 'process_single'


conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

output:
path "design_options.txt" , emit: designs
Expand Down
6 changes: 3 additions & 3 deletions modules/local/pixelator/single-cell/amplicon/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ process PIXELATOR_AMPLICON {
label 'process_low'


conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(reads)
Expand Down
7 changes: 3 additions & 4 deletions modules/local/pixelator/single-cell/analysis/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ process PIXELATOR_ANALYSIS {
tag "$meta.id"
label 'process_medium'


conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(data)
Expand Down
8 changes: 4 additions & 4 deletions modules/local/pixelator/single-cell/annotate/main.nf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
process PIXELATOR_ANNOTATE {
tag "$meta.id"
label 'process_medium'
label 'process_high'


conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(dataset), path(panel_file), val(panel)
Expand Down
6 changes: 3 additions & 3 deletions modules/local/pixelator/single-cell/collapse/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process PIXELATOR_COLLAPSE {
tag "$meta.id"
label 'process_medium'

conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(reads), path(panel_file), val(panel)
Expand Down
6 changes: 3 additions & 3 deletions modules/local/pixelator/single-cell/demux/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ process PIXELATOR_DEMUX {
label 'process_medium'


conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(reads), path(panel_file), val(panel)
Expand Down
8 changes: 4 additions & 4 deletions modules/local/pixelator/single-cell/graph/main.nf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
process PIXELATOR_GRAPH {
tag "$meta.id"
label 'process_medium'
label 'process_high'


conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(edge_list)
Expand Down
47 changes: 47 additions & 0 deletions modules/local/pixelator/single-cell/layout/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
process PIXELATOR_LAYOUT {
tag "$meta.id"
label 'process_medium'


conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(data)

output:
tuple val(meta), path("layout/*dataset.pxl") , emit: dataset
tuple val(meta), path("layout/*report.json") , emit: report_json
tuple val(meta), path("layout/*.meta.json") , emit: metadata
tuple val(meta), path("layout/*") , emit: all_results
tuple val(meta), path("*pixelator-layout.log"), emit: log

path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:

prefix = task.ext.prefix ?: "${meta.id}"
def args = task.ext.args ?: ''

"""
pixelator \\
--cores $task.cpus \\
--log-file ${prefix}.pixelator-layout.log \\
--verbose \\
single-cell \\
layout \\
--output . \\
$args \\
$data
cat <<-END_VERSIONS > versions.yml
"${task.process}":
pixelator: \$(echo \$(pixelator --version 2>/dev/null) | sed 's/pixelator, version //g' )
END_VERSIONS
"""
}
6 changes: 3 additions & 3 deletions modules/local/pixelator/single-cell/qc/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ process PIXELATOR_QC {
label 'process_medium'


conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(reads)
Expand Down
7 changes: 4 additions & 3 deletions modules/local/pixelator/single-cell/report/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ process PIXELATOR_REPORT {
label 'process_low'


conda "bioconda::pixelator=0.16.2"
conda "bioconda::pixelator=0.17.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pixelator:0.16.2--pyhdfd78af_0' :
'biocontainers/pixelator:0.16.2--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/pixelator:0.17.1--pyhdfd78af_0' :
'biocontainers/pixelator:0.17.1--pyhdfd78af_0' }"

input:
tuple val(meta), path(panel_file), val(panel)
Expand All @@ -18,6 +18,7 @@ process PIXELATOR_REPORT {
path graph_data , stageAs: "results/graph/*"
path annotate_data , stageAs: "results/annotate/*"
path analysis_data , stageAs: "results/analysis/*"
path layout_data , stageAs: "results/layout/*"


output:
Expand Down
10 changes: 8 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,22 @@ params {
compute_polarization = true
compute_colocalization = true
use_full_bipartite = false
polarization_normalization = "clr"
polarization_binarization = false
polarization_transformation = "log1p"
polarization_min_marker_count = 5
polarization_n_permutations = 50
colocalization_transformation = "log1p"
colocalization_neighbourhood_size = 1
colocalization_n_permutations = 50
colocalization_min_region_count = 5

// layout options
no_node_marker_counts = false
layout_algorithm = "pmds_3d"

// skip options
skip_report = false
skip_analysis = false
skip_layout = false

// Main pixelator container override
pixelator_container = null
Expand Down
Loading

0 comments on commit 7a769d9

Please sign in to comment.