Skip to content

maffleur/NETPAGE

Repository files navigation

NETPAGE

NETPAGE (NETwork Propagation-based Assessment of Genetic Events) is a novel computational framework for gene-based association testing of rare variants that integrates prior knowledge about tissue-specific gene interaction networks (Scelsi et al., PLOS Comp Biol 2021, in press; DOI: 10.1371/journal.pcbi.1008517).

The framework combines network propagation with sparse regularised regression. Here we provide a Python module to perform network propagation.

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need Python 2.7 to use this module. A list of module dependencies can be found in the requirements.txt file.

Installation

No installation is required. Just clone this repo to your machine, make sure you have all the packages needed, and you're ready to go!

Help page

python RunNetworkSmoothingParser.py -h
usage: RunNetworkSmoothingParser.py [-h] [-v] -i INPUTNET -g GENEBURDEN --typ
                                    {binary,burden} --scope
                                    {entrezgene,ensembl.gene,ensembl.protein}
                                    [-o OUTCOME]
                                    [-e {void_protectives,void_risks,invert_protectives,logOR,none}]
                                    [-t TOL] [-a ALPHA] [-s] [--binarynet]
                                    [-p PERCENTAGE] [--edgeremoval]
                                    [--probremoval PROBREMOVAL] [-r]
                                    [--nrand NRAND] [--quantile]
                                    [--pathway PATHWAY] [--plots]

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -i INPUTNET, --inputnet INPUTNET
                        Path and name of the input network file (required)
                        
  -g GENEBURDEN, --geneburden GENEBURDEN
                        Path and name of the gene burden table file (required)
                        
  --typ {binary,burden}
                        Type of rare variant encoding (options allowed: binary, burden; required)
                        
  --scope {entrezgene,ensembl.gene,ensembl.protein}
                        Gene naming convention used in the network file.
                        Needed to map gene IDs to HGNC symbols.
                        
  -o OUTCOME, --outcome OUTCOME
                        File storing the outcome wrt which direction of effect must be considered (required)
                        
  -e {void_protectives,void_risks,invert_protectives,logOR,none}, --effect {void_protectives,void_risks,invert_protectives,logOR,none}
                        How do you want to deal with direction of effects? (case-sensitive, default "none")
                        * "void_protectives": set to 0 the mutation status/burden of protective genes
                        * "void_risks": set to 0 the mutation status/burden of risk genes
                        * "inversion": set mutation status to -1 for protective, +1 for risk genes
                        * "logOR": replace mutation status with logOR from Fisher test
                        * "none": do nothing
                        
  -t TOL, --tol TOL     Convergence threshold for network smoothing (float, default 1e-6)
                        
  -a ALPHA, --alpha ALPHA
                        Diffusion distance allowed for a mutation signal through the network (float, default 0.5).
                        Multiple values not allowed
                        
  -s, --selfloops       Should the network have self loops? (default False)
                        
  --binarynet           Binarize the weighted network to an adjacency matrix;
                        pick only the top p% edges, as supplied with -p (default False)
                        
  -p PERCENTAGE, --percentage PERCENTAGE
                        Percentage of top edges to retain when binarising the network (float, default 1)
                        
  --edgeremoval         For each gene, remove a random edge with probability p-rem,as supplied with --prob_removal (default False)
                        
  --probremoval PROBREMOVAL
                        Probability of randomly removing an edge incident on a gene (default 0.1)
                        
  -r, --randomnet       If present, perform degree-preserving randomisation of the network after binarisation
                        
  --nrand NRAND, -n NRAND
                        How many replicates of the randomised network? (default 30)
                        
  --quantile, -q        Quantile-normalise the smooth profile's rows (default False)
                        
  --pathway PATHWAY, -pw PATHWAY
                        Restrict network and mutation burden to genes in a pathway.
                        Please provide name of the file containing the list of genes in the desired pathway
                        (one gene per line)
                        
  --plots, -pl          Plot a heatmap of the network? (default False)

About

Source code for network propagation

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages