Skip to contents

Function that indexes a GRanges object on binned genome and constraints. Needed prior HicAggR::SearchPairs() function.

Usage

IndexFeatures(
  gRangeList = NULL,
  genomicConstraint = NULL,
  chromSizes = NULL,
  binSize = NULL,
  method = "mean",
  metadataColName = NULL,
  cores = 1,
  verbose = FALSE
)

Arguments

gRangeList

<GRanges or GRangesList or listGRanges>: GRanges object, list of GRanges or GRangesList containing coordinates to index.

genomicConstraint

: GRanges object of constraint regions. Note that bins in the same constraint region only will be paired in HicAggR::SearchPairs(). If NULL chromosomes in chromSizes are used as constraints (Default NULL)

chromSizes

<data.frame>: A data.frame containing chromosomes names and lengths in base pairs (see example).

binSize

: Bin size in bp - corresponds to matrix resolution.

method

: A string defining which summary method is used on metadata columns defined in metadataColName if multiple ranges are indexed in the same bin. Use 'mean', 'median', 'sum', 'max' or 'min'. (Default 'mean”)

metadataColName

: A character vector that specify the metadata columns of GRanges on which to apply the summary method if multiple ranges are indexed in the same bin.

cores

: Number of cores used. (Default 1)

verbose

: Show the progression in console? (Default FALSE)

Value

A GRanges object.

Details

IndexFeatures

Examples

data(Beaf32_Peaks.gnr)
Beaf32_Index.gnr <- IndexFeatures(
    gRangeList = list(Beaf = Beaf32_Peaks.gnr),
    chromSizes = data.frame(
        seqnames = c("2L", "2R"),
        seqlengths = c(23513712, 25286936)
    ),
    binSize = 100000
)