PlotAM {Eagle}R Documentation

Visualisation of multiple locus association mapping results


A interactive plotting function that provides additional information on the significant marker-trait associations found by AM


  AMobj = NULL,
  itnum = 1,
  chr = "All",
  type = "Manhattan",
  interactive = TRUE



the (list) object obtained from running AM.


the iteration number of the model building process whose results are to be viewed.


either "All" for all chromosomes or the label of a specific chromosome.


either "Manhattan" or "Score" for a manhattan plot or a plot of the score statistics across SNPs.


boolean parameter. When TRUE, an interactive plot is generated. When FALSE, a ggplot object is returned which can be saved as an image to file


A function useful for viewing the strength of association across the whole genome and how this association changes as the model is built.

The score statistics (type="Score") or p-values of the score statistics (type="Manhattan") are plotted against the location of the SNPs. The orange vertical lines denote the location of the SNPs already found by AM. The red vertical line is the location of the SNP in strongest association with the trait at that iteration number.

The vertical lines are numbered according to the order in which the snp-trait associations were found by the model.

A single chromosome or all (chr="All") chromosomes can be viewed.

By setting itnum to different values, how the score statistics or p-values increase/decrease over the model building process can be observed.

See Also



 ## 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 <- system.file('extdata', 'map.txt', 
  map_obj <- ReadMap( 

 # to look at the first few rows of the map file

  # read marker data <- system.file('extdata', 'geno.ped', 
  geno_obj <- ReadMarker(,  type='PLINK', availmemGb=8) 
  # read phenotype data <- system.file('extdata', 'pheno.txt', package='Eagle')
  pheno_obj <- ReadPheno(
  # 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)

## End(Not run)

[Package Eagle version 2.4.5 Index]