Skip to contents

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

Usage

IndexFeatures(
  gRange.gnr_lst = NULL,
  constraint.gnr = NULL,
  chromSize.dtf = NULL,
  binSize.num = NULL,
  method.chr = "mean",
  variablesName.chr_vec = NULL,
  cores.num = 1,
  verbose.bln = FALSE
)

Arguments

gRange.gnr_lst

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

constraint.gnr

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

chromSize.dtf

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

binSize.num

<integer>: Bin size in bp - corresponds to HiC matrix resolution.

method.chr

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

variablesName.chr_vec

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

cores.num

<integer> : Number of cores used. (Default 1)

verbose.bln

<logical>: If TRUE show the progression in console. (Default FALSE)

Value

A GRanges object.

Details

IndexFeatures

Examples

data(Beaf32_Peaks.gnr)
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
)