Skip to content

Script developed to build an interactive molecular similarity network to visualize Tanimoto similarity between molecules in a dataset.

Notifications You must be signed in to change notification settings

brendaferrari/interactive-similarity-network-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Interactive Similarity Network using python

Script developed to build an interactive molecular similarity network to visualize Tanimoto similarity between molecules in a dataset.

Libraries used

  • pandas - a Python package that provides fast, flexible, and expressive data structures designed to make working with "relational" or "labeled" data both easy and intuitive.

  • NumPy - the fundamental package for array computing with Python

  • RDKit - Open source toolkit for cheminformatics

  • NetworkX - a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

  • Matplotlib - a comprehensive library for creating static, animated, and interactive visualizations in Python.

  • pyvis - Interactive network visualizations.

Libraries were used in a Miniconda3 environment using python 3.6.13

Instalation

Miniconda3: Installation

pandas:

conda install -c anaconda pandas

numpy

conda install -c anaconda numpy

RDKit

conda install -c rdkit rdkit

NetworkX

conda install -c anaconda networkx

Matplotlib

conda install -c conda-forge matplotlib

pyvis

conda install -c conda-forge pyvis

How to run

Download the code and unzip it on the desirable directory

To run use the following command:

python similarityNetwork.py
  • The dataset layout should be in the format 'smiles' 'molecule_name' as presented in the dataset_ds.smi

  • The threshold may be changed in line 40 as it follows

Tc = DataStructs.TanimotoSimilarity(fps[i], fps[j])
        **if Tc >= 0.3:**
            g.add_edge(smiles[i], smiles[j], length=1000)

Observations

This script has been elaborated using as references the following articles and codes:

Authorship

Social preview original photo by Brenda Ferrari (brendaferrari)

About

Script developed to build an interactive molecular similarity network to visualize Tanimoto similarity between molecules in a dataset.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published