manhattan.plot: Manhattan plot

Description Usage Arguments Details See Also Examples

View source: R/plots.r

Description

Draw a Manhattan plot of the association p-values of the markers.

Usage

1
2
manhattan.plot(res.mlmm, map = NULL, steps = 1, hideCofactors = FALSE,
  chrToPlot = "all", unit = "cM", ...)

Arguments

res.mlmm

Output object from mlmm_allmodels.

map

Dataframe with 3 columns : markers names, chromosome or scaffold names and position (any unit is allowed: cM, Mpb etc.).

steps

An integer. The iteration number of the forward approach. If a vector of length >= 2 is passed, several plots will be drawn. By default, only step 1 is drawn.

hideCofactors

If TRUE, the coffactors (fixed effects) won't be drawn

chrToPlot

Names of the chromosomes or scaffolds to plot. Use this if you want to zoom on a particular chromosome.

unit

Unit of the positions in the map.

...

additional arguments can be passed to the plot function.

Details

Draws a manhattan plot ie. plot -log(p-value) vs marker position

If a map is passed, markers position will be used as x axis. If not, the indices of markers inside the res.mlmm object will be used instead

If there are cofactors (as in all but the first step of the forward approch), the cofactors markers will be plotted too (symbol: star).

If a map is passed, markers not in the map or in the map but not assigned to a chromosome will be assigned to a virtual chromosome 0.

Markers in the map, assigned to a chromosome, but with missing position, will be ploted at the end of the chromosome.

See Also

mlmm_allmodels

Examples

 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
### Additive model ###
## Not run: 
data("mlmm.gwas.AD")

XX = list(Xa)
KK = list(K.add)

# GWAS
res_mlmm <- mlmm_allmodels(floweringDateAD, XX, KK)
manhattan.plot(res_mlmm)

# Model selection
sel_XX <- frommlmm_toebic(XX, res_mlmm)
res.eBIC <- eBIC_allmodels(floweringDateAD, sel_XX, KK, ncol(Xa))

# Effects estimations with the selected model
sel_XXclass <- fromeBICtoEstimation(sel_XX, res.eBIC)
eff.estimations <- Estimation_allmodels(floweringDateAD, sel_XXclass, KK)
genotypes.boxplot(Xa, floweringDateAD, effects = eff.estimations)

## End(Not run)

### Additive + dominance model
## Not run: 
data("mlmm.gwas.AD")

XX = list(Xa, Xd)
KK = list(K.add, K.dom)

# GWAS
res_mlmm <- mlmm_allmodels(floweringDateAD, XX, KK)
manhattan.plot(res_mlmm)

# Model selection
sel_XX <- frommlmm_toebic(XX, res_mlmm)
res.eBIC <- eBIC_allmodels(floweringDateAD, sel_XX, KK, ncol(Xa))
#the selected model is the null model

## End(Not run)


### Female+Male model
## Not run: 
data("mlmm.gwas.FMI")

XX = list(Xf, Xm)
KK = list(K.female, K.male)

# GWAS
res_mlmm <- mlmm_allmodels(floweringDateFMI, XX, KK, female = female, male = male)
manhattan.plot(res_mlmm)

# Model selection
sel_XX <- frommlmm_toebic(XX, res_mlmm)
res.eBIC <- eBIC_allmodels(floweringDateFMI, sel_XX, KK, ncol(Xf), female = female, male = male)
#the selected model is the null model

## End(Not run)



### Female+Male+Interaction model
## Not run: 
data("mlmm.gwas.FMI")

XX = list(Xf, Xm, Xfm)
KK = list(K.female, K.male, K.hybrid)

# GWAS
res_mlmm <- mlmm_allmodels(floweringDateFMI, XX, KK, female = female, male = male)
manhattan.plot(res_mlmm)

# Model selection
sel_XX <- frommlmm_toebic(XX, res_mlmm)
res.eBIC <- eBIC_allmodels(floweringDateFMI, sel_XX, KK, ncol(Xf), female = female, male = male)
#the selected model is the null model

## End(Not run)

mlmm.gwas documentation built on Aug. 5, 2019, 5:12 p.m.