Heritability is the proportion of variation in a trait within a population that can be attributed to genetic differences. There are two type of definition and Nanow-sense Heritability is the common one.
Broad-sense Heritability
H2=VG+VEVG=VPVG
VP is phenotype variation
VG is genetic variation
VE is environment
H2=VPVG
Nanow-sense Heritability
h2=VPVA,whereVG=VA+VNA
VA is additive genetic variation
VNA is non-addrive genetic variation
Example-Dominant Coding
In dominant coding, genotypes CC, CT and TT are coded as 1, 1 and 0, respectively, if C is the minor allele.
Example-Epistasis
Labrador coat color is determined by two genes with four genotypes: BE, bE, Be, be
Color is black when genotype is B−E−
Color is chocolate when genotype is bbE−
Color is yellow when genotype is −−ee
Note
Heritability refers to a specific population, not to individuals.
Heritability = inheritance. For example, your brown hair may be inherited from your father, but the heritability of brown hair in the population may be low.
Heritability = total genetic contribution. A low h2=VPVA does not necessarily mean that genetics plays a small role.
If h2 is low, identifying associated genes might be less fruitful.
There are 3 common types of heritability.
Family-Based Heritability (hfamily2)
Family-based studies, often twin studies, estimate heritability by comparing monozygotic (MZ) twins and dizygotic (DZ) twins. Let rMZ be the phenotypic correlation for MZ twins and rDZ for DZ twins.
{rMZ=A+CrDZ=2A+C
where
A is additive genetic effect
C is shared (common) environmental effect
We esitmate
hfamily2C=A=2(rMZ−rDZ)=A−rMZ
error E=1−C and A+C+E=1
SNP-Based Heritability (hSNP2)
Estimated using tools such as GCTA under the mixed linear model
We estimate σg2 using REML (Restricted Maximum Likelihood). The proportion of phenotypic variance explained by the SNPs used to construct the GRM is given by
This estimates heritability using only the significant SNPs identified in GWAS. Assuming m significant SNPs are linearly associated with the trait
Y=β0+i=1∑mβiXi+ε
The heritability is
hGWAS 2=Var(Y)Var(Y^)
Relationship Between Heritability Types
hfamily 2>hSNP 2>>hGWAS 2
This gap is known as missing heritability.
Code
We used the gcta64 command to estimate the Genetic Relationship Matrix (GRM) for each of the 22 chromosomes separately. Compared to estimating the GRM for all autosomes together, we found that the results are identical. However, the former method took approximately two and a half hours, significantly longer than the latter, which required only ten minutes.
## estimate h^2_SNPgetwd()setwd("D:/GWAS_CLASS/GCTA")## step0: split snp data to different chrfor(iin1:22){system(paste0("gcta64 --bfile D:/GWAS_CLASS/20101123/process/merge --chr ",i," --make-bed --out D:/GWAS_CLASS/GCTA/data/merge_chr",i))}## step1: make GRM # --maf: filter SNPs# --make-grm: make GRM# --thread-num: Parallel computation. You should generally not specify a number of threads that exceeds the number of physical cores.for(iin1:22){system(paste0("gcta64 --bfile D:/GWAS_CLASS/20101123/process/merge --chr ",i," --maf 0.01 --make-grm --out D:/GWAS_CLASS/GCTA/data/merge_chr",i," --thread-num 10"))}## step2: build grm_chrs.txt put in all chr GRM file name writeLines(paste0("D:/GWAS_CLASS/GCTA/data/merge_chr",1:22),"D:/GWAS_CLASS/GCTA/grm_list.txt")## step3: merge all the GRMs by the following command:system("gcta64 --mgrm D:/GWAS_CLASS/GCTA/grm_list.txt --make-grm --out D:/GWAS_CLASS/GCTA/data/grm_merge")## step4: remove cryptic relatedness: 0.025 roughly corresponds to individuals who are less related than third-degreesystem("gcta64 --grm D:/GWAS_CLASS/GCTA/data/grm_merge --grm-cutoff 0.025 --make-grm --out D:/GWAS_CLASS/GCTA/data/grm_merge_filtered")## step5: estimating the variance explained by the SNPs (heritability)### input: GRM in step 3 (grm_merge) + phenotype info (pheno.txt)system("gcta64 --grm D:/GWAS_CLASS/GCTA/data/grm_merge_filtered --pheno D:/GWAS_CLASS/20101123/process/pheno.txt --reml --out D:/GWAS_CLASS/GCTA/data/grm_merge_filtered --thread-num 10")