shaman_score_hic_points: generate a score matrix for observed data based on the...

shaman_score_hic_pointsR Documentation

generate a score matrix for observed data based on the expected for a given set of points

Description

shaman_score_hic_points

Usage

shaman_score_hic_points(
  obs_track_nms,
  exp_track_nms,
  points,
  regional_interval,
  min_dist = 1024,
  k = 100,
  k_exp = 2 * k
)

Arguments

obs_track_nms

Names of observed 2D genomic tracks for the hic data. Pooling of multiple observed tracks is supported.

exp_track_nms

Names of expected (shuffled) 2D genomic tracks. Pooling of multiple expected tracks is supported.

points

A score will be computed for each of the points.

regional_interval

An expansion of the focus interval, inclusing points outside the focus matrix for accurate computing of the score. Note that for each observed point, its k-nearest neighbors must be included in the expanded matrix.

min_dist

The minimum distance between points.

k

The number of neighbor distances used for the score. For higher resolution maps, increase k. For lower resolution maps, decrease k.

Details

This function extracts observed data and expected data in an expanded matrix and computes The score for a point is the KS D-statistic of the distances to the points k-nearest-neighbors

Value

NULL if insufficient observed data, otherwise resturns a list containing 3 elements: 1) points - start1, start2 and score for all observed points. 2) obs - the observed points. 3) exp - the expected points.

Examples


# Set misha db to test
gsetroot(shaman_get_test_track_db())
points <- gextract("hic_obs", gintervals.2d(2, 175.5e06, 177.5e06, 2, 175.5e06, 177.5e06), band = c(-2e06, -1024))
mat_score <- shaman_score_hic_points(
    obs_track_nms = "hic_obs", exp_track_nms = "hic_exp",
    points = points, regional_interval = gintervals.2d(2, 175e06, 178e06, 2, 175e06, 178e06)
)
shaman_gplot_map_score(mat_score$points)

tanaylab/shaman documentation built on April 2, 2022, 1:32 a.m.