Skip to content

Instantly share code, notes, and snippets.

View leelasd's full-sized avatar
🏠
Working from home

Leela S. Dodda leelasd

🏠
Working from home
View GitHub Profile
@bitsnaps
bitsnaps / dataset_clustering.py
Last active April 9, 2024 12:11
Clustering using AgglomerativeClustering and silhouette scoring
# Create a file "dataset.csv" with these values (don't forget to remove the '#' before each line):
# ID,Height,time_of_day,resolution
# 272,1.567925,1.375000,0.594089
# 562,1.807508,1.458333,0.594089
# 585,2.693542,0.416667,0.594089
# 610,1.036305,1.458333,0.594089
# 633,1.117111,0.416667,0.594089
# 658,1.542407,1.458333,0.594089
# 681,1.930844,0.416667,0.594089
# 802,1.505548,1.458333,0.594089
@PatWalters
PatWalters / split_complex_v2.py
Created October 2, 2018 01:20
An improved script to extract a ligand from a protein-ligand complex and assign bond orders
#!/usr/bin/env python
import sys
from prody import *
from rdkit import Chem
from rdkit.Chem import AllChem
from io import StringIO
import pypdb
@avrilcoghlan
avrilcoghlan / retrieve_bioactivity_info_from_chembl.py
Created May 30, 2019 10:11
Python script to query the ChEMBL database to retrieve a list of compounds with bioactivities for certain target proteins, and then retrieve information on the molecular properties of those compounds
import pandas as pd # uses pandas python module to view and analyse data
import requests # this is used to access json files
#====================================================================#
# using a list of known targets, find compounds that are active on these targets:
def find_bioactivities_for_targets(targets):
targets = ",".join(targets) # join the targets into a suitable string to fulfil the search conditions of the ChEMBL api
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@greglandrum
greglandrum / SAR Tables.ipynb
Created August 20, 2019 22:55
SAR Tables.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@greglandrum
greglandrum / Clustering Methods.ipynb
Created May 10, 2019 06:20
Clustering Methods.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PatWalters
PatWalters / dupe.py
Last active January 14, 2023 01:12
Compare two SMILES or SD files to identify duplicate structures. Duplicates are identified by comparing InChI keys
#!/usr/bin/env python
import sys
import os
from rdkit import Chem
def molecule_supplier_from_name(input_file_name):
ext = os.path.splitext(input_file_name)[-1]
if ext == ".smi":
@JoaoRodrigues
JoaoRodrigues / bio_align.py
Last active January 6, 2023 22:10
Sequence-based structure alignment of protein structures with Biopython
#!/usr/bin/env python
"""Sequence-based structural alignment of two proteins."""
import argparse
import pathlib
from Bio.PDB import FastMMCIFParser, MMCIFIO, PDBParser, PDBIO, Superimposer
from Bio.PDB.Polypeptide import is_aa
@greglandrum
greglandrum / Taka_ConstrainedEmbedding.ipynb
Created June 4, 2019 14:10
Taka_ConstrainedEmbedding.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JoaoRodrigues
JoaoRodrigues / hydrophobic_moment.md
Last active July 13, 2022 20:40
Peptide/Protein Hydrophobic Moment Calculator