Skip to main content

A novel method for assessing and measuring homophily in networks

Project description

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

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.

Project details


Download files

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

Source Distribution

honto-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

File details

Details for the file honto-0.1.0.tar.gz.

File metadata

  • Download URL: honto-0.1.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.6

File hashes

Hashes for honto-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aced03a1f71549cd6fcb98fe090cb6ba7439369ef7cd411573fd7698b31140cc
MD5 a1ef95a180f78dd7aeb68de931572db4
BLAKE2b-256 c33e53bd38ec2f90cee248dec2797d1773ebcbc3855778e5f83311afa816f84a

See more details on using hashes here.

Supported by

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