Skip to content

A python script to compute genomic inflation factor

Notifications You must be signed in to change notification settings

pgxcentre/lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

A python script to compute genomic inflation factor

compute_lambda.py is small script to compute lambda (the genomic inflation factor) from a GWAS result.

Dependencies

The tool requires a standard Python installation (version 2 or 3) with the following packages:

  1. pandas version 0.17 or latest

The tool has been tested on Linux only, but should also work on both Mac OSX and Windows.

Usage

Using either python or python3:

$ python compute_lambda.py --help
usage: compute_lambda.py [-h] [-v] -i FILE [FILE ...] [-d DELIM] [-w] -f NAME
                         [--snp-field NAME] [--chi2] [--p-value] [--one-sided]
                         [-e FILE]

Compute inflation factor (lambda) in GWAS results.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

INPUT FILES:
  -i FILE [FILE ...], --input FILE [FILE ...]
                        The list of files containing GWAS results.
  -d DELIM, --delim DELIM
                        The field delimiter (default is a tabulation).
  -w, --whitespace      The file is delimited by white spaces (e.g. Plink
                        results).
  -f NAME, --field NAME
                        The name of the field containing the statistics.
  --snp-field NAME      The name of the field containing the SNP name.

GENERAL OPTIONS:
  --chi2                Statistics were computed using a chi-squared
                        distribution.
  --p-value, -p         Flag to use the p-value instead of the statistic. This
                        assumes a standard normal distribution for the test
                        statistic.
  --one-sided           Flag for one-sided tests (when using p-values to
                        compute the inflation factor)

SUBSET OPTIONS:
  -e FILE, --extract FILE
                        A file containing markers to extract for the analysis
                        (only one marker per line).