Skip to contents

Level3Functions: A class for level 3 utility functions

Level3Functions: A class for level 3 utility functions

Details

This class provides methods for creating error messages and checking batch columns.

The function verifies that the `voom` object contains the following components: - `E`: A matrix of log2-counts per million (logCPM) values. - `weights`: A matrix of observation-specific weights that matches the dimensions of `E`. - `design`: A matrix representing the design matrix used in the linear modeling, with the same number of rows as there are columns in `E`.

The function also checks for optional components such as: - `genes`: A data frame of gene annotations. - `targets`: A data frame of target information. - `sample.weights`: A numeric vector of sample-specific weights.

If any of these checks fail, the function stops and reports the issues. If the structure is valid, a message confirming the validity is printed.

See also

Level2Functions

Check the structure of a voom object

Super class

SplineOmics::Level4Functions -> Level3Functions

Methods

Inherited methods


Method check_voom_structure()

This function checks the structure of a `voom` object to ensure that it contains all the expected components and that these components have the correct types and dimensions. The function does not check the actual data within the matrices.

Usage

Level3Functions$check_voom_structure(voom_obj)

Arguments

voom_obj

A list representing a `voom` object, typically created by the `voom` function from the `limma` package.

Returns

Boolean TRUE or FALSE. However, the function is mostly called for its side effects, which stop the script if the structure is not valid.

Check Batch Column


Method check_batch_column()

This method checks the batch column in the metadata and provides appropriate messages.

Usage

Level3Functions$check_batch_column(meta, meta_batch_column, data_meta_index)

Arguments

meta

A dataframe containing metadata.

meta_batch_column

A character string specifying the batch column in the metadata.

data_meta_index

An optional parameter specifying the index of the data/meta pair. Default is NA.

Returns

NULL. The method is used for its side effects of throwing errors or printing messages.

Check Condition Time Consistency


Method check_condition_time_consistency()

This function checks whether the values in the `condition` column have unique values for each block of identical `Time` values in the `meta` dataframe. Additionally, it ensures that every new block of a given time has a new value in the `condition` column.

Usage

Level3Functions$check_condition_time_consistency(meta, condition)

Arguments

meta

A dataframe containing the metadata, including the `Time` column.

condition

A character string specifying the column name in `meta` used to define groups for analysis.

Returns

Logical TRUE if the condition values are consistent with the time series pattern.


Method clone()

The objects of this class are cloneable with this method.

Usage

Level3Functions$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.