①Sample missing rateの図示
各SNPにおけるサンプル欠損率を図示
data_imiss <- read.table("/Users/iden/2025_kadai/plink_results.imiss", header = TRUE)
imiss_plot <- ggplot(data_imiss, aes(x = F_MISS)) +
geom_histogram(bins = 10, fill = "blue") +
labs(title = "Sample missing rate", x = "sample missing rate", y = "Count") + theme_minimal()
imiss_plot
②SNP missing rateの図示
各サンプルにおけるSNP欠損率を図示
data_lmiss <- read.table("/Users/iden/2025_kadai/plink_results.lmiss", header = TRUE)
lmiss_plot <- ggplot(data_lmiss, aes(x = F_MISS)) +
geom_histogram(bins = 10, fill = "skyblue") +
labs(title = "SNP missing rate", x = "SNP missing rate", y = "Count") +
theme_minimal()
lmiss_plot
③F hetの図示
各サンプルの近親交配係数Fの図示
data_het <- read.table("/Users/iden/2025_kadai/plink_results.het", header = TRUE)
het_plot <- ggplot(data_het, aes(x = F)) +
geom_histogram(bins = 30, fill = "steelblue") +
geom_vline(xintercept = c(-0.1, 0.1), color = "red", linetype = "dashed", size = 1) +
labs(title = "F_het", x = "F_het", y = "Count") + theme_minimal()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
het_plot