GithubHelp home page GithubHelp logo

poloarol / snakemake-vizgen-cell-segmentation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

A snakemake pipeline to perform cell segmentation on MERFISH spatial transcriptomics data.

License: MIT License

Python 78.97% Shell 8.32% Dockerfile 12.72%
cell-segmentation cellpose merfish spatial-transcriptomics vizgen watershed-algorithm vizgen-postprocessing single-cell-rna-seq

snakemake-vizgen-cell-segmentation's Introduction

snakemake-vizgen-cell-segmentation

A snakemake pipeline to perform cell segmentation on MERFISH spatial transcriptomics data.

Fetaures

This snakemake pipeline is a wrapper around the VizGen Post-processing Tool, to perfrom cell segmentation on MERFISH spatial transcriptomics data.

Build Docker image

  • Create image: docker build -t vizgen-segmentation .
  • Test image: docker run vizgen-segmentation
  • Mount disk: docker run --rm -it --entrypoint /bin/bash -v <path-to-folder>:<docker-folder-name> vizgen-segmentation

Run test on pipeline

  • Using watershed segmentation algorithm: bash run_test.sh watershed zero
  • Using cellpose model for segmentation:
    • experimental model nuclei-only: bash run_test.sh cellpose three

Run the pipeline with desired VPT model

  • Using watershed segmentation algorithm: bash run.sh watershed zero <vgz-file-name>
  • Using cellpose model for segmentation:
    • experimental model nuclei-only: bash run.sh cellpose three
    • experimental model cytoplasm with nuclei Z3: bash run.sh cellpose two <vgz-file-name>
    • experimental model cytoplasm with nuclei Z3: bash run.sh cellpose one <vgz-file-name>

Rules input/output

[X] rule identify_cell_boundaries: - input - \images*.tif - \images\micron_to_mosaic_pixel_transform.csv - output - \cellpose_micron_space.parquet - \cellpose_mosaic_space.parquet - \segmentation_specification.json - \results_tiles\0.parquet - \results_tiles\1.parquet - \results_tiles\2.parquet

[X] rule partition_transcripts_cells: - input: - \detected_transcripts.csv - \cellpose_micron_space.parquet - output: - \cell_by_gene.csv - \detected_transcripts.csv

[X] rule calc_cell_metadata: - input: - \cellpose_micron_space.parquet - \cell_by_gene.csv - output: - \cell_metadata.csv

[X] rule calc_cell_sum_signal: - input: - \images*.tif - \images\micron_to_mosaic_pixel_transform.csv - \cellpose_micron_space.parquet - output: - \sum_signal.csv

[X] rule update_vizgen: - input: - \cellpose_micron_space.parquet - \cell_by_gene.csv - \cell_metadata.csv - <project_name>-vizgen-file.vgz - output: - \yy-mm-dd_<project_name>updated.vgz

Structure of output

<path-to-output>\
|   <sample-name>\
|       results_tiles\
|           0.parquet
|           1.parquet
|           2.parquet
|       cellpose_micron_space.parquet
|       cellpose_mosaic_space.parquet
|       segmentaion_segmentation.json
|       cell_by_gene.csv
|       detected_transcripts.csv
|       cell_metadata.csv
|       sum_signals.csv
|       <yy_mm_dd_hh_mm_ss_<project_name>_updated.vgz>

snakemake-vizgen-cell-segmentation's People

Contributors

poloarol avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.