HEIDI

File format

HEIDI reads genotype data in binary PLINK format. Missing genotype data is imputed by average.

Phenotype and covariate files should have at least 3 columns, where the first and second columns match the fam file. Currently, HEIDI does not handle missing values in the phenotype and covariate files.

Usage

HEIDI uses the following flags:

  --bfile arg           prefix for BIM/BED/FAM PLINK files
  --pheno arg           file for phenotypes
  --mpheno arg          which phenotype column to use (>=1, default:1)
  --covar arg           file for covariates
  --out arg             prefix for output file
  --id arg              region id

  --chr arg             chromosome ('genomewide' estimates the total
                        heritability)

  --from-kb arg         select region from this position (kb)
  --to-kb arg           up to this position (kb)

  --from arg            select region from this SNP (rsid)
  --to arg              to this SNP (must be on the same chromosome)

  --rrm-genome arg      Realized Relationship Matrix for the whole-genome

  --nsteps arg          number of iterations in grid search (default:20)
  --log arg             log file
  --maxmem arg          maximum Gb RAM usage allowed (default: 2)

Input and output file flags

--bfile: Prefix for the binary PLINK files. “example” is the prefix for “example.bim”, “example.bed” and “example.fam”.
--pheno: Phenotype file. If this flag is not used HEIDI looks for “prefix.pheno” file, eg: “example.pheno”
--covar: Covariate files. If this flag is not used HEIDI looks for “prefix.covar” file, eg: “example.covar”

--out: Prefix for the output file, eg: “~/results/test
--id: This flag is required if a region will be specified and is used to index the region on the chromosome.

Region specifications

--chr: Chromosome, should match the bim file.

--from-kb and --to-kb: Start and end kilobase positions for the genomic region at the specified chromosome.
--from and --to: Region is specified by the rsids of the start and end SNPs.

Additional options

--rrm-genome: File for the Realized Relationship Matrix for the whole-genome. This option can be used to save time for computing the genome-wide kinship among the individuals.
--nsteps: Number of iterations to be used in HEIDI's internal optimization scheme.
--log: Log file.
--maxmem: Maximum allowed memory usage in Gb.

Whole genome heritability estimation

./heidi --bfile ~/data/example --chr genomewide --out ~/results/test

In this example HEIDI reads these files:
~/data/example.bim
~/data/example.bed
~/data/example.fam
~/data/example.pheno
~/data/example.covar

and generates these files:
~/results/test.GW, contains the heritability estimate due to whole genome.
~/results/test.GW.log, output log file.

Whole chromosome heritability estimation

This example estimates the heritability contribution of chromosome 3.

./heidi --bfile ~/data/example --chr 3 --out ~/results/test

In this example HEIDI reads these files:
~/data/example.bim
~/data/example.bed
~/data/example.fam
~/data/example.pheno
~/data/example.covar

and generates these files:
~/results/test.chr3, contains the heritability estimates for chromosome 3 and the genetic background.
~/results/test.chr3.log, output log file.

Genomic region heritability estimation

This example estimates the heritability contribution from the first 50Mb region on chromosome 2.

./heidi --bfile ~/data/example --chr 2 --from-kb 0 --to-kb 50000 --id 1 --out ~/results/test

In this example HEIDI reads these files:
~/data/example.bim
~/data/example.bed
~/data/example.fam
~/data/example.pheno
~/data/example.covar

and generates these files:
~/results/test.chr2.region1, contains the heritability estimates for the specified region on chromosome 2 and its genetic background.
~/results/test.chr2.region1.log, output log file.

Normalization of heritability estimates

We mitigate the effect of linkage disequilibrium on heritability estimates by using the following normalization scheme. First, we estimate the total heritability, followed by estimating the contributions of the chromosomes and scaling their contributions such that their sum equals to the total heritability. Next, we estimate the heritability contributions of the regions and in each chromosome, normalize the regions’ contributions such that their sum equals to the normalized chromosomal contribution.

Once the heritability estimates are obtained, the script heidiNormalize.py can be used to perform the normalization:

python heidiNormalize.py outputPrefix

eg: python heidiNormalize.py ~/results/test