-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4_IBD_dCorIT.R
40 lines (24 loc) · 1004 Bytes
/
4_IBD_dCorIT.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Load all necessary functions for this script
source("4_IBD_Utilitty_Functions.R")
# Load population data, sample data, reconstructed partitions, and the distance matrices.
load("sample_data.RData")
load("dists.RData")
# dCorIT profile
# Reclassifying case sequences based on their true carrier status
#
SeqID = c( sample_data$CaseHapID, sample_data$ControlHapID )
Status = Case_reclassify(sample_data)
CClabels = data.frame( SeqID = SeqID, Status = Status )
dCorIT = dCor_Profile(cc_sample = CClabels, distance_matrix_list = dists )
# Save the results
save(x = dCorIT, file = "dCorIT.RData")
# Optional: Saving profile plots automatically
pdf(file = "dCorIT.pdf", paper = "a4")
plot( x = sample_data$Posn$SNV_Position/1000,
y = dCorIT,
xlab = "SNV Positions (Kbp)",
ylab = "dCor",
main = "dCorIT" )
abline(v = 900, col = "red")
abline(v = 1100, col = "red")
dev.off()