Skip to contents

An R6 Class representing a fragments_repeats object.

Details

The idea behind this class is to store data for processing of the peak level data towards calculation of repeat instability metrics.

It contains important setters and getters for alleles and index peaks. It's very important that the exactly correct size and repeat value is set for the alleles and index peak. This is used for subsetting etc, so if it's not exactly correct many functions would break.

It also contains methods for plotting the ladder and traces (if available).

Super class

trace::fragments -> fragments_repeats

Public fields

trace_bp_df

A dataframe of bp size for every scan from find_ladders().

peak_table_df

A dataframe containing the fragment peak level information.

repeat_table_df

A dataframe containing the fragment peak level information with the repeat size added. May or may not be the same as peak_table_df depending on what options are chosen in call_repeats.

Methods

Inherited methods


Method get_allele_peak()

This returns a list with the allele information for this object.

Usage

fragments_repeats$get_allele_peak()


Method set_allele_peak()

This sets a single allele size/repeat. It searches through the appropriate peak table and finds the closest peak to the value that's provided.

Usage

fragments_repeats$set_allele_peak(allele, unit, value)

Arguments

allele

Either 1 or 2, indicating which allele information should be set. Allele 1 is the only one used for repeat instability metrics calculations.

unit

Either "size" or "repeats" to indicate if the value you're providing is bp size or repeat length.

value

Numeric vector (length one) of the size/repeat length to set.


Method get_index_peak()

This returns a list with the index peak information for this object.

Usage

fragments_repeats$get_index_peak()


Method set_index_peak()

This sets the index repeat length. It searches through the repeat table and finds the closest peak to the value that's provided.

Usage

fragments_repeats$set_index_peak(value)

Arguments

value

Numeric vector (length one) of the repeat length to set as index peak.


Method plot_fragments()

This plots the peak/repeat table as a histogram

Usage

fragments_repeats$plot_fragments(ylim = NULL, xlim = NULL, plot_title = NULL)

Arguments

ylim

numeric vector length two specifying the y axis limits

xlim

numeric vector length two specifying the x axis limits

plot_title

A character string for setting the plot title. Defaults to the unique id of the object


Method clone()

The objects of this class are cloneable with this method.

Usage

fragments_repeats$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.