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

`DataAccessor.counts_by_signature` fails if either no positive or no negative markers are provided #293

Closed CarlinLiao closed 9 months ago

CarlinLiao commented 9 months ago

The anonymous-phenotype-counts-fast API endpoint requires both positive_marker and negative_marker channels to be submitted, even if one is an empty list. This causes DataAccessor.counts_by_signature() to error if you submit, e.g., one positive_marker and no negative_marker.

We may want to consider editing the API endpoint to make marker submission optional, but for now the quickest solution would just be to ensure that positive_marker and negative_marker are always submitted by DataAccessor.counts_by_signature(), even if one is empty.