Metadata-Version: 2.4
Name: himalayas
Version: 0.0.16
Summary: Enrichment-based annotation and visualization of hierarchically clustered matrices
Author: Ira Horecka
License: BSD 3-Clause License
        
        Copyright (c) 2026, Ira Horecka
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, https://github.com/himalayas-base/himalayas
Project-URL: Repository, https://github.com/himalayas-base/himalayas
Project-URL: Documentation, https://himalayas-base.github.io/himalayas-docs/
Project-URL: Issues, https://github.com/himalayas-base/himalayas/issues
Keywords: hierarchical clustering,matrix visualization,enrichment analysis,annotations
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: typing_extensions; python_version < "3.10"
Provides-Extra: text
Requires-Dist: nltk; extra == "text"
Provides-Extra: speed
Requires-Dist: fastcluster; extra == "speed"
Dynamic: license-file

# HiMaLAYAS

![Python](https://img.shields.io/badge/python-3.8%2B-yellow)
[![PyPI](https://img.shields.io/pypi/v/himalayas.svg)](https://pypi.python.org/pypi/himalayas)
[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](LICENSE)
![Tests](https://github.com/himalayas-base/himalayas/actions/workflows/ci.yml/badge.svg)

**Hierarchical Matrix Layout and Annotation Software** (**HiMaLAYAS**) is a
framework for post hoc enrichment-based annotation and visualization of
hierarchically clustered matrices. HiMaLAYAS treats dendrogram-defined clusters
as statistical units, tests categorical annotations for enrichment, controls
multiple testing, and renders significant annotations alongside clusters.
HiMaLAYAS supports both biological and non-biological domains.

For a full description of HiMaLAYAS and its applications, see:
<br>
Horecka, I., and Röst, H. (2026)
<br>
_HiMaLAYAS: enrichment-based annotation and visualization of hierarchically clustered matrices_
<br>
_bioRxiv_. [https://www.biorxiv.org/content/10.64898/2026.02.11.705303v2](https://www.biorxiv.org/content/10.64898/2026.02.11.705303v2)
<br>
Submitted to _Bioinformatics Advances_.

## Documentation and Tutorial

- **Full Documentation**: [himalayas-base.github.io/himalayas-docs](https://himalayas-base.github.io/himalayas-docs)
- **Figure Gallery**: [himalayas-base.github.io/himalayas-docs/11_figure_gallery](https://himalayas-base.github.io/himalayas-docs/11_figure_gallery/)
- **Try in Browser (Binder)**:
  - Quickstart: [![Launch Quickstart in Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/himalayas-base/himalayas-docs/main?filepath=notebooks/quickstart.ipynb)
  - Advanced Quickstart: [![Launch Advanced Quickstart in Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/himalayas-base/himalayas-docs/main?filepath=notebooks/quickstart_advanced.ipynb)
- **Documentation Repository**: [github.com/himalayas-base/himalayas-docs](https://github.com/himalayas-base/himalayas-docs)

## Installation

HiMaLAYAS is compatible with Python 3.8 or later and runs on major operating
systems.

```bash
pip install himalayas
# Optional: faster clustering + richer compressed-label text processing
pip install "himalayas[speed,text]"
```

Detailed installation options and fallback behavior are documented at
[himalayas-base.github.io/himalayas-docs/1_installation](https://himalayas-base.github.io/himalayas-docs/1_installation/).

## Key Features of HiMaLAYAS

- **Real-Valued Matrix Input**: Operates on real-valued matrices encoding
  relationships among observations.
- **Dendrogram-Defined Clusters**: Cuts the dendrogram at a user-defined
  threshold to define dendrogram-defined clusters for downstream analysis.
- **Overrepresentation Testing**: Uses a one-sided hypergeometric test to
  evaluate term enrichment in each cluster against the matrix background;
  genes with multiple term annotations are tested independently for each
  term, with no gene-level exclusivity.
- **Multiple-Testing Control**: Supports Benjamini-Hochberg false discovery
  rate (FDR) correction for cluster-term tests, applied globally by default
  (`fdr_scope="global"`).
- **Annotation Mapping and Rendering**: Maps significant annotations onto the
  clustered matrix and supports publication-ready matrix visualizations.
- **No Redundancy Filtering**: Does not perform Gene Ontology graph-aware
  redundancy filtering, such as collapsing parent-child terms or grouping
  terms by semantic similarity; all annotation terms passing the
  minimum-size and minimum-overlap thresholds are tested and reported
  independently.

## Example Usage

We applied HiMaLAYAS to a hierarchically clustered
_Saccharomyces cerevisiae_ genetic interaction profile similarity matrix
(Costanzo _et al_., 2016), focusing on genes with high profile variance.
Dendrogram-defined clusters were tested for Gene Ontology Biological Process
(GO BP; Ashburner _et al_., 2000) enrichment, with significant annotations
rendered alongside clusters.

![Figure 1](assets/figure_1.png)
**HiMaLAYAS workflow and application to a hierarchically clustered yeast
genetic interaction profile similarity matrix (Costanzo _et al_., 2016)**.
A real-valued matrix and categorical annotations serve as inputs. HiMaLAYAS
cuts the dendrogram at a user-defined threshold, tests categorical annotations
for enrichment, controls multiple testing, and renders significant annotations
alongside clusters.

## Citation

### Primary citation

Horecka, I., and Röst, H. (2026)
<br>
_HiMaLAYAS: enrichment-based annotation and visualization of hierarchically clustered matrices_
<br>
_bioRxiv_. [https://www.biorxiv.org/content/10.64898/2026.02.11.705303v2](https://www.biorxiv.org/content/10.64898/2026.02.11.705303v2)
<br>
Submitted to _Bioinformatics Advances_.

### Software archive

HiMaLAYAS software for the _bioRxiv_ preprint.
<br>
Zenodo. [https://doi.org/10.5281/zenodo.19338505](https://doi.org/10.5281/zenodo.19338505)

## Contributing

We welcome contributions from the community:

- [Issues Tracker](https://github.com/himalayas-base/himalayas/issues)
- [Source Code](https://github.com/himalayas-base/himalayas/tree/main/src/himalayas)

## Support

If you encounter issues or have suggestions for new features, please use the
[Issues Tracker](https://github.com/himalayas-base/himalayas/issues) on GitHub.

## License

This project is distributed under the [BSD 3-Clause License](LICENSE).
