Skip to content

Commit 8310b42

Browse files
committed
Update docs
1 parent 7e82be8 commit 8310b42

16 files changed

Lines changed: 1001 additions & 670 deletions

.github/workflows/docker-build-multi-arch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: docker/build-push-action@v4
3232
with:
3333
context: .
34-
file: ./Dockerfile
34+
file: ./docker/Dockerfile
3535
push: true
3636
tags: |
3737
manuelrueda/pheno-ranker:${{ steps.get_version.outputs.VERSION }}

.github/workflows/docker-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Build Docker image
3232
run: |
33-
docker build -t manuelrueda/pheno-ranker:${{ steps.get_version.outputs.VERSION }} .
33+
docker build -f docker/Dockerfile -t manuelrueda/pheno-ranker:${{ steps.get_version.outputs.VERSION }} .
3434
docker tag manuelrueda/pheno-ranker:${{ steps.get_version.outputs.VERSION }} manuelrueda/pheno-ranker:latest
3535
3636
- name: Login to Docker Hub

.github/workflows/test-docker-build-multi-arch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: docker/build-push-action@v4
3232
with:
3333
context: .
34-
file: ./Dockerfile
34+
file: ./docker/Dockerfile
3535
push: true
3636
tags: |
3737
manuelrueda/pheno-ranker-test:${{ steps.get_version.outputs.VERSION }}

README.md

Lines changed: 90 additions & 223 deletions
Large diffs are not rendered by default.

