Skip to content
/ honto Public

A novel method for assessing and measuring homophily in networks

License

Notifications You must be signed in to change notification settings

cumbof/honto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

honto

HOmophily Network TOol

honto is a tool designed for assessing and measuring homophily in networks whose nodes have categorical attributes, namely when the nodes of networks come partitioned into classes.

Homophily evaluation is performed through the comparison between the relative edge density of the subgraphs, induced by each class, and the corresponding expected relative edge density under a null model.

The novelty of our approach consists in prescribing an endogenous null model, namely, the sample space of the null model is built on the input network itself. This allows us to give exact explicit expressions for the z-scores of the relative edge density of each class as well as other related statistics.

Install

The tool is available through pip and conda. Please, use one of the following commands to start working with honto:

# Install with pip
pip install honto

# Install with conda
conda install -c conda-forge honto

Please note that honto is also available as a Galaxy tool. It's wrapper is available under the official Galaxy ToolShed at https://toolshed.g2.bx.psu.edu/view/fabio/honto

Usage

Once installed, you can start running honto by specifying some arguments:

honto --input_edges ~/edges.txt \
      --input_nodes ~/nodes.txt \
      --verbose

List of standard arguments:

--input_edges           -- Path to the file with the list of edges
--input_nodes           -- Path to the file with nodes and colors
--weight_threshold      -- Threshold for considering edges based in their weight
--isolated              -- Insert isolated nodes
--nproc                 -- Make the computation of the z-scores parallel for singletons
--overwrite             -- Overwrite results if already exist
--verbose               -- Print results in real time
-v, --version           -- Print current honto version and exit

List of arguments for log-transforming z-scores:

--log_transform     -- Log-transform z-scores
--scale_factor      -- Rescale z-scores with this constant before log-transforming values
--scale_from_one    -- Set z-scores to 1 if lower than 1 before log-transforming values

List of arguments for customizing the heatmap

--cmap      -- Heatmap colormap
--vmin      -- Min value to anchor the colormap
--vmax      -- Max value to anchor the colormap
--center    -- The value at which to center the colormap when plotting divergant data
--cbar      -- Whether to draw a colorbar

Credits

Please credit our work in your manuscript by citing:

Nicola Apollonio, Daniel Blankenberg, Fabio Cumbo, Paolo G Franciosa, and Daniele Santoni. Evaluating homophily in networks via HONTO (HOmophily Network TOol): a case study of chromosomal interactions in human PPI networks. Bioinformatics, 39(1), 2023, https://doi.org/10.1093/bioinformatics/btac763

Nicola Apollonio, Paolo G Franciosa, and Daniele Santoni. A novel method for assessing and measuring homophily in networks through second-order statistics. Scientific reports, 12(1):1–18, 2022, https://doi.org/10.1038/s41598-022-12710-7

Contributing

Long-term discussion and bug reports are maintained via GitHub Issues, while code review is managed via GitHub Pull Requests.

Please, (i) be sure that there are no existing issues/PR concerning the same bug or improvement before opening a new issue/PR; (ii) write a clear and concise description of what the bug/PR is about; (iii) specifying the list of steps to reproduce the behavior in addition to versions and other technical details is highly recommended.

About

A novel method for assessing and measuring homophily in networks

Topics

Resources

License

Stars

Watchers

Forks

Languages