I am trying to make a MACCS Fingerprint followed by a heatmap using Python. I feel like I have an OK code since I was able to make a Morgan Fingerprint heatmap using similar code.
import matplotlib
import seaborn as sns
import pandas as pd
import os
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import DataStructs
import numpy as np
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem import Draw
from rdkit.Chem import MACCSkeys
from rdkit.Chem.AtomPairs import Pairs
from rdkit.Chem.Draw import MolsToGridImage
from rdkit.Chem import AllChem
from rdkit import DataStructs
from rdkit.DataManip.Metric import GetTanimotoDistMat
from rdkit.DataManip.Metric import GetTanimotoSimMat
from rdkit import rdBasefrom rdkit.Chem import RDConfig
sdfdir = os.path.join(RDConfig.RDDocsDir, '/Users/emmaf/Desktop/toxicitydatamaccs_toxic.sdf')
mols = [m for m in Chem.SDMolSupplier(sdfdir)]
Draw.MolsToGridImage(mols[:5], molsPerRow=5)
maccs_fp_list = [MACCSkeys.GenMACCSKeys(x) for x in mols]`
At this point I get stuck. What can I improve on? I expect to get distance matrix that I would then be able to make into a heatmap.
Thank you for any feedback.