mergeReadGroups: Merges the counts of all read groups for a _SNPhood_ object

Description Usage Arguments Value Warning Examples

View source: R/core.R

Description

mergeReadGroups merges the counts of all read groups for a SNPhood object. This function can only be executed if more than one read group is defined in the object and if read counts have not been converted into allelic fractions. Also carefully note the warning below.

Usage

1
mergeReadGroups(SNPhood.o, summaryFunction = "sum", verbose = TRUE)

Arguments

SNPhood.o

Object of class SNPhood

summaryFunction

Character(1). Default "sum". Either "sum" or "mean". How should the read counts from different read groups be summarized. If set to "sum", all counts are summed up, which yields values that are identical as running the main analysis non-allele-specifically. If set to "mean", the mean value across all read groups is calculated.

verbose

Logical(1). Default TRUE. Should the verbose mode (i.e., diagnostic messages during execution of the script) be enabled?

Value

A modified SNPhood object with only one read group "allReadGroups", with all occurences of the original read groups replaced by "allReadGroups". For object consistency, as mentioned in the warning below, some results from analyses depending on read groups are removed completely.

Warning

Merging read groups is irreversible. This transformation cannot be undone. It might therefore be advisable to save the resulting object in a new variable as shown in the examples.

Results from the allelic bias test and clustering results will also be removed to keep the object consistent.

Examples

1
2
3
4

SNPhood documentation built on Nov. 8, 2020, 6:22 p.m.