randomSegments: randomize locations of input segments

randomSegmentsR Documentation

randomize locations of input segments

Description

randomizes the locations of input segments, while maintaining the length distributions, optionally different distributions of different segment classes. Coordinates must be converted to a continuous index over all chromosomes with coor2index. Note, that this ignores chromosome borders! TODO: allow to pass chromosome length index chrS to account for chromosome borders.

Usage

randomSegments(query, qclass, total)

Arguments

query

query set of segments to be randomized

qclass

column name which holds a sub-classification (clustering) of the query segments, omit or pass empty string ("") to use all

total

total length of the query range (genome length), if missing the start of the first segment is also used as end.

Details

The function is also used for permutation tests in segmentOverlaps.


raim/segmenTools documentation built on April 30, 2024, 4:53 a.m.