Commit 6b8fbcd
Databases (#188)
* removed comment
* removed kinase_schema.CollectionKinaseInfo
* comment on PRKD2 and AlphaMissense
* temporary scratch for aligning sequences to DiscoverX
* implemented new class ChEMBLMolecule to query for molecule details
* added xlrd to package dependencies to process Davis dataset
* preliminary info for davis harmonization
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add check_molecules to ChEMBL; updated wrong ChEMBLMolecule argument
* add check_molecules to ChEMBL; updated wrong ChEMBLMolecule argument
* make rdkit a package dependency
* cli for querying ChEMBL for dataset preprocessing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* moved davis and pkis2 modules to datasets
* changed error message for maybe_get_symbol_from_hgnc_search if custom_field provided
* updates to pkis2 and davis datasets modules
* removed commented out PR CIs for databases and schema
* fixed chembl search error - default empty list not None
* added adjudicate_kd_start and adjudicate_kd_end for dataset incorporation purposes
* added docstring for bool_offset
* allow for str_fasta to be used if need to hardcode for errors
* removed pytest.mark.skip as NCBI API is currently running
* added function to check if lipid kinase
* specified input_is_hgnc_symbol default in docstring
* added Pfam docstring
* UniProtRefSeqProteinGET and query_uniprotbulk_api to uniprot module; modifies nf-rnaseq package tooling
* fully working initial commit of discoverx module; construct to KD/KLIFS mapping outstanding
* added verbose flag to the KinaseInfo functions rather than logging by default
* added verbose flags
* added and commented out pip install nf-rnaseq from github; uncomment for testing if in use
* import only UniProtFASTA rather than entire uniprot module to avoid nf-rnaseq import errors; fix if want to test this functionality
* uncommented nf-rnaseq
* in progress datasets commit
* used verbose flag for caplog tests
* dict_refseq_indices working correctly
* dict_construct_sequences finalized - use this to generate harmonized representations
* generate the dataset csv files
* process now contains all code necssary to generate different aligned input sequences
* conformed to latest process module structure
* added dataset csv CLI to pyproject.toml
* added plotting functions for discoverx
* upgrades for discoverx plotting
* CLI script to generate poster dataset plots
* plot both svg and PNG formats for all
* added plot dynamic range to the plotting CLI, need to fix font size
* fixed svg in plot_dynamic_range - font still looks a little off; added docstrings and fixed comment format
* Fix test_pfam and test_ncbi to handle API 500 errors gracefully
Handle RetryError exceptions when external APIs return 500 errors by
skipping tests instead of failing. This prevents CI failures due to
unpredictable external API availability.
Changes:
- Wrap test_pfam API calls in try-except block
- Wrap test_ncbi API calls in try-except block
- Skip tests with informative messages when 500 errors occur
- Re-raise other exceptions to catch real issues
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* Refactor plotting code and fix SVG font rendering issues
This commit improves the plotting functionality by:
1. Creating a reusable save_plot() helper function to reduce code duplication
2. Fixing SVG font rendering issues by converting text to paths
3. Improving mathtext rendering for subscripts (K_d, log_10)
Changes:
- Add save_plot() function to handle saving both SVG and PNG formats
- Replace repetitive save code in all 5 plotting functions
- Change svg.fonttype from "none" to "path" for consistent rendering
- Update mathtext from \mathregular to \mathrm for proper subscript rendering
- Ensure plots render consistently in browsers, VS Code, and vector editors
Benefits:
- SVG files now render perfectly in all viewers without spacing/kerning issues
- Reduced code duplication by ~60 lines
- Easier maintenance with centralized save logic
- Consistent behavior across all plotting functions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* absolute filepath for cwd instead of '.'
* fixed KinaseMissenseMutations.dict_replace - only do this if key in original datast
* make the checks and post_init optional in case loading from a CSV file for a cohort that requires a VPN - logger errors are now warnings; allow load_from_csv from an input str if loading from multiple dataframes (e.g., KinaseMissenseMutations ._df and ._df_filter); added pathfile_filter to KinaseMissenseMutations
* updated databases for kw_only arg study_id in Mutations
* fixed bug in dict_kinase_cbio in get_kinase_missense_mutations function - need to check if mkt_name is in dict_kinase_cbio rather than cbio_name
* changed HGNC name and mismatch error logging
* Two minor logger formatting tweaks (#186)
Linebreaks and spacing for canonical mismatch errors
* only log query errors if present
* moved classes from app to mkt.databases.app since need to use extensibly in other places (mkt_impact); simplified names for relevant app modules since no longer scripts importing locally; remove py3dmol and streamlit/bokeh related plotting functions to standalone visualization script in app; created pymol module and moved CLI script to mkt.databases; added webcolors to pyproject.toml dependencies
* removed all plotting - keep this in standalone app
* removed all plotting - keep this in standalone app
* updated imports for new app structure
* changed imports in app script
* PyMOL module and CLI
* removed self.html = self.visualize_structure() from StructureVisualizer and moved to StructureVisualizerVisualizer
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude <[email protected]>1 parent dfb9cc3 commit 6b8fbcd
File tree
4 files changed
+58
-89
lines changed- missense_kinase_toolkit
- app
- databases/mkt/databases
- app
- cli
4 files changed
+58
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
Lines changed: 5 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
11 | 10 | | |
12 | | - | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 49 | + | |
Lines changed: 49 additions & 58 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 5 | | |
10 | | - | |
11 | | - | |
| 6 | + | |
12 | 7 | | |
13 | 8 | | |
14 | 9 | | |
| |||
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 23 | + | |
34 | 24 | | |
35 | 25 | | |
36 | 26 | | |
| |||
270 | 260 | | |
271 | 261 | | |
272 | 262 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
0 commit comments