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

Error in .filter_pathways method #47

Open
abearab opened this issue Aug 30, 2023 · 2 comments
Open

Error in .filter_pathways method #47

abearab opened this issue Aug 30, 2023 · 2 comments

Comments

@abearab
Copy link
Member

abearab commented Aug 30, 2023

I'm getting error when I try to filter pathways by size.

msigdb_c5_gobp.filter_pathways(min_size=50,max_size=150)
AttributeError: 'GeneSets' object has no attribute 'pathway_sizes'

I could make it work by running msigdb_c5_gobp._calculate_pathway_sizes() prior to that but it would be nice to add this line to the beginning of .filter_pathways method.

@abearab
Copy link
Member Author

abearab commented Aug 30, 2023

Also number of reported pathways and genes is not changing after filtering (which should change, right?). You may want to correct that, too.

image

@abearab
Copy link
Member Author

abearab commented Aug 30, 2023

Also, I can not smoothly feed modified GeneSets object to PAGE.run.

AttributeError: 'PAGE' object has no attribute 'exp_bins'

To my understanding this part of code is excluding 'exp_bins' so this need to be added to PAGE object after modifying GeneSets object.

pypage/pypage/page.py

Lines 156 to 160 in 809dd88

if not self.expression.modified and not self.ontology.modified:
self._intersect_genes()
self._subset_matrices()
self._set_sizes()


I'm setting msigdb_c5_gobp.modified = False for now :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant