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

Argument flexibility for spatial metrics endpoint #188

Closed jimmymathews closed 1 year ago

jimmymathews commented 1 year ago

In the usage I'd like to be able to support in the web application, it should be possible to query for the spatial metrics based on entirely user-defined phenotypes, up to 2 phenotypes. Right now the query parameters only support named/predefined phenotypes by identifier or single-channel.

For this issue, either create a new endpoint (like the "anonymous" endpoint for counts), or add optional query parameters that allow the user to specify 0, 1, or 2 lists of positive and negative markers.

jimmymathews commented 1 year ago

Tests pass. (This also includes a small bugfix for reproducibility of one of the tests. For some reason at significant digits >20 or so there were the tiniest discrepancies depending on architecture.)