plot.onemap.segreg.test: Plot p-values for chi-square tests of expected segregation

Description Usage Arguments Value Examples

View source: R/test.segregation.R

Description

Draw a graphic showing the p-values (re-scaled to -log10(p-values)) associated with the chi-square tests for the expected segregation patterns for all markers in a dataset. It includes a vertical line showing the threshold for declaring statistical significance if Bonferroni's correction is considered, as well as the percentage of markers that will be discarded if this criterion is used.

Usage

1
2
## S3 method for class 'onemap.segreg.test'
plot(x, order = TRUE, ...)

Arguments

x

an object of class onemap.segreg.test (produced by onemap's function test.segregation()), i. e., after performing segregation tests

order

a variable to define if p-values will be ordered in the plot

...

currently ignored

Value

a ggplot graphic

Examples

1
2
3
4
5
6
7
8
9
data(example.out) # load OneMap's fake dataset for an outcrossing population
Out.seg <- test.segregation(example.out) # Applies chi-square tests
print(Out.seg) # Shows the results
plot(Out.seg) # Plot the graph, ordering the p-values
plot(Out.seg, order=FALSE) # Plot the graph showing the results keeping the order in the dataset
# You can store the graphic in an object, then save it.
# For details, see the help of ggplot2's function ggsave()
g <- plot(Out.seg)
ggsave("SegregationTests.jpg", g, width=7, height=5, dpi=600)

BatchMap documentation built on May 2, 2019, 3:45 p.m.