Skip to content
Merged

Fixes #199

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
f80b261
Register cellposev4 in benchmark run scripts
dariarom94 Jul 19, 2026
1a2fa09
fix anndata version mismatch with txsim
dariarom94 Jul 19, 2026
82add80
add segger to workflow (test)
dariarom94 Jul 19, 2026
53e1728
duplicates when FOV stiching cleaned up
dariarom94 Jul 19, 2026
1186b7a
chunks issue atera
dariarom94 Jul 20, 2026
18644d7
segger update image
dariarom94 Jul 20, 2026
ecb302d
claude fix for segger
dariarom94 Jul 20, 2026
7d66898
Merge branch 'main' into fixes
dariarom94 Jul 20, 2026
d400ebe
atera version fix
dariarom94 Jul 20, 2026
64d7b4e
wf for the custom rnaseq scripts
dariarom94 Jul 20, 2026
3edfbf1
adjust the loader image name
dariarom94 Jul 20, 2026
cbd2f12
adjust the memory
dariarom94 Jul 20, 2026
184260e
troubleshootig edges
dariarom94 Jul 20, 2026
9fa9a33
Merge branch 'main' into fixes
dariarom94 Jul 20, 2026
36631c4
segger update
dariarom94 Jul 21, 2026
0626127
cell type label correction
dariarom94 Jul 21, 2026
3186435
fix boundaries
dariarom94 Jul 21, 2026
d8a7d93
Merge branch 'main' into fixes
dariarom94 Jul 21, 2026
3505718
OOM fixes
dariarom94 Jul 21, 2026
d6e110a
fix code
dariarom94 Jul 21, 2026
4660f26
RCTD
dariarom94 Jul 21, 2026
5abd651
segger to RAPIDS
dariarom94 Jul 21, 2026
fe2e90a
Merge branch 'main' into fixes
dariarom94 Jul 21, 2026
0b23474
fix rctd
dariarom94 Jul 22, 2026
196ff1f
segger debug (torchvision)
dariarom94 Jul 22, 2026
4be7bd4
Merge branch 'main' into fixes
dariarom94 Jul 22, 2026
b8d3d7b
save the xenium version
dariarom94 Jul 22, 2026
202ac49
add atera to datasets
dariarom94 Jul 22, 2026
14be8d0
Add gene efficiency correction as a separate pipeline stage (#183)
dariarom94 Jul 22, 2026
0cf0243
moscot to pca and segger troubleshooting
dariarom94 Jul 22, 2026
d7afb84
added fastreseg
dariarom94 Jul 23, 2026
f87a1d9
segger bug new fix
dariarom94 Jul 23, 2026
123e112
fastreseg to workflow
dariarom94 Jul 23, 2026
7549589
add fastreseg test
dariarom94 Jul 23, 2026
9fa9604
Merge branch 'main' into fixes
dariarom94 Jul 23, 2026
ff04467
optimized fastreseg build
dariarom94 Jul 23, 2026
7ffc514
Merge branch 'main' into fixes
dariarom94 Jul 23, 2026
a7404d8
add s3 paths
dariarom94 Jul 23, 2026
19e5f83
troubleshoot comseg/segger
dariarom94 Jul 24, 2026
aaca151
segger update
dariarom94 Jul 25, 2026
c9bdb91
data loader bug
dariarom94 Jul 25, 2026
1df9834
Merge branch 'main' into fixes
dariarom94 Jul 25, 2026
4467d32
rctd adjustment (raw counts)
dariarom94 Jul 26, 2026
58912e4
fix segger and comseg
dariarom94 Jul 26, 2026
0a5aa99
optimize cosmx
dariarom94 Jul 26, 2026
298e666
Merge branch 'main' into fixes
dariarom94 Jul 26, 2026
c921937
parameter test for cellpose4
dariarom94 Jul 26, 2026
57c2d79
add atera
dariarom94 Jul 26, 2026
cf67e09
add a test in pciseq and dynamic memory for bruker
dariarom94 Jul 27, 2026
9f71692
add test to vizgen data
dariarom94 Jul 28, 2026
d795f33
Merge branch 'main' into fixes
dariarom94 Jul 28, 2026
fefaadc
param sweep
dariarom94 Jul 28, 2026
4dc08d3
add params to segmentation
dariarom94 Jul 28, 2026
e9505f1
adjust segger mem
dariarom94 Jul 29, 2026
3a155be
update fastreseg to tacco
dariarom94 Jul 29, 2026
acdd6c7
Add annotation + expression-correction parameter sweeps (rctd, ssam, …
dariarom94 Jul 30, 2026
fa462b8
Add moscot + split parameter sweeps (annotation, expression correction)
dariarom94 Jul 30, 2026
fd37aee
singler: read par['celltype_key'] instead of hardcoding "cell_type"
dariarom94 Jul 30, 2026
3449bd0
fastreseg
dariarom94 Jul 30, 2026
331d219
Merge branch 'main' into fixes
dariarom94 Jul 30, 2026
5961d0a
adjust labels
dariarom94 Jul 30, 2026
857e16a
bruker nsclc
dariarom94 Jul 31, 2026
54f023e
adjust bruker nsclc loader
dariarom94 Jul 31, 2026
6e8b9ea
setup
dariarom94 Jul 31, 2026
4eec493
Merge branch 'main' into fixes
dariarom94 Jul 31, 2026
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
39 changes: 29 additions & 10 deletions scripts/create_resources/spatial/mirror_bruker_to_s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,30 @@ set -euo pipefail
# --- Config -----------------------------------------------------------------

SRC_BASE="https://smi-public.objects.liquidweb.services"
S3_DEST="${S3_DEST:-s3://openproblems-data/resources_raw/bruker_cosmx}"
# NSCLC lung-cancer samples live on a different NanoString host, one folder per sample.
NSCLC_BASE="https://nanostring-public-share.s3.us-west-2.amazonaws.com/SMI-Compressed"
# Where the loaders read from (see the process_bruker_cosmx*.sh run scripts).
S3_DEST="${S3_DEST:-s3://openproblems-data/resources/raw_data/bruker_cosmx}"
SCRATCH_DIR="${SCRATCH_DIR:-$PWD/bruker_mirror_scratch}"

# Files to mirror. The URL-encoded names are what the server serves; the second
# column is the (decoded) name to store under on S3.
# Files to mirror. Each entry is "SOURCE|LOCAL_NAME":
# - SOURCE is either a full https URL, or a name relative to SRC_BASE (the mouse/liver host).
# The URL-encoded names are what the liquidweb server serves.
# - LOCAL_NAME is the (decoded) name to store under on S3.
FILES=(
"HalfBrain.zip|HalfBrain.zip"
"Half%20%20Brain%20simple%20%20files%20.zip|Half Brain simple files.zip"
"NormalLiverFiles.zip|NormalLiverFiles.zip"
)

# NSCLC lung-cancer samples: each ships a flat-files+cell-labels archive and a
# raw-morphology-images archive. The bruker_cosmx_nsclc loader streams both from S3.
NSCLC_SAMPLES=(Lung5_Rep1 Lung5_Rep2 Lung5_Rep3 Lung6 Lung9_Rep1 Lung9_Rep2 Lung12 Lung13)
for s in "${NSCLC_SAMPLES[@]}"; do
FILES+=("$NSCLC_BASE/$s/${s}+SMI+Flat+data.tar.gz|${s}+SMI+Flat+data.tar.gz")
FILES+=("$NSCLC_BASE/$s/${s}+RawMorphologyImages.tar.gz|${s}+RawMorphologyImages.tar.gz")
done

# --- Preflight --------------------------------------------------------------

command -v curl >/dev/null || { echo "ERROR: curl not found" >&2; exit 1; }
Expand Down Expand Up @@ -64,7 +77,11 @@ s3_size() {
for entry in "${FILES[@]}"; do
url_name="${entry%%|*}"
local_name="${entry##*|}"
url="$SRC_BASE/$url_name"
if [[ "$url_name" == http*://* ]]; then
url="$url_name"
else
url="$SRC_BASE/$url_name"
fi
local_path="$SCRATCH_DIR/$local_name"

# S3 key = everything after s3://bucket/
Expand Down Expand Up @@ -126,9 +143,11 @@ done
echo "================================================================"
echo "All files mirrored to $S3_DEST"
echo
echo "Next: update the input_raw / input_flat_files URLs in"
echo " scripts/create_resources/spatial/process_bruker_cosmx_nebius.sh"
echo "to point at the S3 paths, e.g.:"
echo " input_raw: $S3_DEST/HalfBrain.zip"
echo " input_flat_files: $S3_DEST/Half Brain simple files.zip"
echo " input_raw: $S3_DEST/NormalLiverFiles.zip"
echo "Next: the process_bruker_cosmx*.sh run scripts already point at these S3 paths, e.g.:"
echo " mouse/liver (process_bruker_cosmx_nebius.sh):"
echo " input_raw: $S3_DEST/HalfBrain.zip"
echo " input_flat_files: $S3_DEST/Half Brain simple files.zip"
echo " input_raw: $S3_DEST/NormalLiverFiles.zip"
echo " nsclc (process_bruker_cosmx_nsclc_nebius.sh), per sample:"
echo " input_raw: $S3_DEST/<sample>+SMI+Flat+data.tar.gz"
echo " input_morphology: $S3_DEST/<sample>+RawMorphologyImages.tar.gz"
32 changes: 22 additions & 10 deletions scripts/create_resources/spatial/process_bruker_cosmx_nsclc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ set -e

publish_dir="s3://openproblems-data/resources/datasets"

# Raw NSCLC archives mirrored to S3 (see scripts/create_resources/spatial/mirror_bruker_to_s3.sh).
# Each sample ships two tar.gz archives: the flat files + cell labels, and the raw morphology images.
raw_dir="s3://openproblems-data/resources/raw_data/bruker_cosmx"

cat > /tmp/params.yaml << HERE
param_list:

- id: "bruker_cosmx/bruker_human_lung_cancer_cosmx/lung5_rep1"
sample: "Lung5_Rep1"
input_raw: "$raw_dir/Lung5_Rep1+SMI+Flat+data.tar.gz"
input_morphology: "$raw_dir/Lung5_Rep1+RawMorphologyImages.tar.gz"
dataset_name: "Bruker CosMx Human Lung Cancer Lung5 Rep1"
dataset_url: "https://nanostring.com/products/cosmx-spatial-molecular-imager/ffpe-dataset/nsclc-ffpe-dataset/"
dataset_summary: "Bruker CosMx Human Lung Cancer Lung5 Rep1 dataset on FFPE."
Expand All @@ -23,16 +28,18 @@ param_list:
segmentation_id: ["cell"]

- id: "bruker_cosmx/bruker_human_lung_cancer_cosmx/lung5_rep2"
sample: "Lung5_Rep2"
input_raw: "$raw_dir/Lung5_Rep2+SMI+Flat+data.tar.gz"
input_morphology: "$raw_dir/Lung5_Rep2+RawMorphologyImages.tar.gz"
dataset_name: "Bruker CosMx Human Lung Cancer Lung5 Rep2"
dataset_url: "https://nanostring.com/products/cosmx-spatial-molecular-imager/ffpe-dataset/nsclc-ffpe-dataset/"
dataset_summary: "Bruker CosMx Human Lung Cancer Lung5 Rep2 dataset on FFPE."
dataset_description: "Bruker CosMx Human Lung Cancer Lung5 Rep2 dataset on FFPE. Adenocarcinoma, G1, T2aN2M0, IIIA, 75% tumour content."
dataset_organism: "homo_sapiens"
segmentation_id: ["cell"]

- id: "bruker_cosmx/bruker_human_lung_cancer_cosmx/lung5_rep3"
sample: "Lung5_Rep3"
input_raw: "$raw_dir/Lung5_Rep3+SMI+Flat+data.tar.gz"
input_morphology: "$raw_dir/Lung5_Rep3+RawMorphologyImages.tar.gz"
dataset_name: "Bruker CosMx Human Lung Cancer Lung5 Rep3"
dataset_url: "https://nanostring.com/products/cosmx-spatial-molecular-imager/ffpe-dataset/nsclc-ffpe-dataset/"
dataset_summary: "Bruker CosMx Human Lung Cancer Lung5 Rep3 dataset on FFPE."
Expand All @@ -41,7 +48,8 @@ param_list:
segmentation_id: ["cell"]

- id: "bruker_cosmx/bruker_human_lung_cancer_cosmx/lung6"
sample: "Lung6"
input_raw: "$raw_dir/Lung6+SMI+Flat+data.tar.gz"
input_morphology: "$raw_dir/Lung6+RawMorphologyImages.tar.gz"
dataset_name: "Bruker CosMx Human Lung Cancer Lung6"
dataset_url: "https://nanostring.com/products/cosmx-spatial-molecular-imager/ffpe-dataset/nsclc-ffpe-dataset/"
dataset_summary: "Bruker CosMx Human Lung Cancer Lung6 dataset on FFPE."
Expand All @@ -50,7 +58,8 @@ param_list:
segmentation_id: ["cell"]

- id: "bruker_cosmx/bruker_human_lung_cancer_cosmx/lung9_rep1"
sample: "Lung9_Rep1"
input_raw: "$raw_dir/Lung9_Rep1+SMI+Flat+data.tar.gz"
input_morphology: "$raw_dir/Lung9_Rep1+RawMorphologyImages.tar.gz"
dataset_name: "Bruker CosMx Human Lung Cancer Lung9 Rep1"
dataset_url: "https://nanostring.com/products/cosmx-spatial-molecular-imager/ffpe-dataset/nsclc-ffpe-dataset/"
dataset_summary: "Bruker CosMx Human Lung Cancer Lung9 Rep1 dataset on FFPE."
Expand All @@ -59,7 +68,8 @@ param_list:
segmentation_id: ["cell"]

- id: "bruker_cosmx/bruker_human_lung_cancer_cosmx/lung9_rep2"
sample: "Lung9_Rep2"
input_raw: "$raw_dir/Lung9_Rep2+SMI+Flat+data.tar.gz"
input_morphology: "$raw_dir/Lung9_Rep2+RawMorphologyImages.tar.gz"
dataset_name: "Bruker CosMx Human Lung Cancer Lung9 Rep2"
dataset_url: "https://nanostring.com/products/cosmx-spatial-molecular-imager/ffpe-dataset/nsclc-ffpe-dataset/"
dataset_summary: "Bruker CosMx Human Lung Cancer Lung9 Rep2 dataset on FFPE."
Expand All @@ -68,7 +78,8 @@ param_list:
segmentation_id: ["cell"]

- id: "bruker_cosmx/bruker_human_lung_cancer_cosmx/lung12"
sample: "Lung12"
input_raw: "$raw_dir/Lung12+SMI+Flat+data.tar.gz"
input_morphology: "$raw_dir/Lung12+RawMorphologyImages.tar.gz"
dataset_name: "Bruker CosMx Human Lung Cancer Lung12"
dataset_url: "https://nanostring.com/products/cosmx-spatial-molecular-imager/ffpe-dataset/nsclc-ffpe-dataset/"
dataset_summary: "Bruker CosMx Human Lung Cancer Lung12 dataset on FFPE."
Expand All @@ -77,7 +88,8 @@ param_list:
segmentation_id: ["cell"]

- id: "bruker_cosmx/bruker_human_lung_cancer_cosmx/lung13"
sample: "Lung13"
input_raw: "$raw_dir/Lung13+SMI+Flat+data.tar.gz"
input_morphology: "$raw_dir/Lung13+RawMorphologyImages.tar.gz"
dataset_name: "Bruker CosMx Human Lung Cancer Lung13"
dataset_url: "https://nanostring.com/products/cosmx-spatial-molecular-imager/ffpe-dataset/nsclc-ffpe-dataset/"
dataset_summary: "Bruker CosMx Human Lung Cancer Lung13 dataset on FFPE."
Expand All @@ -98,4 +110,4 @@ tw launch https://github.com/openproblems-bio/task_ist_preprocessing.git \
--workspace 53907369739130 \
--params-file /tmp/params.yaml \
--config common/nextflow_helpers/labels_tw.config \
--labels datasets,bruker_cosmx_nsclc
--labels datasets,bruker_cosmx_nsclc
15 changes: 14 additions & 1 deletion src/base/labels_nebius.config
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,20 @@ process {
// cannot write Nextflow's root-owned task scratch dir (.command.log /
// .command.begin / .exitcode -> "Permission denied"). Harmless for already-root
// GPU images. If segger moves to another gpu label, carry this with it.
pod = [[nodeSelector: 'nebius.com/node-group-id=mk8snodegroup-e00jp7hyqr094tmy35'], [imagePullPolicy: 'Always'], [runAsUser: 0]]
//
// emptyDir Memory -> /dev/shm — Kubernetes defaults a container's /dev/shm to 64 MB,
// but segger's Lightning training uses a torch_geometric multi-worker DataLoader that
// moves each collated graph Batch to the main process through /dev/shm (torch's
// file-descriptor sharing strategy, _new_using_fd_cpu). 64 MB overflows on the very
// first batch -> "No space left on device (28)" writing /torch_* / "Unexpected bus
// error ... insufficient shared memory (shm)", killing the DataLoader workers in the
// pre-train sanity-check. NB: the `*sharedmem` labels' `--shm-size` containerOptions do
// NOT help here — containerOptions is a docker/singularity concept the k8s executor
// ignores; on k8s /dev/shm must be enlarged via a pod volume. The tmpfs only consumes
// RAM for pages actually written (idle co-tenants on gpuh100 pay ~0) and counts against
// the pod memory limit, so sizeLimit=16Gi sits comfortably under the 120-180 GB request.
// Carry this with runAsUser:0 if segger moves labels.
pod = [[nodeSelector: 'nebius.com/node-group-id=mk8snodegroup-e00jp7hyqr094tmy35'], [imagePullPolicy: 'Always'], [runAsUser: 0], [emptyDir: [medium: 'Memory', sizeLimit: '16Gi'], mountPath: '/dev/shm']]
containerOptions = { workflow.containerEngine == "singularity" ? '--nv':
( workflow.containerEngine == "docker" ? '--gpus all': null ) }
}
Expand Down
19 changes: 15 additions & 4 deletions src/datasets/loaders/bruker_cosmx_nsclc/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@ argument_groups:
- name: Inputs
arguments:
- type: string
name: --sample
example: "Lung9_Rep1"
description: "Sample id"
name: --input_raw
example: "s3://openproblems-data/resources/raw_data/bruker_cosmx/Lung9_Rep1+SMI+Flat+data.tar.gz"
description: |
URL/path to the flat-files + cell-labels archive (`<sample>+SMI+Flat+data.tar.gz`).
Passed as a string (not a staged file) on purpose: the script streams it and extracts
only the members sopa needs. Supports s3:// (via s3fs) or a local path.
- type: string
name: --input_morphology
example: "s3://openproblems-data/resources/raw_data/bruker_cosmx/Lung9_Rep1+RawMorphologyImages.tar.gz"
description: |
URL/path to the raw morphology-images archive (`<sample>+RawMorphologyImages.tar.gz`).
Streamed in place; only the 4th z-plane (Z004) of each FOV is extracted. Supports
s3:// (via s3fs) or a local path.
- type: string
name: --segmentation_id
default: ["cell"]
Expand Down Expand Up @@ -60,9 +70,10 @@ engines:
__merge__:
- /src/base/setup_spatialdata_partial.yaml
setup:
- type: python
- type: python
pypi:
- sopa
- s3fs # stream the raw tar.gz archives from s3:// and extract only what sopa needs (see --input_raw)
- type: native

runners:
Expand Down
Loading
Loading