The Hi-MC package provides high-level mitochondrial haplogroups given standard PLINK .map and .ped files.
install.packages("devtools")
library("devtools")
install_github("vserch/himc")
library("HiMC")
Hi-MC also relies on the stringr package.
The Hi-MC package takes in standard PLINK .map and .ped files as arguments. The .map file should have 4 columns and the .ped file should have 2V+6 columns, where V is the number of variants.
Classifying your subjects is a 2-step process. First, input your .map and .ped files into Hi-MC:
snp_data_frame <- HiMC::generate_snp_data("my_subjects.map","my_subjects.ped")
Then, load the haplogroup tree nodes, and run the classifier:
data(nodes)
classifications <- HiMC::getClassifications(snp_data_frame)
From there, explore the data frame in R, or export it to CSV:
write.csv(classifications,"classifications.csv",row.names=FALSE)
The classification tree was built using 54 specifically curated SNPs. If your dataset is missing more than a few of them, your results will not be accurate. These SNPs referenced are:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.