AllenCell / cvapipe

Cell Variance Analysis Pipeline
Other
2 stars 0 forks source link

feature/prep-analysis #11

Closed jxchen01 closed 4 years ago

jxchen01 commented 4 years ago

context of changes

Sorry for the big PR. This is the initial migration from my R&D scripts to this repo. It is hard to make smaller PR.

what does this step do?

  1. load the original dataset table
  2. for each FOV, do two things:
    • collect FOV-level information, including reading meta data from original dataset, calculating neighborhood info, calculating stack info (e.g., min/max Z of all cells in this FOV), etc.
    • loop through all cells in this FOV, prepare for analysis (e.g., rescale to isotropic, crop raw image, crop segmentation, collect neighbor cell ids and distance, etc.) and prepare for running mitotic classifier (prepare a single .npy file of nuc and cell data)

The output will be two tables: fov_meta and cell_meta.

fov_meta will not be directly used by analysis, but serve as extra resource in case new request from downstream analysis cell_meta will go through mitotic classifer. After adding mitotic labels into cell_meta, (next step, not implement in this step) the table will be prepared into two versions: one for analysis (very similar format Matheus used in R&D script) and one for other part of the whole workflow, e.g., CFE (the exactly same format as labkey query, including mitotic labels)