yaksilab / silver-dollop

This repo contains analysis tools for astroglial cells
MIT License
0 stars 0 forks source link

Atroglial subsegmentation and trace extraction tool #2

Closed javidaf closed 1 month ago

javidaf commented 1 month ago

Tool Description

This release introduces a tool that utilizes cellpose-generated masks from the astroglial-segmentation package to perform detailed subsegmentation and alignment of cellular regions. Each subsegment is assigned a unique segment number based on its calculated distance from the ventricular lining, allowing for a highly organized spatial structure of cellular subregions.

Output Data Structure

The output consists of two matrices that capture essential details for each subsegment:

1. Trace Matrix

This matrix captures the intensity trace data over multiple time points (or frames) for each subsegment. Each row represents a subsegment associated suite2p ROI index s2p, with a segment label S, and contains intensity values f1, f2, ... fF, where each f corresponds to a specific time point or frame.

s2p S1 f1 f2 ... fF
s2p S2 f1 f2 ... fF
...

2. Coordinate Matrix

This matrix provides detailed spatial data for each subsegment, including both original and aligned pixel coordinates for precise positioning. It includes identifiers such as the suite2p ROI index s2p, cell label C, segment label S, and subsegment number S_#x. The coordinate pairs (xo, yo) and (xa, ya) represent the original and aligned positions, respectively, with a class label indicating the subsegment's classification.

s2p C1 S1 S_#x xo1 yo1 xa1 ya1 class
s2p C1 S1 S_#x xo2 yo2 xa2 ya2 class
...

These structured outputs enable in-depth analysis of subregional distribution and neural activity patterns within segmented regions, aiding in advanced cellular and anatomical studies and are saved as .matfiles