View source: R/HapDipKinship.R
KIMGENSThresholdChooser | R Documentation |
Output number of reference given a certain threshold
KIMGENSThresholdChooser(
kins,
ploidy,
thresholds = c(0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45)
)
kins |
A data frame generated by kinship |
ploidy |
A data frame with two columns. First column is id (same as column names of genotype matrix). Second column is ploidy (1 or 2). Guess ploidy if not provided. |
thresholds |
A vector of proposed kinship thresholds for defining "relatives" in KIMGENS kinship. |
This functions helps user to decide the threshold for KIMGENS. By examining the output violin plot users can identify how many references can be used for each individual given a threshold. We recommend choosing a threshold resulting in on average 4 to 5 references and no individuals having 0 references.
A violin plot
ancestrygenomatrix<-PopulationSim(1000,c(0.05,0.15,0.25))
ancestry<-matrix(c(6,2,0.3,2,6,0.3),nrow=3)
pedgeno<-HapdipPedigreeSim(ancestrygenomatrix,pedigree[1:18,],ancestry)
kins<-kinship(pedgeno,skipKIMGENS=T)
ploidy<-data.frame(id=pedigree$id,ploidy=ifelse(pedigree$sex=="F",2,1))
KIMGENSThresholdChooser(kins,ploidy)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.