Skip to contents

Function that computes quantification of contact frequencies in a given area and returns it in a named vector.

Usage

GetQuantif(
  matrices.lst,
  area.fun = "center",
  operation.fun = "mean_rm0",
  name.chr = NULL
)

Arguments

matrices.lst

<List[matrix]>: A matrices list.

area.fun

<character or function>: A character or function that allow an extraction of an area on each matrix that compose the matrices list (Default "center").

  • "C" or "CENTER": pixel at the intersection between anchor and bait.

  • "UL" or "UPPER_LEFT": pixels in the uppper left square

  • "UR" or "UPPER_RIGHT": pixels in the uppper right square

  • "BL" or "BOTTOM_LEFT": pixels in the bottom left square

  • "BR" or "BOTTOM_RIGHT": pixels in the bottom right square

  • "U" or "UPPER": pixels above the center area

  • "B" or "BOTTOM": pixels below the center area

  • "L" or "LEFT": pixels in the left of the center area

  • "R" or "RIGHT": pixels in the right of the center area

  • "D" or "DONUT": pixels that surrounds the center area

operation.fun

<character or function>: A character or function specifying the operation used to get quantification (Default "mean_rm0").

  • "mean_rm0": apply a mean after replace 0 with NA

  • "median_rm0": apply a median after replace 0 with NA

  • "sum_rm0": apply a sum after replace 0 with NA

  • "median": apply a median

  • "sum": apply a sum

  • "mean" or other character: apply a mean

name.chr

<character>: The name of a column in GInteraction attributes of matrices.lst used as named in the output vector (Default NULL). By default, sub-matrices IDs are used.

Value

A GRange object.

Details

GetQuantif

Examples

# Data
data(Beaf32_Peaks.gnr)
data(HiC_Ctrl.cmx_lst)

# Index Beaf32
Beaf32_Index.gnr <- IndexFeatures(
    gRange.gnr_lst = list(Beaf = Beaf32_Peaks.gnr),
    chromSize.dtf = data.frame(
        seqnames = c("2L", "2R"),
        seqlengths = c(23513712, 25286936)
    ),
    binSize.num = 100000
)

# Beaf32 <-> Beaf32 Pairing
Beaf_Beaf.gni <- SearchPairs(indexAnchor.gnr = Beaf32_Index.gnr)
Beaf_Beaf.gni <- Beaf_Beaf.gni[seq_len(2000)] # subset 2000 first for exemple

# Matrices extractions center on Beaf32 <-> Beaf32 point interaction
interactions_PF.mtx_lst <- ExtractSubmatrix(
    feature.gn = Beaf_Beaf.gni,
    hic.cmx_lst = HiC_Ctrl.cmx_lst,
    referencePoint.chr = "pf"
)
GetQuantif(
    matrices.lst = interactions_PF.mtx_lst,
    area.fun = "center",
    operation.fun = "mean"
) |> head()
#> 2L:11_2L:11 2L:11_2L:12 2L:11_2L:17 2L:11_2L:20 2L:11_2L:22 2L:11_2L:23 
#>  43065.5000  31422.8750   1866.5556    779.7778    788.0000    760.1111