plot.exstra_score: Plot ECDF curves from an exstra_score object

View source: R/CLASS_exstra_score.R

plot.exstra_scoreR Documentation

Plot ECDF curves from an exstra_score object

Description

Plot ECDF curves from an exstra_score object

Usage

## S3 method for class 'exstra_score'
plot(
  x,
  loci = NULL,
  sample_col = NULL,
  refline = TRUE,
  ylab = "Fn(x)",
  verticals = TRUE,
  pch = 19,
  xlim,
  ylim = c(0, 1),
  alpha_control = 0.5,
  alpha_case = NULL,
  xlinked = "all",
  xlinked.safe = TRUE,
  x_upper_missing = 150,
  main = NULL,
  ...
)

Arguments

x

exstra_score object.

loci

character; Only plot at the loci specified/ No effect if NULL.

sample_col

Specify the colours for the given samples as a named character vector. names() are sample names, while the values are characters specifying colours. If specified, other samples are black by default, but may have an alpha value less than 1 for transparency.

refline

logical; if TRUE, then vertical lines are drawn indicating the reference size. This does not take into account mismatches in the STR, or false repeat hits.

ylab

Label for the y-axis.

verticals

logical; if TRUE, vertical lines are drawn at steps. See plot.stepfun.

pch

numeric; the plotting character size.

xlim

numeric of length 2; the x-limits for the plot.

ylim

numeric of length 2; the y-limits for the plot.

alpha_control

Transparency alpha value for the control samples.

alpha_case

Transparency alpha value for the case samples. No effect if NULL.

xlinked

If not "all", limits X chromosome loci to only "male" or "female" samples. Can also filter on only samples with "known" or "missing" sex.

xlinked.safe

logical; if TRUE when xlinked is filtering on "male" or "female", an error will be raised if any samples have an undefined sex. If FALSE, samples with missing sex will also be filtered when xlinked is "male" or "female".

x_upper_missing

If xlim is not specified, then loci with no data will have this upper x-axis limit.

main

Plot title.

...

Further arguments to the plot.ecdf function.

Examples

plot(exstra_wgs_pcr_2["HD"])

plot(exstra_wgs_pcr_2, "HD", sample_col = c("WGSrpt_10" = "red", "WGSrpt_12" = "blue"))

# X-linked disorder, show male samples only:
plot(exstra_wgs_pcr_2, "SBMA", xlinked = "male")


bahlolab/exSTRa documentation built on Sept. 17, 2022, 5:08 p.m.