Rank a list of pathways according to their global score.
Positional arguments:
- pathways: (list of string) Paths to pathway (rpSBML) files
Optional arguments:
- delimiter: (string) CSV delimiter character
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.
conda install -c conda-forge rpranksoftwareupdate --install-rosetta --agree-to-licenseCONDA_SUBDIR=osx-64 conda install -c conda-forge rprankOr with mamba:
CONDA_SUBDIR=osx-64 mamba install -c conda-forge rprankconda config --env --set subdir osx-64python -c "import rprank; print('rprank installed successfully')"CONDA_SUBDIR=osx-64 conda env create -f environment.yamlMake sure you are using:
CONDA_SUBDIR=osx-64Check:
conda config --show subdirExpected output:
subdir: osx-64From 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> ...Test can be run with the following commands:
cd tests
pytest -v- Jean-Loup Faulon
- Joan Hérisson
- Thomas Duigou
rpRank is released under the MIT licence. See the LICENSE file for details.