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

Add moa and compound annotation #444

Merged
merged 39 commits into from
Dec 20, 2023
Merged

Add moa and compound annotation #444

merged 39 commits into from
Dec 20, 2023

Conversation

wxicu
Copy link
Collaborator

@wxicu wxicu commented Nov 21, 2023

PR Checklist

Description of changes
Add compound and moa annotation MoaMetaData and CompoundMetaData
Improve CelllineMetaData: add new parameter show for each annotating function to print out only thr given number of unmatched identifiers.

Technical details
Compound annotation: fetch the compound annotation including the first synonym, cid and canonical smiles via pubchempy. query identifiers can be either CID or the name.
moa annotation: fetch moa annotation sourced from clue.io. query id should be the name of the perturbagens. Annotated moa is also filtered on an optional parameter target.
Lookup objects for two new objects are also implemented.

Additional context

@github-actions github-actions bot added the chore label Nov 21, 2023
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 149 lines in your changes are missing coverage. Please review.

Comparison is base (7695ed1) 63.99% compared to head (c36dacf) 62.98%.

❗ Current head c36dacf differs from pull request most recent head 7c5c81a. Consider uploading reports for the commit 7c5c81a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #444      +/-   ##
==========================================
- Coverage   63.99%   62.98%   -1.01%     
==========================================
  Files          37       42       +5     
  Lines        4438     4652     +214     
==========================================
+ Hits         2840     2930      +90     
- Misses       1598     1722     +124     
Files Coverage Δ
pertpy/__init__.py 100.00% <100.00%> (ø)
pertpy/metadata/__init__.py 100.00% <100.00%> (ø)
pertpy/plot/__init__.py 100.00% <100.00%> (ø)
pertpy/tools/__init__.py 100.00% <ø> (ø)
pertpy/metadata/_moa.py 79.48% <79.48%> (ø)
pertpy/metadata/_metadata.py 62.50% <62.50%> (ø)
pertpy/metadata/_compound.py 73.91% <73.91%> (ø)
...y/tools/_perturbation_space/_perturbation_space.py 85.79% <40.00%> (-4.89%) ⬇️
pertpy/plot/_metadata.py 30.30% <30.30%> (ø)
pertpy/metadata/_cell_line.py 69.61% <47.82%> (ø)
... and 1 more

Copy link
Member

@Zethson Zethson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank youuu!

  1. Could you please always make the "available database" names links? Also to any of the older cell line metadata databases, please
  2. All of these show checks seem pretty repetitive. Is there a way to extract this as a helper function? You just need to also parameterize the type of data (protein, [...]), but that's easy.
  3. I think that some of the code can be reduced and simplified. It's a bit verbose.

@wxicu wxicu requested a review from Zethson November 24, 2023 23:17
@Zethson Zethson added enhancement New feature or request and removed chore labels Nov 28, 2023
Copy link
Member

@Zethson Zethson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please check the types of many of your parameters again? I think they could be a bit more general. Maybe Iterable instead of List for some etc.
Also make the behavior clear if None is an option. Sometimes you're not describing that.

@github-actions github-actions bot added the chore label Nov 30, 2023
@wxicu wxicu requested a review from Zethson December 5, 2023 16:05
Copy link
Member

@Zethson Zethson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you deleting the whole cell line test and where did your new tests go?

We can merge this then!

@Zethson Zethson merged commit 9b715b8 into main Dec 20, 2023
4 of 5 checks passed
@Zethson Zethson deleted the dev_metadata branch December 28, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants