Skip to contents

Contains methods for reading and displaying contents of the AlignCollapseFusionCaller_metrics.json.gz file output from TSO.

Super class

dracarys::File -> TsoAlignCollapseFusionCallerMetricsFile

Methods

Inherited methods


Method read()

Reads the AlignCollapseFusionCaller_metrics.json.gz file output from TSO.

Usage

TsoAlignCollapseFusionCallerMetricsFile$read()

Returns

tibble with the following columns:

  • section: name of original JSON element

  • name: name of metric

  • value: value of metric

  • percent: percentage


Method write()

Writes a tidy version of the AlignCollapseFusionCaller_metrics.json.gz file output from TSO.

Histo is the majority from UmiStatistics section, write out separately. Histo of num supporting fragments: Num of families with 0/1/2/3... raw reads. Histo of unique UMIs per fragment pos: Num of pos with 0/1/2/3... UMI seqs.

Usage

TsoAlignCollapseFusionCallerMetricsFile$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) (one of 'tsv' (def.), 'parquet', 'both').

drid

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


Method plot()

Generates the UmiStatistics Histogram plots from the AlignCollapseFusionCaller_metrics.json.gz file output from TSO.

  • Histo is the majority from UmiStatistics section, deal with it separately.

  • Histo of num supporting fragments: Num of families with 0/1/2/3... raw reads.

  • Histo of unique UMIs per fragment pos: Num of pos with 0/1/2/3... UMI seqs.

Usage

TsoAlignCollapseFusionCallerMetricsFile$plot(d, max_num = 15)

Arguments

d

Parsed object from self$read().

max_num

Maximum number to display in both plots.

Returns

Both histogram plot objects.


Method clone()

The objects of this class are cloneable with this method.

Usage

TsoAlignCollapseFusionCallerMetricsFile$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

x <- system.file("extdata/tso/sample705.AlignCollapseFusionCaller_metrics.json.gz",
  package = "dracarys"
)
m <- TsoAlignCollapseFusionCallerMetricsFile$new(x)
d_parsed <- m$read() # or read(m)
m$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = c("tsv", "rds"))