plotReadRatio: Draw line plots of proportion of reference allele read counts...

View source: R/PlotFunctions.R

plotReadRatioR Documentation

Draw line plots of proportion of reference allele read counts per marker per sample.

Description

This function calculate a proportion of reference allele read counts per marker per sample and draw line plots of them in facets for each chromosome for each sample.

Usage

plotReadRatio(
  x,
  coord = NULL,
  chr = NULL,
  ind = 1,
  node = "raw",
  dot_fill = c("green", "darkblue"),
  size = 0.8,
  alpha = 0.8
)

Arguments

x

A GbsrGenotypeData object.

coord

A vector with two integer specifying the number of rows and columns to draw faceted line plots for chromosomes.

chr

A vector of indexes to specify chromosomes to be drawn.

ind

A string of sample id or an index to specify the sample to be drawn.

node

Either one of "raw", "filt", and "cor" to output raw genotype data, filtered genotype data, or corrected genotype data, respectively.

dot_fill

A string to indicate the dot color in a plot.

size

A positive number to indicate the dot size in a plot.

alpha

A positive number in 0-1 to indicate the dot opacity in a plot.

Value

A ggplot object.

Examples

# Load data in the GDS file and instantiate a [GbsrGenotypeData] object.
gds_fn <- system.file("extdata", "sample.gds", package = "GBScleanR")
gds <- loadGDS(gds_fn)

plotReadRatio(gds, ind = 1)

# Close the connection to the GDS file
closeGDS(gds)


tomoyukif/GBScleanR documentation built on April 27, 2024, 9:06 a.m.