Skip to content
brsynthPublic

About

Rank rpSBML pathways (with embedded scores)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

rpRank

Rank a list of pathways according to their global score.

Input

Positional arguments:

  • pathways: (list of string) Paths to pathway (rpSBML) files

Optional arguments:

  • delimiter: (string) CSV delimiter character

Installation Guide

Overview

rprank depends on rplibs, which depends on cobra, which requires python-libsbml. On Apple Silicon (arm64) macOS, python-libsbml is not available as a native Conda package.

Therefore, installation must be done using an Intel (osx-64) Conda environment under Rosetta.


General case

conda install -c conda-forge rprank

Apple Silicon macOS (M1/M2/M3)

1. Install Rosetta 2

softwareupdate --install-rosetta --agree-to-license

2. Install rpRank

CONDA_SUBDIR=osx-64 conda install -c conda-forge rprank

Or with mamba:

CONDA_SUBDIR=osx-64 mamba install -c conda-forge rprank

3. Persist platform setting

conda config --env --set subdir osx-64

4. Verify installation

python -c "import rprank; print('rprank installed successfully')"

5. (Optional) Dev installation

CONDA_SUBDIR=osx-64 conda env create -f environment.yaml

Troubleshooting

Solver fails on Apple Silicon

Make sure you are using:

CONDA_SUBDIR=osx-64

Wrong architecture environment

Check:

conda config --show subdir

Expected output:

subdir: osx-64

Run

From Python code

from rplibs import rpPathway
from rprank import rank

pathways = {}
for pathway_fname in ["pathway_1.xml", "pathway_2.xml"]:
    pathway = rpPathway(infile=pathway_fname)
    pathways[pathway.get_id()] = {"pathway": pathway, "filename": pathway_fname}

sorted_pathways = rank(pathways)

From CLI

python -m rprank --pathways <pathway_1> <pathway_2> ...

Tests

Test can be run with the following commands:

Natively

cd tests
pytest -v

Authors

  • Jean-Loup Faulon
  • Joan Hérisson

Acknowledgments

  • Thomas Duigou

Licence

rpRank is released under the MIT licence. See the LICENSE file for details.

About

Rank rpSBML pathways (with embedded scores)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages