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

Possibly removing the "C" and "P" naming convention in feature columns #213

Closed jimmymathews closed 1 year ago

jimmymathews commented 1 year ago

Currently there is a naming convention for feature matrix columns with "C" or "P" indicating whether the column corresponds to an original measured channel or a derivative/composite phenotype membership assesment.

@CarlinLiao wrote a todo comment indicating the desire to convert this system to a pandas multiindex instead. Not sure if we should really do this, but we can discuss the issue here.

https://github.com/nadeemlab/SPT/blob/331bf4578a77b07e8c8732be99ec6f33e81748ed/spatialprofilingtoolbox/db/feature_matrix_extractor.py#L245

CarlinLiao commented 1 year ago

MultiIndexing is really complicated to understand and use, but generally we're using the channel and batch features together, so I think it could be worthwhile to have an in-DataFrame way to grab them without having to do all this string processing of column headers.

jimmymathews commented 1 year ago

I will close due to not having a specific plan. You can reopen by adding a specific plan of what to change, so that code changes could be started that are linked to this issue.