if (FALSE) {
# (Almost) all standard haplin runs can be done with haplinSlide.
# Below is an illustration. See the haplin help page for more
# examples.
#
# 1. Read the data:
my.haplin.data <- genDataRead( file.in = "HAPLIN.trialdata.txt", file.out =
"trial_data1", dir.out = tempdir( check = TRUE ), format = "haplin", n.vars = 0 )
# 2. Run pre-processing:
haplin.data.prep <- genDataPreprocess( data.in = my.haplin.data,
format = "haplin", design = "triad", file.out = "trial_data1_prep",
dir.out = tempdir( check = TRUE ) )
# 3. Analyze:
# Analyzing the effect of fetal genes, including triads with missing data,
# using a multiplicative response model. When winlength = 1, separate
# markers are used. To make longer windows, winlength can be increased
# correspondingly:
result.1 <- haplinSlide( haplin.data.prep, use.missing = T, response = "mult",
reference = "ref.cat", winlength = 1, table.output = F)
# Provide summary of separate results:
lapply(result.1, summary)
# Plot results:
par(ask = T)
lapply(result.1, plot)
}
Run the code above in your browser using DataLab