UMI4C: UMI4C-class

View source: R/AllClasses.R

UMI4CR Documentation

UMI4C-class

Description

The UMI4C constructor is the function makeUMI4C. By using the arguments listed below, performs the necessary steps to analyze UMI-4C data and summarize it in an object of class UMI4C.

Usage

makeUMI4C(
  colData,
  viewpoint_name = "Unknown",
  grouping = "condition",
  normalized = TRUE,
  ref_umi4c = NULL,
  bait_exclusion = 3000,
  bait_expansion = 1e+06,
  scales = 5:150,
  min_win_factor = 0.02,
  sd = 2
)

Arguments

colData

Data.frame containing the information for constructing the UMI4C experiment object. Needs to contain the following columns:

  • sampleID. Unique identifier for the sample.

  • condition. Condition for performing differential analysis. Can be control and treatment, two different cell types, etc.

  • replicate. Number for identifying replicates.

  • file. File as outputed by umi4CatsContacts function.

viewpoint_name

Character indicating the name for the used viewpoint.

grouping

Name of the column in colData used to merge the samples or replicates. Set to NULL for skipping grouping. Default: "condition".

normalized

Logical indicating whether UMI-4C profiles should be normalized to the ref_umi4c sample/group. Default: TRUE

ref_umi4c

Name of the sample or group to use as reference for normalization. By default is NULL, which means it will use the sample with less UMIs in the analyzed region. It should be a named vector, where the name corresponds to the grouping column from colData and the value represents the level to use as reference.

bait_exclusion

Region around the bait (in bp) to be excluded from the analysis. Default: 3000bp.

bait_expansion

Number of bp upstream and downstream of the bait to use for the analysis (region centered in bait). Default: 1Mb.

scales

Numeric vector containing the scales for calculating the domainogram.

min_win_factor

Proportion of UMIs that need to be found in a specific window for adaptative trend calculation

sd

Stantard deviation for adaptative trend.

Value

It returns an object of the class UMI4C.

Slots

colData

Data.frame containing the information for constructing the UMI4C experiment object. Needs to contain the following columns:

  • sampleID: Unique identifier for the sample.

  • condition: Condition for performing differential analysis. Can be control and treatment, two different cell types, etc.

  • replicate: Number or ID for identifying different replicates.

  • file: Path to the files outputed by contactsUMI4C.

rowRanges

GRanges object with the coordinates for the restriction fragment ends, their IDs and other additional annotation columns.

metadata

List containing the following elements:

  1. bait: GRanges object representing the position of the bait used for the analysis.

  2. scales: Numeric vector containing the scales used for calculating the domainogram.

  3. min_win_factor: Factor for calculating the minimum molecules requiered in a window for not merging it with the next one when calculating the adaptative smoothing trend.

  4. grouping: Columns in colData used for the different sample groupings, accessible through groupsUMI4C.

  5. normalized: Logical indicating whether samples/groups are normalized or not.

  6. region: GRanges with the coordinates of the genomic window used for analyzing UMI4C data.

  7. ref_umi4c: Name of the sample or group used as reference for normalization.

assays

Matrix where each row represents a restriction fragment site and columns represent each sample or group defined in grouping. After running the makeUMI4C function, it will contain the following data:

  1. umis: Raw number of UMIs detected by contactsUMI4C.

  2. norm_mat: Normalization factors for each sample/group and fragment end.

  3. trend: Adaptative smoothing trend of UMIs.

  4. geo_coords: Geometric coordinates obtained when performing the adaptative smoothing.

  5. scale: Scale selected for the adaptative smoothing.

  6. sd: Stantard deviation for the adaptative smoothing trend.

dgram

List containing the domainograms for each sample. A domainogram is matrix where columns are different scales selected for merging UMI counts and rows are the restriction fragments.

groupsUMI4C

List of UMI4C objects with the specific groupings.

results

List containing the results for the differential analysis ran using fisherUMI4C.

Note

The UMI4C class extends the SummarizedExperiment class.

See Also

UMI4C-methods

Examples

# Load sample processed file paths
files <- list.files(system.file("extdata", "CIITA", "count",
    package = "UMI4Cats"
),
pattern = "*_counts.tsv",
full.names = TRUE
)

# Create colData including all relevant information
colData <- data.frame(
    sampleID = gsub("_counts.tsv.gz", "", basename(files)),
    file = files,
    stringsAsFactors = FALSE
)

library(tidyr)
colData <- colData %>%
    separate(sampleID,
        into = c("condition", "replicate", "viewpoint"),
        remove = FALSE
    )

# Load UMI-4C data and generate UMI4C object
umi <- makeUMI4C(
    colData = colData,
    viewpoint_name = "CIITA",
    grouping = "condition"
)

Pasquali-lab/UMI4Cats documentation built on Nov. 3, 2024, 3:10 p.m.