Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/sanger-cellgeni/ml/xeniumharmonise/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "YOUR-TOOL-HERE"
33 changes: 33 additions & 0 deletions modules/sanger-cellgeni/ml/xeniumharmonise/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

process ML_XENIUMHARMONISE {
tag "$meta"

container '/nfs/cellgeni/singularity/images/palom_tiledb.sif'


input:
tuple val(meta), path(he_image), path(xenium_bundle)

output:
tuple val(meta), path(out_dir), emit: harmonised_output
path "versions.yml" , emit: versions

script:
out_dir = "${meta}_harmonised"

"""
harmonise_xenium.py main\\
--hematoxylin_eosin_image_uri ${he_image} \\
--xenium_bundle_uri ${xenium_bundle} \\
--harmonised_dataset_uri ${out_dir}
echo "v1.0.0" > versions.yml
"""

stub:
out_dir = "${meta}_harmonised"

"""
touch ${out_dir}
touch versions.yml
"""
}
58 changes: 58 additions & 0 deletions modules/sanger-cellgeni/ml/xeniumharmonise/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "ml_xeniumharmonise"

description: A wrapper module for harmonise_xenium.py script
keywords:
- spatial-transcriptomics(xenium)
- ml
- he-image
tools:
- "ml":
description: ""
homepage: ""
documentation: ""
tool_dev_url: ""
doi: ""
licence:
identifier:

## TODO nf-core: Add a description of all of the variables used as input
input:
# Only when we have meta
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`

- he_image:
type: file
description: H&E image file

- xenium_bundle:
type: directory
description: output from xenium


output:
#Only when we have meta
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`

- "output_dir":
type: directory
description: directory for harmonised_xenium outputs.

- versions:
type: file
description: File containing software versions
pattern: "versions.yml"

authors:
- "@dn10-sanger"
maintainers:
- "@dn10-sanger"
10 changes: 10 additions & 0 deletions modules/sanger-cellgeni/ml/xeniumharmonise/modules.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
process {
withName: 'ML_XENIUMHARMONISE' {
queue = 'normal'
group = 'cellgeni'
cpus = 1
clusterOptions = '-M 8G -R "select[mem>8G] rusage[mem=8G]"'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just use the "memory". e.g. "memory = 8.GB"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hardcoded this because when using the 'memory', the nf-test.config and tests/nextflow.config files were possibly overriding the configuration from modules.config, which was causing the test to exit with a memory error.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... but you don't have to use clusteroptions flag, right?
I meant it can be just memory = 8.Gb

publishDir = 'results'
}
}

7 changes: 7 additions & 0 deletions modules/sanger-cellgeni/ml/xeniumharmonise/nf-test.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config {
testsDir "."
workDir ".nf-test"
configFile "tests/nextflow.config"

}

Loading