The aims of the scripts in this repository are: 1. To project PC calculated from HapMap III onto HUNT, 2. And calculate PC in HUNT (QC has been previously done)
hapmap_related.txtcontains a list of HapMap IDs to exclude due to relatednesspca_hapmap.eigenvec.varcontains the weitghts of 10 PC from HapMap.
extract_mom_samples.Rto extract samples list for mothers, fathers and children into different fileshunt_geno_range.Rto extract typed genetic variants from HUNThapmap.shto perform PCA in HapMap samples. Depends on:sub_unrelated.Rto obtain a list of unrelated samplessub_hapmap_bim.Rto modify HapMap bim variant ID
hapmap_pca_projection.shto project HUNT samples onto HapMap III PCspca_hunt.shto calculate PC in unrelated HUNT samples (mothers, fathers and children independenlty), and project all samples into the PC weights. Depends on:sub_unrelated.Rto obtain a list of unrelated samples
- Extract list of HUNT genotyped variants (chr and pos)
- Select unrelated samples from HapMap III and HUNT
- Merge HapMAP III and HUNT datasets
- Run PCA (MAF >0.01).
- Split maternal, paternal and offsping samples
- Select unrelated samples from HUNT and run PCA in genotyped variants
- Project all HUNT samples onto PCs