README.md.template

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
<p align="center">
2+
<a href="https://github.com/cnag-biomedical-informatics/pheno-ranker"><img src="https://raw.githubusercontent.com/cnag-biomedical-informatics/pheno-ranker/main/docs/img/PR-logo.png" width="400" alt="Pheno-Ranker"></a>
3+
</p>
4+
<p align="center">
5+
<em>Pheno-Ranker: a toolkit for comparison of phenotypic data stored in GA4GH standards and beyond</em>
6+
</p>
7+
8+
[![Build and Test](https://github.com/cnag-biomedical-informatics/pheno-ranker/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/cnag-biomedical-informatics/pheno-ranker/actions/workflows/build-and-test.yml)
9+
[![Coverage Status](https://coveralls.io/repos/github/CNAG-Biomedical-Informatics/pheno-ranker/badge.svg?branch=main)](https://coveralls.io/github/CNAG-Biomedical-Informatics/pheno-ranker?branch=main)
10+
[![CPAN Publish](https://github.com/cnag-biomedical-informatics/pheno-ranker/actions/workflows/cpan-publish.yml/badge.svg)](https://github.com/cnag-biomedical-informatics/pheno-ranker/actions/workflows/cpan-publish.yml)
11+
[![Kwalitee Score](https://cpants.cpanauthors.org/dist/Pheno-Ranker.svg)](https://cpants.cpanauthors.org/dist/Pheno-Ranker)
12+
![version](https://img.shields.io/badge/version-{{VERSION}}-28a745)
13+
[![Docker Build](https://github.com/cnag-biomedical-informatics/pheno-ranker/actions/workflows/docker-build-multi-arch.yml/badge.svg)](https://github.com/cnag-biomedical-informatics/pheno-ranker/actions/workflows/docker-build-multi-arch.yml)
14+
[![Docker Pulls](https://badgen.net/docker/pulls/manuelrueda/pheno-ranker?icon=docker&label=pulls)](https://hub.docker.com/r/manuelrueda/pheno-ranker/)
15+
[![Docker Image Size](https://badgen.net/docker/size/manuelrueda/pheno-ranker?icon=docker&label=image%20size)](https://hub.docker.com/r/manuelrueda/pheno-ranker/)
16+
[![Documentation Status](https://github.com/cnag-biomedical-informatics/pheno-ranker/actions/workflows/documentation.yml/badge.svg)](https://github.com/cnag-biomedical-informatics/pheno-ranker/actions/workflows/documentation.yml)
17+
[![License](https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg)](https://opensource.org/licenses/Artistic-2.0)
18+
[![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1n3Etu4fnwuDWNveSMb1SzuN50O2a05Rg)
19+
20+
---
21+
22+
**📘 Documentation:** <a href="https://cnag-biomedical-informatics.github.io/pheno-ranker" target="_blank">https://cnag-biomedical-informatics.github.io/pheno-ranker</a>
23+
24+
**📖 Usage:** <a href="https://cnag-biomedical-informatics.github.io/pheno-ranker/usage/" target="_blank">https://cnag-biomedical-informatics.github.io/pheno-ranker/usage/</a>
25+
26+
**📓 Google Colab tutorial:** <a href="https://colab.research.google.com/drive/1n3Etu4fnwuDWNveSMb1SzuN50O2a05Rg" target="_blank">https://colab.research.google.com/drive/1n3Etu4fnwuDWNveSMb1SzuN50O2a05Rg</a>
27+
28+
**📦 CPAN Distribution:** <a href="https://metacpan.org/pod/Pheno::Ranker" target="_blank">https://metacpan.org/pod/Pheno::Ranker</a>
29+
30+
**🐳 Docker Hub Image:** <a href="https://hub.docker.com/r/manuelrueda/pheno-ranker/tags" target="_blank">https://hub.docker.com/r/manuelrueda/pheno-ranker/tags</a>
31+
32+
**🌐 Web App UI:** <a href="https://pheno-ranker.cnag.eu" target="_blank">https://pheno-ranker.cnag.eu</a>
33+
34+
---
35+
36+
# Pheno-Ranker
37+
38+
`Pheno-Ranker` is a lightweight toolkit for semantic similarity analysis of phenotypic, clinical, and other categorical data serialized as `JSON`, `YAML`, or preprocessed `CSV`.
39+
40+
It supports GA4GH-oriented formats such as Beacon Friendly Format (`BFF`) and Phenotype Exchange Format (`PXF`), but it can also rank and compare generic JSON records beyond the biomedical domain.
41+
42+
## What It Does
43+
44+
`Pheno-Ranker` turns hierarchical records into comparable binary vectors and computes pairwise similarity or distance metrics.
45+
46+
Main workflows:
47+
48+
- **Cohort mode**: compare every individual or record against every other record in one or more cohorts.
49+
- **Patient mode**: rank records in a reference cohort against a target patient or object.
50+
- **Generic JSON mode**: compare arbitrary categorical JSON data using a configuration file.
51+
- **Precomputed mode**: reuse exported reference-cohort vectors for faster repeated patient matching.
52+
53+
## Quick Start
54+
55+
Basic cohort comparison:
56+
57+
```bash
58+
pheno-ranker -r individuals.json
59+
```
60+
61+
Patient matching:
62+
63+
```bash
64+
pheno-ranker -r individuals.json -t patient.json --max-out 10
65+
```
66+
67+
Generic JSON with a custom configuration:
68+
69+
```bash
70+
pheno-ranker -r movies.json --config movies_config.yaml --include-terms genre year
71+
```
72+
73+
Sparse Matrix Market output for large cohorts:
74+
75+
```bash
76+
pheno-ranker -r individuals.json --matrix-format mtx -o matrix.mtx
77+
```
78+
79+
Cytoscape-compatible graph export with edge filtering:
80+
81+
```bash
82+
pheno-ranker -r individuals.json --cytoscape-json graph.json --graph-max-weight 10
83+
```
84+
85+
## Selected Features
86+
87+
- Native support for `BFF` and `PXF` JSON/YAML inputs.
88+
- Generic JSON support through YAML/JSON configuration files.
89+
- Cohort and patient-ranking modes.
90+
- Hamming distance and Jaccard similarity.
91+
- Optional weighted comparisons.
92+
- Export of intermediate hashes and coverage statistics.
93+
- Sparse Matrix Market (`mtx`) output for large matrix workflows.
94+
- Direct Cytoscape-compatible graph export with edge thresholds.
95+
- QR-code utilities for compact encoded vector exchange.
96+
- Companion utilities for CSV import and BFF/PXF simulation.
97+
98+
## Output Formats
99+
100+
Common outputs include:
101+
102+
- `matrix.txt`: dense pairwise comparison matrix.
103+
- `matrix.mtx`: sparse Matrix Market output when `--matrix-format mtx` is used.
104+
- `rank.txt`: patient-mode ranking output.
105+
- `graph.json`: Cytoscape-compatible graph output.
106+
- `graph_stats.txt`: graph summary statistics.
107+
- `export.*.json`: intermediate files for inspection or precomputed workflows.
108+
109+
## Installation
110+
111+
For CPAN installation:
112+
113+
```bash
114+
cpanm Pheno::Ranker
115+
pheno-ranker --help
116+
```
117+
118+
For repository-based development:
119+
120+
```bash
121+
git clone https://github.com/cnag-biomedical-informatics/pheno-ranker.git
122+
cd pheno-ranker
123+
cpanm --notest --installdeps .
124+
bin/pheno-ranker --help
125+
```
126+
127+
Docker images are also available from Docker Hub:
128+
129+
```bash
130+
docker pull manuelrueda/pheno-ranker:latest
131+
```
132+
133+
Detailed installation instructions are available in the documentation:
134+
135+
- <https://cnag-biomedical-informatics.github.io/pheno-ranker/download-and-installation/>
136+
- Non-containerized install: <https://github.com/CNAG-Biomedical-Informatics/pheno-ranker/blob/main/non-containerized/README.md>
137+
- Docker install: <https://github.com/CNAG-Biomedical-Informatics/pheno-ranker/blob/main/docker/README.md>
138+
139+
## Documentation
140+
141+
Long-form documentation, tutorials, and use cases live in the documentation site:
142+
143+
- [Usage](https://cnag-biomedical-informatics.github.io/pheno-ranker/usage/)
144+
- [Cohort mode](https://cnag-biomedical-informatics.github.io/pheno-ranker/cohort/)
145+
- [Patient mode](https://cnag-biomedical-informatics.github.io/pheno-ranker/patient/)
146+
- [Generic JSON tutorial](https://cnag-biomedical-informatics.github.io/pheno-ranker/generic-json/)
147+
- [CSV import](https://cnag-biomedical-informatics.github.io/pheno-ranker/csv-import/)
148+
149+
The built-in CLI help remains available:
150+
151+
```bash
152+
pheno-ranker --help
153+
```
154+
155+
`--man` is deprecated and now points to the online usage documentation.
156+
157+
## Citation
158+
159+
If you use `Pheno-Ranker` in published work, please cite:
160+
161+
Leist, I.C. et al. (2024). *Pheno-Ranker: a toolkit for comparison of phenotypic data stored in GA4GH standards and beyond*. BMC Bioinformatics. <https://doi.org/10.1186/s12859-024-05993-2>
162+
163+
## Author
164+
165+
Manuel Rueda, PhD. CNAG: <https://www.cnag.eu>

0 commit comments

Comments
 (0)