fst.plot: Plot genome-wide statistics from a data frame.

Description Usage Arguments Value See Also

View source: R/gwscaR_plot.R

Description

Plot genome-wide statistics from a data frame.

Usage

1
2
3
4
5
fst.plot(fst.dat, scaffold.widths = NULL, scaffs.to.plot = NULL,
  fst.name = "Fst", chrom.name = "Chrom", bp.name = "BP",
  y.lim = NULL, xlabels = NULL, xlab.indices = NULL,
  axis.size = 0.5, pt.cols = c("darkgrey", "lightgrey"),
  pt.cex = 0.5, ...)

Arguments

fst.dat

The data.frame containing at least three columns: the statistic to be plotted, the chromosome ID, and the BP ID for each locus. Each row is a locus.

scaffold.widths

A data.frame with first column naming the chromosomes/linkage groups, second column having the last number of loci on the chromosome for indexing purposes. e.g.: Chrom End LG1 3945850 LG2 435215 This parameter is used to make multiple plots from the same overall dataset have the same widths.

scaffs.to.plot

A vector or list containing the names of the chromosomes/scaffolds you want to include in the order in which you would like them to be plotted.

fst.name

The name of the column containing the statistic to be plotted. Default is "Fst".

chrom.name

The name of the column containing the chromosome information for each locus. Default is "Chrom".

bp.name

The name of the column containing the basepair information for each locus. Default is "BP".

y.lim

The limits for the y-axis.

xlabels

Either a boolean (TRUE) or a vector of labels for the x-axis

xlab.indices

If the xlabels are not the same as the names of the chromosomes in fst.dat, then provide xlab.indices, which is a vector of integers that are the indices in scaffs.to.plot for which chromosome sets you would like to label.

axis.size

The value of cex.axis passed to the plotting of the y-axis. Default is 0.5. Set axis.size = 0 to suppress plotting of the y-axis.

pt.cols

The color of the points. The default is c("darkgrey","lightgrey").

pt.cex

The size of the points

...

plot parameters

Value

The fst.dat data frame with new values in BP, scaled to be the sequence in which points are plotted based on their position on the chromosome and the order the chromosomes are plotted in.

See Also

Flanagan & Jones 2017


spflanagan/gwscaR documentation built on Nov. 14, 2019, 9:16 p.m.