nadeemlab / SPT

Spatial profiling toolbox for spatial characterization of tumor immune microenvironment in multiplex images
https://oncopathtk.org
Other
21 stars 2 forks source link

final step to make cggnn importance scores available in sample-level features #209

Closed jimmymathews closed 1 year ago

jimmymathews commented 1 year ago

Now that cggnn importance scores can be made available as quantitative_feature_value records, as discussed previously we should make a new API endpoint in apiserver/app/main.py that returns, for each specimen, the fraction of important cells expressing a given cell phenotype.

The call signature could be:

def get_cggnn_importance_composition(
    cell_limit: int = 100,
    positive_marker: ValidChannelListPositives,
    negative_marker: ValidChannelListNegatives,
    study: ValidStudy,
) -> UnivariateMetricsComputationResult:
    ....
CarlinLiao commented 1 year ago

We should also have a default response that responds like "This study's specimens are too small to train a cg-gnn instance on." and "This study lacks strata to train a cg-gnn instance on." depending on which study we're looking at. This could be handled solely at the GUI level or, preferably, in the SPT API.