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
Metadata
Release files for rasar 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rasar-0.1.1.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rasar-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.7 kB
Release files / rasar-0.1.1.tar.gz
| Download URL | rasar-0.1.1.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5bf05556aa2bfc07c18209d7959af00a35b72e9bedab09b14bb2ac168b4384b
|
|
BLAKE2b-256 checksum How to use checksums |
5595cedcc9594b704074b2602c3464cea8cd2e22d35a5ff9958000b25f724aac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.4
|
Release files / rasar-0.1.1-py3-none-any.whl
| Download URL | rasar-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
067e945e0d56f27aa070d596b5ba3b74a3126ee651d5345797eeffd7d4a07760
|
|
BLAKE2b-256 checksum How to use checksums |
e892a3577adfaea5803061ac64e19c22b44dba928c21d081dbcc9c153fef4d83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.4
|