BED input functions

read_beds()

Versatile BedGraph reader.

read_index()

Parse BED files for unique genomic coordinates

read_bed_by_index()

Parses BED files for methylation values using previously generated index genomic coordinates

read_hdf5_data()

Writes values from input BED files into an in-disk HDF5Array

read_mem_data()

Writes values from input BED files into an in-memory matrix

subset_ref_cpgs()

Subsets a given list of CpGs by another list of CpGs

get_sample_name()

Returns sample name derived from the input file name

parse_source_idx()

Subsets a given list of CpGs by another list of CpGs

get_source_idx()

Gets bedgraph column indexes from common pipeline output formats

Base object and data

scMethrix-class

Class scMethrix

scMethrix_data

Single cell methylome of murine neuronal cells

Object getters

is_h5()

Checks if scMethrix object is an HDF5 object

has_cov()

Checks if scMethrix object has a coverage matrix

scMethrix base operations

Save/load and conversion

save_HDF5_scMethrix()

Saves an HDF5 scMethrix object

load_HDF5_scMethrix()

Loads HDF5 scMethrix object

convert_HDF5_scMethrix()

Converts HDF5 scMethrix object to an in-memory scMethrix object.

convert_scMethrix()

Converts an in-memory scMethrix to an HDF5 scMethrix

Assay retrieval

remove_assay()

Removes an assay from an scMethrix object

get_matrix()

Extract assays from an scMethrix object

Operations

merge_scMethrix()

Merges two scMethrix objects by row or col

subset_scMethrix()

Subsets an scMethrix object based on regions, contigs and/or samples.

mask_by_sample()

Masks CpGs by cell count

mask_by_coverage()

Masks CpGs by coverage

mask_by_variance()

Masks non-variable CpGs

remove_uncovered()

Remove loci that are uncovered across all samples

Statistics

get_stats()

Estimate descriptive statistics for each sample

get_region_summary()

Extracts and summarizes methylation or coverage info by regions of interest

get_metadata_stats()

Adds descriptive statistics to metadata columns in an scMethrix object.

scMethrix transformations

Assay transform

transform_assay()

Transforms an assay in an scMethrix object.

bin_scMethrix()

Bins the ranges of an scMethrix object.

binarize()

Binarize an input value based on a threshold

Imputation

impute_by_melissa()

Imputes the NA values of a scMethrix object.

impute_regions()

Generic imputation return function

generate_training_set()

Splits an scMethrix object into two for use as a training and test set

generate_random_subset()

Generates a random subset of CpG sites

Dimensionality Reduction

dim_red_scMethrix()

Reduces dimensionality (tSNE, UMAP, PCA, or custom)

reduce_cpgs()

Reduces a assay to a representative matrix

Clustering

get_distance_matrix()

Get the pair-wise distance matrix for an assay

cluster_scMethrix()

Generates a cluster object for an scMethrix object

Plotting

prepare_plot_data()

Format scMethrix matrix to long form data for plotting

plot_violin()

Violin Plot for \(\beta\)-Values

plot_density()

Density Plot of \(\beta\)-Values

plot_coverage()

Coverage QC Plots

plot_sparsity()

Sparsity of sample inheritParams generic_plot_function

plot_stats()

Plot descriptive statistics

plot_dim_red()

Plot dimensionality reduction

get_palette()

Getter for plot palette colors

get_shape()

Getter for plot shapes. Shapes selected for optimal distinction and taken from:

benchmark_imputation()

Evaluates imputations methods by NRMSE or AUC

scMethrix_theme()

Theme for ggplot

Misc functions

GRanges/List

bin_granges()

Bins each region in a GRanges object into bins of specified bin_size

cast_granges()

Casts genomic regions into GRanges format

split_vector()

Splits a vector into list of vectors by chunk or size

Timer

start_time()

Starts an internal stopwatch

split_time()

Outputs the split/lap/iteration time

stop_time()

Stops an internal stopwatch and outputs overall time