Closed jimmymathews closed 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.
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.
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