Metadata-Version: 2.4
Name: RepLikCompare
Version: 0.1.0
Summary: Replicate-based comparison and analysis workflows for Molecular Dynamics data
Author: Alaa Reguei, Samuel Murail
License: MIT License
        
        Copyright (c) 2026 Alaa Reguei, Samuel Murail
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/regueialaa/RepLikCompare
Project-URL: Documentation, https://regueialaa.github.io/RepLikCompare/
Project-URL: Repository, https://github.com/regueialaa/RepLikCompare
Project-URL: Issues, https://github.com/regueialaa/RepLikCompare/issues
Keywords: molecular dynamics,clustering,dimensionality reduction,ensemble comparison,replicate analysis
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: seaborn
Requires-Dist: matplotlib
Requires-Dist: scipy
Requires-Dist: scikit-learn
Requires-Dist: hdbscan
Requires-Dist: umap-learn
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=7; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=2; extra == "docs"
Requires-Dist: nbsphinx>=0.9; extra == "docs"
Dynamic: license-file

# RepLikCompare

<p align="center">
  <img
    src="https://github.com/user-attachments/assets/66f41fe0-e561-4aea-8a94-ad375a7f8e90"
    width="350"
    height="350"
    alt="RepLikCompare illustration"
  />
</p>

RepLikCompare is a Python package for working with Molecular Dynamics data,
including dataset loading, clustering, dimensionality reduction, plotting,
and ensemble comparison workflows.

## Installation

### Conda environment (recommended)

An `environment.yml` file is provided to create an environment with all
dependencies, including `hdbscan` and `umap-learn`:

```bash
conda env create -f environment.yml
conda activate RepLikCompare
```

### Installing the package

Once your environment is ready, you have two options:

**Option A — without cloning (once published on PyPI)**

```bash
pip install RepLikCompare
```

**Option B — from source (works today)**

```bash
git clone https://github.com/regueialaa/RepLikCompare.git
cd RepLikCompare
pip install .
```

Either way installs RepLikCompare together with all of its dependencies
so it is available in both the terminal and Jupyter notebooks.

## Quick start

You have two options for creating a dataset:

1. Use an existing **pandas DataFrame**.
2. Load the data directly from a CSV file.

The input dataset must contain two required columns:

- **System**: the system or condition being analyzed (e.g., `WT` or `Mutant`).
- **Replica**: the replicate identifier for each system (e.g., `WT1`, `WT2`, `WT3`, `Mut1`, `Mut2`, `Mut3`).

```python
import RepLikCompare as rlc

# Create a dataset from an existing pandas DataFrame
dataset = rlc.Dataset.from_dataframe(df)

# Or load a dataset directly from a CSV file
dataset = rlc.Dataset.from_csv("df.csv")
```

## Modules overview

| Module | Key functions | What it does |
|---|---|---|
| **Plotting** | `plot_scatter`, `plot_free_energy`, `plot_lineplot_avg`, `plot_distri_norm`, `plot_vonmises`, `plot_rmsd`, `plot_rmsf`, `plot_contact_map`, `plot_cluster_timeline`, `compute_secondary_structure_timeline` | Scatter/line/distribution plots, free-energy landscapes, RMSD/RMSF and contact-map plots, and cluster/secondary-structure timelines — most with a faceted (per-system) variant. |
| **Clustering** | `compute_cluster_kmean`, `compute_cluster_GMM`, `compute_cluster_dbscan`, `compute_cluster_hdbscan`, `hierarchical_clustering`, `assign_cluster_representative` | Cluster conformations with K-means, GMM, DBSCAN, HDBSCAN, or hierarchical clustering, and pick a representative frame per cluster. |
| **Dimensionality reduction** | `compute_pca`, `compute_umap`, `compute_tsne`, `compute_kpca` | Reduce a set of numeric features to a low-dimensional embedding (PCA, UMAP, t-SNE, kernel PCA), with optional support for circular/angular features. |
| **Ensemble comparison** | `compute_jsd`, `compute_wasserstein`, `compute_convergence` | Statistically compare feature distributions across systems and replicas (Jensen-Shannon divergence, Wasserstein distance) and check trajectory convergence. |

See the [Documentation](https://regueialaa.github.io/RepLikCompare/) for
the full parameter reference of every function.

## Documentation

For more details on the package, including installation, usage, and examples, check out the online documentation:

- **📖 [Documentation](https://regueialaa.github.io/RepLikCompare/)**

## Authors

* Alaa REGUEI, PhD Student - Université Paris Cité, BFA.
* Samuel Murail, Associate Professor - Université Paris Cité, BFA.

## License

Distributed under the MIT license -- see [LICENSE](LICENSE) for details.
