Vizgen / vizgen-postprocessing

The Vizgen Post-processing Tool (VPT) enables users to reprocess and refine the single-cell results of MERSCOPE experiments.
Apache License 2.0
24 stars 5 forks source link

Custom cell segmentation #16

Open vdsukhov opened 1 year ago

vdsukhov commented 1 year ago

Hello everyone!

I have the results of custom cell segmentation and I am able to export them in geojson format. After that, I would like to use them to update the vzg file by applying the vpt pipeline. Could you please assist me in doing so? Thank you!

timwiggin commented 1 year ago

Hi Vladimir! If you've exported the cell boundaries as a geojson file, you should be able to import them using vpt convert-geometry (documentation). There is more than one convention for representing cells in GeoJSON, convert-geometry supports the QuPath conventions (documentation). Your file may require some tweaks depending on how it was assembled.

Hope that helps!

vdsukhov commented 1 year ago

Hi @timwiggin Thank you! I finally found the time to check it. I'd like to provide a recap of the steps I performed, hoping it could be helpful to someone else.

Cell Segmentation: Initially, I used the stardist extension in QuPath to segment cells. Then, I exported the segmented cells in geojson format.

Updating the vzg File: To update the vzg file, I followed the following sequence of commands:

  1. convert-geometry: This command was used to create a new cell_boundaries parquet file.
  2. partition-transcripts: I utilized this command to generate the cell_by_gene.csv file.
  3. derive-entity-metadata: Next, I used this command to generate the cell_metadata.csv file.
  4. update-vzg: Finally, I ran this command to create/update the final vzg file.

If my steps make sense, then the issue can be considered closed.