AI4SCR / ATHENA

BSD 3-Clause "New" or "Revised" License
31 stars 6 forks source link

Problematic exception raise in `base_graph_builder.py` #6

Closed Sann5 closed 1 year ago

Sann5 commented 1 year ago

When building concept graphs, one must ensure that every graph for every concept is not empty. For example if one builds a graph with only Vessel cells, it is possible that some samples do not contain any cells of this type, therefore when building a concept graph under this concept the graph for this sample would be empty. The GCL workflow takes care of ensuring this through the sub-workflow filter_samples, by filtering samples that have less than N cells in any given concept (N is user-defined).

On the other hand when developing the ATHENA graph concept-building functionality I put in place a check that ensures that every label that you have in include_labels must be present in the filtering column base_graph_builder.py:65 (to avoid undefined behavior). However, this check is restrictive since one can potentially have cell types that are not present in a sample but it still constitutes a valid sample because it has enough cells from the other types.

Because of this, I removed this check. Actually, I just updated it. Now it checks that at least one of the labels in include_lables matches the labels present in filter_column.