Skip to main content

The components of this module can be used for read-across related calculations.

Project description

rasar

The components of this module can be used for read-across related calculations.
It is a crucial module for cheminformatics applications.


🚀 Installation

pip install rasar

📌 Usage

This module supports five different read-across tasks:

  • Pairwise similarity calculation
  • Read-across prediction
  • Read-across optimization
  • Read-across feature importance calculation
  • RASAR descriptor calculation

🧪 Getting Started

import pandas as pd
from rasar import (
    ra_similarity,
    ra_pred,
    ra_optimization,
    ra_importance,
    calculate_descriptor
)

# Load data
tr = pd.read_excel('train.xlsx', index_col=0)
te = pd.read_excel('test.xlsx', index_col=0)

# Split features and target
xtr = tr.iloc[:, :-1]
ytr = tr.iloc[:, -1]
xte = te.iloc[:, :-1]
yte = te.iloc[:, -1]

# Similarity calculation
sim = ra_similarity(des_tr=xtr, des_te=xte)
sim1 = sim.similarity_calculation(method='Euclidean Distance')

# Prediction
pred = ra_pred(df1=tr, df2=te).weighted_prediction(
    method='Laplacian Kernel',
    ctc=6,
    gamma=0.5
)

# Optimization
opt = ra_optimization(
    method='Laplacian Kernel',
    data=tr,
    parameters={
        'CTC': [1, 3, 6, 10],
        'Gamma': [0.1, 0.5, 1],
        'Threshold': [0.0]
    },
    objective_function="MAE",
    cv_fold=5
)

# Feature importance
imp = ra_importance(df1=tr).imp_calculation(
    method='Laplacian Kernel',
    ctc=6,
    gamma=0.5,
    ths=2
)

ra_importance(df1=tr).plot_importance(
    imp_df=imp,
    plot_type='coefficient',
    color="winter_r",
    index=1
)

# Descriptor calculation
des_tr, des_te = calculate_descriptor(
    df1=tr,
    df2=te,
    method='Laplacian Kernel',
    ctc=6,
    gamma=0.5,
    merge=True
)

📖 Citation

If you use this module, please cite:

Pore, S. and Roy, K., 2025.
“intelligent Read Across (iRA)” — A tool for read-across-based toxicity prediction of nanoparticles.
Computational and Structural Biotechnology Journal.
https://doi.org/10.1016/j.csbj.2025.07.032


📜 License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rasar-0.1.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rasar-0.1.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file rasar-0.1.1.tar.gz.

File metadata

  • Download URL: rasar-0.1.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.4

File hashes

Hashes for rasar-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b5bf05556aa2bfc07c18209d7959af00a35b72e9bedab09b14bb2ac168b4384b
MD5 6db86d432b72d8b2ab7aa16a290d5b09
BLAKE2b-256 5595cedcc9594b704074b2602c3464cea8cd2e22d35a5ff9958000b25f724aac

See more details on using hashes here.

File details

Details for the file rasar-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rasar-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.4

File hashes

Hashes for rasar-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 067e945e0d56f27aa070d596b5ba3b74a3126ee651d5345797eeffd7d4a07760
MD5 5bde8acb88212b424c1241fd5b80fd0d
BLAKE2b-256 e892a3577adfaea5803061ac64e19c22b44dba928c21d081dbcc9c153fef4d83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page