jason-weirather / pythologist-reader

Reading functions to generate projects for storage and producing dataframes suitable for pythologist analysis
Apache License 2.0
0 stars 0 forks source link

Improve speed of immunoProfile read #1

Closed jim-bo closed 4 years ago

jim-bo commented 4 years ago

Would it be possible to update the read_InFormImmunoProfileV1 function to avoid calculating NN, edge and contact maps to improve the loading time?

jason-weirather commented 4 years ago

The most recent update 848b4eb adds two additional parameters that can speed up an immuno-profile data read. There was already one parameter present which could be helpful to speed up a read.

From the updated documentation read_InFormImmunoProfileV1:

skip_margin (bool) – if false (default) read in margin line and define a margin according to steps. if true, only read a tumor and stroma.

skip_segmentation_processing – if false (default), it will store the cellmap and edgemap images, if true, it will skip these steps to save time but downstream applications will not be able to generate the cell-cell contact measurements or segmentation images.

skip_all_regions (bool) – if false (default), it will use drawn tumor masks or drawn tumor masks with drawn margins to calculate region areas, and assign cells to regions. If true it will assign all cells the default region of ‘Any’ and use the processed image.

These options will result in the loss of some data being available for downstream analysis so apply them with care.