anchors_shift: Shift anchors

View source: R/methods_anchors.R

anchors_shiftR Documentation

Shift anchors

Description

Shifts anchors upstream by a specified amount, unless they become out of bounds. In that case, shift the anchors downstream.

Usage

anchors_shift(IDX, anchors, rel_pos, shift = 1)

Arguments

IDX

The indices slot of a GENOVA contacts object.

anchors

A matrix with two columns containing pre-computed anchor indices. See the anchors documentation.

rel_pos

An integer vector indicating relative positions in bins, indicating ranges around anchors to lookup.

shift

An integer of length 1 indicating how many bins the anchors should be shifted.

Details

The resulting matrix contains indices to the Hi-C matrix slot in the GENOVA experiment.

An index is considered out of bounds when that index plus the shift size and maximum relative position would belong to a different chromosome.

Value

A anchors object with two columns in matrix format.

See Also

PESCAn for context and anchors. anchors_filter_oob for general out of bounds filtering of anchors.


robinweide/GENOVA documentation built on March 14, 2024, 11:16 p.m.