Skip to content
Merged
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
15 changes: 0 additions & 15 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,3 @@ export_plots: true
disable_version_detection: true

log_filesize_limit: 5000000000 # 5GB

sp:
xenium/cell_feature_matrix:
fn: "*/cell_feature_matrix.h5"
xenium/cells:
fn: "*/cells.parquet"
xenium/experiment:
fn: "*/experiment.xenium"
num_lines: 50
xenium/metrics:
contents: num_cells_detected
fn: "*/metrics_summary.csv"
num_lines: 5
xenium/transcripts:
fn: "*/transcripts.parquet"
40 changes: 20 additions & 20 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
process {

// nf-core: Check the defaults for all processes
cpus = { 1 * task.attempt }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
cpus = { 1 * task.attempt }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }

errorStrategy = { task.exitStatus in ((130..145) + 104 + 175) ? 'retry' : 'finish' }
maxRetries = 1
Expand All @@ -26,36 +26,36 @@ process {
// adding in your local modules too.
// nf-core: Customise requirements for specific processes.
// See https://www.nextflow.io/docs/latest/config.html#config-process-selectors
withLabel:process_single {
cpus = { 1 }
withLabel: process_single {
cpus = { 1 }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_low {
cpus = { 2 * task.attempt }
withLabel: process_low {
cpus = { 2 * task.attempt }
memory = { 12.GB * task.attempt }
time = { 4.h * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_medium {
cpus = { 6 * task.attempt }
withLabel: process_medium {
cpus = { 6 * task.attempt }
memory = { 36.GB * task.attempt }
time = { 8.h * task.attempt }
time = { 8.h * task.attempt }
}
withLabel:process_high {
cpus = { 12 * task.attempt }
withLabel: process_high {
cpus = { 12 * task.attempt }
memory = { 72.GB * task.attempt }
time = { 16.h * task.attempt }
time = { 16.h * task.attempt }
}
withLabel:process_long {
time = { 20.h * task.attempt }
withLabel: process_long {
time = { 20.h * task.attempt }
}
withLabel:process_high_memory {
withLabel: process_high_memory {
memory = { 200.GB * task.attempt }
}
withLabel:error_ignore {
withLabel: error_ignore {
errorStrategy = 'ignore'
}
withLabel:error_retry {
withLabel: error_retry {
errorStrategy = 'retry'
maxRetries = 2
}
Expand Down
24 changes: 11 additions & 13 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,36 @@ process {
publishDir = [
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]

withName: 'MULTIQC' {
ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' }
withName: MULTIQC {
ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' }
publishDir = [
path: { "${params.outdir}/multiqc" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
}

withName: XENIUMRANGER_RESEGMENT {
publishDir = [
path: "${params.outdir}/xeniumranger/resegment",
mode: params.publish_dir_mode
mode: params.publish_dir_mode,
]
ext.prefix = {"${meta.id}"}
}

withName: XENIUMRANGER_IMPORT_SEGMENTATION {
publishDir = [
path: "${params.outdir}/xeniumranger/import_segementation",
mode: params.publish_dir_mode
mode: params.publish_dir_mode,
]
ext.prefix = {"${meta.id}"}
}

withName: FICTURE_PREPROCESS {
publishDir = [
path: "${params.outdir}/ficture/preprocess",
mode: params.publish_dir_mode
mode: params.publish_dir_mode,
]
}

Expand Down Expand Up @@ -90,7 +88,7 @@ process {
path: { "${params.outdir}/segger/train" },
mode: params.publish_dir_mode,
]
ext.args = { "--init_emb 8 --hidden_channels 32 --num_tx_tokens 500 --out_channels 8 --heads 2 --num_mid_layers 2 --strategy auto --precision 16-mixed" }
ext.args = { "--init_emb 8 --hidden_channels 32 --num_tx_tokens 500 --out_channels 8 --heads 2 --num_mid_layers 2 --strategy auto --precision 16-mixed" }
}

withName: SEGGER_PREDICT {
Expand Down Expand Up @@ -133,7 +131,7 @@ process {
path: { "${params.outdir}/cellpose" },
mode: params.publish_dir_mode,
]
ext.args = { "--diameter 9 --channel_axis 0 --save_flows" }
ext.args = { "--diameter 9 --channel_axis 0 --save_flows" }
}

// with new version of cellpose you can do --output_name cell_masks
Expand All @@ -142,7 +140,7 @@ process {
path: { "${params.outdir}/cellpose_cells" },
mode: params.publish_dir_mode,
]
ext.args = { "--diameter 9 --channel_axis 0 --save_flows" }
ext.args = { "--diameter 9 --channel_axis 0 --save_flows" }
}

// with new version of cellpose you can do --output_name nucleus_masks
Expand All @@ -151,7 +149,7 @@ process {
path: { "${params.outdir}/cellpose_nuclei" },
mode: params.publish_dir_mode,
]
ext.args = { "--diameter 9 --channel_axis 0 --save_flows" }
ext.args = { "--diameter 9 --channel_axis 0 --save_flows" }
}

withName: OPT_FLIP {
Expand Down
2 changes: 1 addition & 1 deletion conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ params {
// Input data
input = "${projectDir}/assets/samplesheet.csv"
outdir = 'results'
mode = 'image'
mode = 'coordinate'
}
12 changes: 6 additions & 6 deletions modules/local/baysor/create_dataset/main.nf
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
process BAYSOR_CREATE_DATASET {
tag "$meta.id"
tag "${meta.id}"
label 'process_medium'

container "khersameesh24/baysor:0.7.1"

input:
tuple val(meta), path(transcripts)
val(sample_fraction)
val sample_fraction

output:
tuple val(meta), path("${prefix}/sampled_transcripts.csv"), emit: sampled_transcripts
path("versions.yml") , emit: versions
path ("versions.yml"), emit: versions

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

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_CREATE_DATASET module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_CREATE_DATASET module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

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

template 'create_dataset.py'
template('create_dataset.py')

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_CREATE_DATASET module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_CREATE_DATASET module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
23 changes: 11 additions & 12 deletions modules/local/baysor/preprocess/main.nf
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
process BAYSOR_PREPROCESS_TRANSCRIPTS {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

container "ghcr.io/scverse/spatialdata:spatialdata0.3.0_spatialdata-io0.1.7_spatialdata-plot0.2.9"

input:
tuple val(meta), path(transcripts)
val(min_qv)
val(max_x)
val(min_x)
val(max_y)
val(min_y)
val min_qv
val max_x
val min_x
val max_y
val min_y

output:
tuple val(meta),
path("${prefix}/filtered_transcripts.parquet"), emit: transcripts_parquet
path("versions.yml") , emit: versions
tuple val(meta), path("${prefix}/filtered_transcripts.parquet"), emit: transcripts_parquet
path ("versions.yml"), emit: versions

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

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_PREPROCESS_TRANSCRIPTS module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_PREPROCESS_TRANSCRIPTS module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

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

template 'preprocess_transcripts.py'
template('preprocess_transcripts.py')

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_PREPROCESS_TRANSCRIPTS module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_PREPROCESS_TRANSCRIPTS module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
10 changes: 5 additions & 5 deletions modules/local/baysor/preview/main.nf
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
process BAYSOR_PREVIEW {
tag "$meta.id"
tag "${meta.id}"
label 'process_high'

container "khersameesh24/baysor:0.7.1"

input:
tuple val(meta), path(transcripts)
path(config)
path config

output:
tuple val(meta), path("${prefix}/preview.html"), emit: preview_html
path("versions.yml") , emit: versions
path ("versions.yml"), emit: versions

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

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_PREVIEW module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_PREVIEW module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

def args = task.ext.args ?: ''
Expand All @@ -43,7 +43,7 @@ process BAYSOR_PREVIEW {
stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_PREVIEW module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_PREVIEW module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
20 changes: 7 additions & 13 deletions modules/local/baysor/run/main.nf
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
process BAYSOR_RUN {
tag "$meta.id"
tag "${meta.id}"
label 'process_high'

container "khersameesh24/baysor:0.7.1"

input:
tuple val(meta),
path(transcripts),
path(prior_segmentation),
path(config),
val(scale)
tuple val(meta), path(transcripts), path(prior_segmentation), path(config), val(scale)

output:
tuple val(meta),
path("${prefix}/segmentation.csv"),
path("${prefix}/segmentation_polygons_2d.json"), emit: segmentation
path("versions.yml") , emit: versions
tuple val(meta), path("${prefix}/segmentation.csv"), path("${prefix}/segmentation_polygons_2d.json"), emit: segmentation
path ("versions.yml"), emit: versions

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

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_RUN module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_RUN module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

def args = task.ext.args ?: ''
def prior_seg = "${prior_segmentation}" ? "${prior_segmentation}" : ""
def scaling_factor = scale ? "--scale=${scale}": ""
def scaling_factor = scale ? "--scale=${scale}" : ""
prefix = task.ext.prefix ?: "${meta.id}"

"""
Expand All @@ -53,7 +47,7 @@ process BAYSOR_RUN {
stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_RUN module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_RUN module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
10 changes: 5 additions & 5 deletions modules/local/baysor/segfree/main.nf
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
process BAYSOR_SEGFREE {
tag "$meta.id"
tag "${meta.id}"
label 'process_high'

container "khersameesh24/baysor:0.7.1"

input:
tuple val(meta), path(transcripts)
path(config)
path config

output:
tuple val(meta), path("${prefix}/ncvs.loom"), emit: ncvs
path("versions.yml") , emit: versions
path ("versions.yml"), emit: versions

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

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_SEGFREE module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_SEGFREE module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

def args = task.ext.args ?: ''
Expand All @@ -42,7 +42,7 @@ process BAYSOR_SEGFREE {
stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BAYSOR_SEGFREE module does not support Conda. Please use Docker / Singularity / Podman instead."
error("BAYSOR_SEGFREE module does not support Conda. Please use Docker / Singularity / Podman instead.")
}

prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
Loading
Loading