Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal with platform annotations with missing gene identifiers #33

Open
arteymix opened this issue Aug 3, 2024 · 1 comment
Open

Deal with platform annotations with missing gene identifiers #33

arteymix opened this issue Aug 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@arteymix
Copy link
Member

arteymix commented Aug 3, 2024

When no gene annotations are present on-disk, Gemma defaults to a simple format that lacks gene identifiers. This is breaking gemmapy.

.tox/py/lib/python3.12/site-packages/gemmapy/gemmapy_api.py:1460: in get_dataset_object
    expression = {k:get_exp(k) for k in unique_sets}
.tox/py/lib/python3.12/site-packages/gemmapy/gemmapy_api.py:1418: in get_exp
    exp = exp[~exp.GeneSymbol.str.contains("|",regex = False,na = True)]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =         Probe  GBM: 40L  GBM: 96E  GBM: 46A15  GBM: 99A6  GBM: 64A5  GBM: 32A6  GBM: 4A10  GBM: 5A4  GBM: 52A28  ...  ...      0.514     0.487      0.725      0.624      0.181       0.411      0.201          0.081

[33600 rows x 39 columns]
name = 'GeneSymbol'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'DataFrame' object has no attribute 'GeneSymbol'

.tox/py/lib64/python3.12/site-packages/pandas/core/generic.py:6299: AttributeError
@arteymix arteymix added the bug Something isn't working label Aug 3, 2024
@arteymix
Copy link
Member Author

I've added documentation in staging regarding this in PavlidisLab/Gemma@dcd7292.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant