# NOT RUN {
# }
# NOT RUN {
# Since the following code takes longer than 5 seconds to run, it has been tagged as dontrun.
# However, the code can be run by the user.
#
#---------------
# read the map
#---------------
#
# File is a plain space separated text file with the first row
# the column headings
complete.name <- system.file('extdata', 'map.txt',
package='Eagle')
map_obj <- ReadMap(filename=complete.name)
# to look at the first few rows of the map file
head(map_obj)
# read marker data
complete.name <- system.file('extdata', 'geno.ped',
package='Eagle')
geno_obj <- ReadMarker(filename=complete.name, type='PLINK', availmemGb=8)
# read phenotype data
complete.name <- system.file('extdata', 'pheno.txt', package='Eagle')
pheno_obj <- ReadPheno(filename=complete.name)
# Perform multiple-locus genome-wide association mapping
res <- AM(trait = 'y',
fformula=c("cov1 + cov2"),
map = map_obj,
pheno = pheno_obj,
geno = geno_obj)
# Plotting the p-values from the first iteration of the module building process.
# You can see why Eagle has identified the SNP that is has.
PlotAM(AMobj=res, itnum=1)
# Plotting the results from the final step of the model building process
# By accounting for the effect of SNP in strong association with the trait, the
# strength of association changes across the genome.
PlotAM(AMobj=res, itnum=3)
# Suppose you want to save the above plot to a jpeg file called myplot.jpg
jpeg("./myplot.jpg", width=1200, height=800)
PlotAM(AMobj=res, itnum=3, interactive=FALSE)
dev.off()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab