Cagatay Dursun, Jake Petrie




PhenoGeneRanker is a gene and phenotype prioritization tool that utilizes random walk with restart (RWR) on a multiplex heterogeneous gene-phenotype network. PhenoGeneRanker allows multi-layer gene and phenotype networks. It also calculates empirical p-values of gene ranking using random stratified sampling of genes/phenotypes based on their connectivity degree in the network. It is based on the work from the following paper:

Cagatay Dursun, Naoki Shimoyama, Mary Shimoyama, Michael Schläppi, and Serdar Bozdag. 2019. PhenoGeneRanker: A Tool for Gene Prioritization Using Complete Multiplex Heterogeneous Networks. In Proceedings of the 10th ACM International Conference on Bioinformatics, Computational Biology and Health Informatics (BCB ’19). Association for Computing Machinery, New York, NY, USA, 279–288. DOI:

Install and Load PhenoGeneRanker

You can install and load the package by running the following commands on an R console:


Using the Functions

Input File Formatting

The CreateWalkMatrix function takes in an input file as a parameter. This file is a “.txt” file with two tab-separated columns which holds the network files that PhenoGeneRanker utilizes. The header row should be “type” and “file_name”. The type column contains the type of the network file. It can be gene, phenotype, or bipartite. The file_name column stores the name of your network file along with the “.txt” extension. Any number of gene or phenotype files can be used theoretically, but there are practical limits which depend on the capacity of the computer that will run the PhenoGeneRanker.

An example input file is shown below:

Inside each of the file_name files, there are three tab-separeted columns with header “from”, “to”, and “weight”. For the gene and phenotype networks, the “from” and “to” columns will contain the ids of the genes and phenotypes. The “weight” column stores the weight of the relationship between the nodes. If the network is unweighted then weight column should be 1 for all interactions. For the bipartite file, the “from” column must contain gene ids and the “to” column must have phenotype ids.

An example gene network is shown below:

An example phenotype network is shown below:

An example bipartite network is shown below:


This function generates a walk matrix (transition matrix) using the gene, phenotype and bipartite networks given in the inputFileName. It has to be a ‘.txt’ file. Instructions on how to format the input file and the necessary data files can be found in the input file formatting section above.

Other parameters have default values. The parameter numCores is the number of cores used for parallel processing, it defaults to a value of 1. The parameter delta is the probability of jumping between gene layers, and its default value is 0.5. The parameter zeta is the probability of jumping between phenotype layers, and its default value is 0.5. The parameter lambda is the inter-network jump probability, and its default value is 0.5.

It outputs a list variable which is used by RandomWalkRestart() function.

This function returns a list containing the walk matrix, a sorted list of genes, a sorted list of phenotypes, the connectivity degree of the genes, the connectivity degree of the phenotypes, the number of gene layers, the number of phenotype layers, the number of genes and the number of phenotypes. You can access each of these elements as shown below.


This function runs the random walk with restart by utilizing the output of CreateWalkMatrix function and gene/phenotype seeds as inputs, and returns the rank of genes/phenotypes with RWR scores and associated p-values if generatePvalue parameter is TRUE. geneSeeds and phenoSeeds parameters are vector type and stores the ids of genes and phenotypes that RWR starts its walk. generatePValues determines the generation of P-values along with the ranks of genes and phenotypes. If the parameter generatePvalue is FALSE, the function returns a data frame including sorted genes/phenotypes by rank and the RWR scores of the genes/phenotyeps. If generatePvalue is TRUE then it generates p-values along with the ranks with respect to offset rank of 100, please see the paper for details.

The parameter numCores takes the number of cores for parallel processing. If generatePvalue parameter is TRUE then it is strongly recommended to use all available cores in the computer for shorter run time. Emprical p-values are calculated based on 1000 runs for random gene/phenotype seeds in the network. Number of random runs can be modified using parameter S.

In order to control the restart probability of RWR, you can change the r parameter value, and it has a default value of 0.7.

The parameter eta controls restarting of RWR either to a gene seed or phenotype seeds, higher eta means utilizing phenotype network more than gene network, and it has a default value of 0.5.

The parameter tau is a vector that stores weights for each of the ‘gene’ layer. Each value of the vector corresponds to the order of the gene layers in the inputFileName parameter of CreateWalkMatrix function. The sum of the weights in the tau parameter must sum up to the same number of gene layers. phi is a vector that stores weights for each of the ‘phenotype’ layer and it has the similar functionality of tau parameter for phenotypes. Default values of the two parameters give equal weights to all layers.

Below you can find different examples for RandomWalkRestart function calls: