Provides functions for bioinformatic analysis: calculating linear principal components from numeric data and single-nucleotide polymorphism (SNP) datasets, calculating the fixation index (Fst) with the Hudson method

KRIS (Keen and Reliable Interface Subroutines for
bioinformatic analysis) is an R package for common steps in the analysis of
numeric and SNP data. It can:
Install the released version from CRAN:
install.packages("KRIS")
Or install the development version from GitHub:
install.packages("remotes")
remotes::install_github("kridsadakorn/kris", dependencies = TRUE)
The reference manual is at https://www.biostatgen.org/kris/.
Load the package and the example data:
library(KRIS)
data(example_SNP)
example_SNP holds two objects: the simulated SNP data simsnp and the
population label of each individual, sample_labels.
summary(simsnp)
#> Length Class Mode
#> snp 206000 -none- numeric
#> snp.info 6 data.frame list
#> ind.info 6 data.frame list
summary(sample_labels)
#> Length Class Mode
#> 103 character character
Calculate the first three principal components:
PCs <- cal.pc.linear(simsnp$snp, no.pc = 3)
Plot them in three views, colored by population:
plot3views( PCs$PC, sample_labels)