Skip to main content

MultiXrank - Universal Multilayer Exploration by Random Walk with Restart. MultiXrank is a Python package for the exploration of heterogeneous multilayer networks, with random walk with restart method. It permits prioritization of nodes between full heterogeneous networks, whatever their complexities.

Project description

https://img.shields.io/pypi/v/multixrank.svg https://img.shields.io/pypi/pyversions/multixrank.svg https://readthedocs.org/projects/multixrank-doc/badge/?version=latest https://github.com/anthbapt/multixrank/workflows/CI/badge.svg

MultiXrank is a Python package for the exploration of heterogeneous multilayer networks, with random walk with restart method. It permits prioritization of nodes between full heterogeneous networks, whatever their complexities. If you use MultiXrank in scientific works, please cite the following article:

Baptista, A., González, A., Baudot, A. Universal multilayer network exploration by random walk with restart. Commun Phys 5, 170 (2022)

https://doi.org/10.1038/s42005-022-00937-9

The scripts used in the paper and adaptable for your own applications of MultiXrank are available there: https://github.com/anthbapt/multixrank-tools

Commands for a quick installation:

conda create --name multixrank python=3.10 -y
python3 -m pip install multixrank

Commands for a quick working example in the python console:

import multixrank
multixrank.Example().write(path="airport")

This generates a working example based on the “airport” multiplex:

`-- airport
    |-- bipartite
    |   |-- 1_2.tsv
    |   |-- 1_3.tsv
    |   `-- 2_3.tsv
    |-- config_minimal.yml
    |-- multiplex
    |   |-- 1
    |   |   |-- FR26.tsv
    |   |   |-- FR3.tsv
    |   |   |-- FR3_2.tsv
    |   |   `-- FR7.tsv
    |   |-- 2
    |   |   |-- UK15.tsv
    |   |   |-- UK26.tsv
    |   |   `-- UK3.tsv
    |   `-- 3
    |       |-- G1.tsv
    |       |-- G24.tsv
    |       `-- G6.tsv
    `-- seeds.txt

The minimal configuration file ‘config.yml’ looks like this.

multiplex:
    1:
        layers:
            - multiplex/1/FR26.tsv
            - multiplex/1/FR3.tsv
            - multiplex/1/FR7.tsv
    2:
        layers:
            - multiplex/2/UK15.tsv
            - multiplex/2/UK26.tsv
            - multiplex/2/UK3.tsv
    3:
        layers:
            - multiplex/3/G1.tsv
            - multiplex/3/G24.tsv
            - multiplex/3/G6.tsv
bipartite:
    bipartite/1_2.tsv:
        source: 1
        target: 2
    bipartite/1_3.tsv:
        source: 1
        target: 3
    bipartite/2_3.tsv:
        source: 2
        target: 3
seed:
    seeds.txt
import multixrank
multixrank_obj = multixrank.Multixrank(config="airport/config_minimal.yml", wdir="airport")
ranking_df = multixrank_obj.random_walk_rank()
multixrank_obj.write_ranking(ranking_df, path="output_airport")
multixrank_obj.to_sif(ranking_df, path="output_airport/airport_seed7_top3.sif", top=3)

This runs the software and writes the results to the output_airport folder:

$ ls output_airport/
airport_seed7_top3.sif  multiplex_1.tsv  multiplex_2.tsv  multiplex_3.tsv

There is a ranking file for each multiplex:

$ head -n 4 output_airport/multiplex_1.tsv
multiplex   node    score
1   7       0.250002565842259
1   169     0.0025983048938841304
1   199     0.0018837852068513332

The MultiXrank documentation is hosted at ReadTheDocs.

MultiXrank is maintained by Anthony Baptista (anthony dot baptista at qmul dot ac dot uk)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multixrank-0.3.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multixrank-0.3-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file multixrank-0.3.tar.gz.

File metadata

  • Download URL: multixrank-0.3.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for multixrank-0.3.tar.gz
Algorithm Hash digest
SHA256 73dc29a1ec9325e59ae465d50eadffa507ce084c427a669f02bfdaa32eec5de0
MD5 070e30b7756f5a23b951fdab903f365a
BLAKE2b-256 063d457c3b3fd3ad9e43be1a642a3c9bb8a8f03ca368cf42c0fd84a977f27b14

See more details on using hashes here.

File details

Details for the file multixrank-0.3-py3-none-any.whl.

File metadata

  • Download URL: multixrank-0.3-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for multixrank-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 51d95c84729c7b6db321df5406cb0ed5038cb6d7cb09c4414db1240271235e8a
MD5 26eff443adcf3cc8a2f824bf80d032eb
BLAKE2b-256 d887615a5fc4181510848ade28d25e558ca3e875fe7488cddd85068e54542092

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page