Bug: infer_cp_features()
Function Fails to Capture Features If the Compartment Name Contains Multi-Case Letters
#412
Labels
bug
Something isn't working
Example code with output
I'm currently working with a dataset that doesn't utilize CellProfiler features. As a result, it has different compartments:
What's neat about pycytominer's
infer_cp_features()
function is that you can specify the compartments from which you want to select morphological features using thecompartments
parameter:In the generated feature list, all the features within the
MyoD
compartment are missing. This indicates that theinfer_cp_features()
function is not capturing to capture theMyoD
compartment.Issue description
Feature names within the
MyoD
compartment are not captured.Expected behavior
The expected behavior is to receive all features from all compartments.
Additional information
pycytominer version: 1.0.1
After some digging within the source code, I noticed that
infer_cp_features()
utilizes theconvert_compartment_format_to_list()
function. This function converts all compartment names to lowercase, except for the first letter, which causesMyoD
to turn intoMyod
.While I recognize that this functionality is tailored specifically for CellProfiler features, it presents an exciting opportunity to consider generalizing it for other features that have been extracted from other technologies!
The text was updated successfully, but these errors were encountered: