Skip to contents

Contains methods for reading and displaying contents of the wgs_fine_hist_<phenotype>.csv file output from DRAGEN. This file contains two columns: Depth and Overall. The value in the Depth column ranges from 0 to 1000+ and the Overall column indicates the number of loci covered at the corresponding depth.

Super class

dracarys::File -> WgsFineHistFile

Methods

Inherited methods


Method read()

Reads the wgs_fine_hist_<phenotype>.csv file output from DRAGEN.

Usage

WgsFineHistFile$read()

Returns

tibble with following columns:

  • depth

  • number of loci with given depth


Method write()

Writes a tidy version of the wgs_fine_hist_<phenotype>.csv file output from DRAGEN

Usage

WgsFineHistFile$write(
  d,
  out_dir = NULL,
  prefix,
  out_format = "tsv",
  drid = NULL
)

Arguments

d

Parsed object from self$read().

out_dir

Output directory.

prefix

Prefix of output file(s).

out_format

Format of output file(s).

drid

dracarys ID to use for the dataset (e.g. wfrid.123, prid.456).


Method plot()

Plots the wgs_fine_hist_<phenotype>.csv files.

Usage

WgsFineHistFile$plot(d, x_lim = c(0, 300))

Arguments

d

Parsed object from self$read().

x_lim

X axis range to plot.

Returns

A ggplot2 object with depth of coverage on X axis, and number of loci with that depth on Y axis.


Method clone()

The objects of this class are cloneable with this method.

Usage

WgsFineHistFile$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

x1 <- system.file("extdata/wgs/SEQC-II.wgs_fine_hist_normal.csv.gz", package = "dracarys")
x2 <- system.file("extdata/wgs/SEQC-II.wgs_fine_hist_tumor.csv.gz", package = "dracarys")
ch1 <- WgsFineHistFile$new(x1)
ch2 <- WgsFineHistFile$new(x2)
d1 <- read(ch1)
d2 <- read(ch2)
ch1$plot(d1)

ch2$plot(d2)

ch1$write(d1, out_dir = tempdir(), prefix = "seqc_n", out_format = "tsv")
ch2$write(d2, out_dir = tempdir(), prefix = "seqc_t", out_format = "tsv")