if (FALSE) {
bedfile <- system.file("extdata", "example.bed", package = "bigsnpr")
plink <- download_plink()
bedfile <- snp_plinkIBDQC(plink, bedfile,
bedfile.out = tempfile(fileext = ".bed"),
ncores = 2)
df_rel <- snp_plinkIBDQC(plink, bedfile, do.blind.QC = FALSE, ncores = 2)
str(df_rel)
library(ggplot2)
qplot(Z0, Z1, data = df_rel, col = RT)
qplot(y = PI_HAT, data = df_rel) +
geom_hline(yintercept = 0.2, color = "blue", linetype = 2)
snp_plinkRmSamples(plink, bedfile,
bedfile.out = tempfile(fileext = ".bed"),
df.or.files = subset(df_rel, PI_HAT > 0.2))
}
Run the code above in your browser using DataLab