crossOverCheck: Remove values/positions which are overlapping between...

Description Usage Arguments Value See Also Examples

View source: R/hiReadsProcessor.R

Description

Given a group of discrete factors (i.e. position ids) and integer values, the function tests if they overlap between groups. If overlap is found, then the group having highest frequency of a given position wins, else the position is filtered out from all the groups. The main use of this function is to remove crossover sites from different samples in the data.

Usage

1
2
crossOverCheck(posID = NULL, value = NULL, grouping = NULL,
  weight = NULL, windowSize = 1, psl.rd = NULL)

Arguments

posID

a vector of groupings for the value parameter (i.e. Chr,strand). Required if psl.rd parameter is not defined.

value

a vector of integer locations/positions that needs to be binned, i.e. genomic location. Required if psl.rd parameter is not defined.

grouping

additional vector of grouping of length posID or psl.rd by which to pool the rows (i.e. samplenames). Default is NULL.

weight

a numeric vector of weights to use when calculating frequency of value by posID and grouping if specified. Default is NULL.

windowSize

size of window within which values should be checked. Default is 1.

psl.rd

a GRanges object. Default is NULL.

Value

a data frame of the original input with columns denoting whether a given row was a Candidate and isCrossover. If psl.rd parameter is defined, then a GRanges object with 'isCrossover', 'Candidate', and 'FoundIn' columns appended at the end.

See Also

clusterSites, otuSites, findIntegrations, getIntegrationSites, pslToRangedObject

Examples

1
2
3
crossOverCheck(posID = c('chr1-', 'chr1-', 'chr1-', 'chr1-', 'chr2+', 'chr15-', 
'chr16-', 'chr11-'), value = c(rep(1000, 3), 5832, 1000, 12324, 65738, 928042), 
grouping = c('a', 'a', 'b', 'b', 'b', 'b', 'c', 'c'))

hiReadsProcessor documentation built on Nov. 8, 2020, 5:43 p.m.