volkamerlab / kinfraglib Goto Github PK
View Code? Open in Web Editor NEWKinase-focused fragment library
License: MIT License
Kinase-focused fragment library
License: MIT License
hi, all,
when I tried to conduct the below cell,
%%time
construct_and_save_ligands_from_combinatorial_library(
PATH_COMBINATORIAL_LIBRARY,
PATH_FRAGMENT_LIBRARY_REDUCED,
PATH_CONSTRUCTED_MOLECULES,
n_first_ligands=20000,
n_ligands_per_sdf_file=10000
)
but the notebooks provided the errors
StopIteration Traceback (most recent call last)
<timed eval> in <module>
~\AppData\Local\Temp\ipykernel_12788\397085490.py in construct_and_save_ligands_from_combinatorial_library(path_combinatorial_library, path_fragment_library, path_output, n_first_ligands, n_ligands_per_sdf_file)
44 # Construct and save ligands
45 _construct_and_save_selected_ligands(
---> 46 ligand_metadata_list, fragment_library, path_output, i
47 )
48 # Reinitialize ligand metadata list
~\AppData\Local\Temp\ipykernel_12788\1434265608.py in _construct_and_save_selected_ligands(ligand_metadata_list, fragment_library, path_output, index)
18 ligand_list = [
19 utils.construct_ligand(ligand["fragment_ids"], ligand["bond_ids"], fragment_library)
---> 20 for ligand in ligand_metadata_list
21 ]
22 # Save ligands to file
~\AppData\Local\Temp\ipykernel_12788\1434265608.py in <listcomp>(.0)
18 ligand_list = [
19 utils.construct_ligand(ligand["fragment_ids"], ligand["bond_ids"], fragment_library)
---> 20 for ligand in ligand_metadata_list
21 ]
22 # Save ligands to file
c:\users\lenovo\kinfraglib\kinfraglib\utils.py in construct_ligand(fragment_ids, bond_ids, fragment_library)
1299 )
1300 dummy_2 = next(
-> 1301 atom for atom in combo.GetAtoms() if atom.GetProp("fragment_atom_id") == bond[1]
1302 )
1303 atom_1 = dummy_1.GetNeighbors()[0]
StopIteration:
I've tried to see, fix the issues and find there are around 560 cpds that were generated by the jupyter notebok procedure.however, accordin to the description of demo use,
Construct and save ligands: Example 20k ligands (10k ligands/sdf file) - runtime see below; ~30 MB per file.
does that look whether to generate more than 600 ligands under the proces?
many thanks for your kind helps.
best,
When applying the syba filter on the fragment library, whereas due to this filter all fragments for a distinct subpocket would be dropped, an exception is thrown.
Check out this CI run to see where notebooks fails on these systems:
https://github.com/volkamerlab/KinFragLib/pull/26/checks?check_run_id=1919491707
Address this issue in a separate PR.
Also in this next PR we could add black and flake8 checks.
While going through the updated (KLIFS 2023 version) fragment library, I came across fragments in the old/current version, that would not be included in the updated library anymore. Double-checking some of the structures with KLIFS showed that the original ligands have an out-like DFG conformation and are therefore excluded in the new library (see 3efw
and 2bmc
as examples). I haven't checked this for all cases, but this is probably the case for all of the 34 ligands missing in the new library.
Since only some and not all out-like ligands from KLIFS are included in KinFragLib, I assumed that you also only included structures with DFG-in conformation (as mentioned in the kffl repository). It might be that the DFG conformation in the KLIFS database was changed for those structures? Or do you have another idea why this is the case @dominiquesydow?
Hi, folks,
Thanks for the contribution on the KinFragLib! It has been 2 years since the release of dataset. I want to know if there is any update on the dataset. Or is there any script I can follow to update by myself?
Best
fragment_analysis
and cluster_most_common_fragments
Remove opencadd
dependencies from the environment file once opencadd
is conda-installable.
I think we are misusing next()
in this context (it works but it is not the proper way to do this and whenever errors occur the traceback is a bit difficult):
KinFragLib/kinfraglib/utils.py
Lines 1297 to 1302 in 99e94c2
What are we doing here?
We are selecting an atom from a molecule based on a fragment atom id (stored in bond
). This selection should result in exactly one atom. Then, we are using next()
to extract this one atom from the list comprehension. This is problematic in two ways:
(1) What if the selection returns no atom? Throws StopIteration
I think.
(2) What if the selection returns multiple atoms? Should never happen but we should add a check.
What do I suggest?
Remove next()
. Store selection in a list and go through all cases with if-elif-else
(0, 1, >1 atoms), raise proper errors for 0 and >1 atoms.
Add data for all literature fragments and set up stand-alone notebook to compare them to our fragments (so far mainly done visually by hand, documented off-line).
First steps are in fragment_analysis.ipynb
:
Yang et al. publication add DOI/link; and what is the result of the analysis (we should have found it?)
Initially, I thought we do not have those large fragments in our library, but turns out we have. To make this part more meaningful, I should add all their fragments and check if we have them.
Add the respective figure captions from the manuscript to notebooks:
fragment_analysis.ipynb
clustered_most_common_fragments.ipynb
Running notebook 2.4 with Python 3.6 works.
Add note to notebook.
Thanks @Nonar for reporting this.
New installation:
pip install https://github.com/volkamerlab/klifs_utils/archive/master.tar.gz
Check if klifs_utils
usage is affected by API update.
Hi All,
Thank you for developing KinFragLib! That is exactly a great approach for knowledge-based kinase inhibitor design.
I wonder how I could use KinFragLib fragmentation & recombination codes for my own kinase inhibitor design. For example, I have a kinase inhibitor that I only wanted to replace the AP region with all AP fragments stored in KinFragLib. Is it possible for me to do that?
In another case, if I would like to do fragmentation & recombination from other kinase inhibitor collections, how could I do that?
Thanks!
Cheng
At some point add a section to our README referencing interesting articles that use KinFragLib data in some way.
The KLIFS database has updated their aC-helix classification, thus the numbers show in the KinFragLib paper do not correspond to the numbers shown in this notebook anymore. See KLIFS news > "Granular control over the kinase conformation" post.
data/fragment_library/original_ligands.json
accordingly (contains aC-helix data from KLIFS).Hello,
I am wondering if the tools used to construct the fragments collections are available, I am interested in pulling the fragments from the updated KLIFs repository as well as including other subsets, eg. the DFG-out subset that was not considered in the original publication,
Thanks,
Marawan
!pip install -e KinFragLib
the ERROR occured.
ERROR: KinFragLib is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).
what's problem and how to fix it up? thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.