Metadata-Version: 2.4
Name: rasar
Version: 0.1.0
Summary: The components of this module can be used for read-across related calculations.
License: Apache License 2.0
Requires-Python: >=3.10.4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas==2.3.3
Requires-Dist: numpy==2.2.6
Requires-Dist: matplotlib==3.10.7
Requires-Dist: scikit-learn==1.7.2
Dynamic: license-file

#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, including pairwise similarity calculation, read-across prediction, read-across optimization, read-across feature importance calculation, and rasar descriptor calculation.


## Getting started
import pandas as pd
from rasar import ra_similarity, ra_pred, ra_optimization, ra_importance, calculate_descriptor
tr = pd.read_excel('train.xlsx', index_col=0)
te = pd.read_excel('test.xlsx', index_col=0)
xtr = tr.iloc[:,:-1]
ytr = tr.iloc[:,-1]
xte = te.iloc[:,:-1]
yte = te.iloc[:,-1]
sim = ra_similarity(des_tr=xtr, des_te=xte)
sim1 = sim.similarity_calculation(method='Euclidean Distance')
pred = ra_pred(df1=tr, df2=te).weighted_prediction(method='Laplacian Kernel', ctc=6, gamma=0.5)
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)
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)
des_tr, des_te = calculate_descriptor(df1=tr, df2=te, method='Laplacian Kernel', ctc=6, gamma=0.5, merge = True)

##Cite
To use this module, users need to cite the following paper:

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

