isuSites: Bin values or make ISUs by assigning a unique ID to them...

Description Usage Arguments Value Note See Also Examples

View source: R/hiReadsProcessor.R

Description

Given a group of values or genomic positions per read/clone, the function tries to yield a unique ISU (Integration Site Unit) ID for the collection based on overlap of locations to other reads/clones by grouping. This is mainly useful when each read has many locations which needs to be considered as one single group of sites.

Usage

1
2
3
4
5
6
7
8
9
isuSites(
  posID = NULL,
  value = NULL,
  readID = NULL,
  grouping = NULL,
  psl.rd = NULL,
  maxgap = 5,
  parallel = TRUE
)

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.

readID

a vector of read/clone names which is unique to each row, i.e. deflines.

grouping

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

psl.rd

a GRanges object returned from clusterSites. Default is NULL.

maxgap

max distance allowed between two non-overlapping position to trigger the merging. Default is 5.

parallel

use parallel backend to perform calculation with BiocParallel. Defaults to TRUE. If no parallel backend is registered, then a serial version is ran using SerialParam. Process is split by the grouping the column.

Value

a data frame with binned values and isuID shown alongside the original input. If psl.rd parameter is defined, then a GRanges object where object is first filtered by clusterTopHit column and the isuID column appended at the end.

Note

The algorithm for making isus of sites is as follows: for each readID check how many positions are there. Separate readIDs with only position from the rest. Check if any readIDs with >1 position match to any readIDs with only one position. If there is a match, then assign both readIDs with the same ISU ID. Check if any positions from readIDs with >1 position match any other readIDs with >1 position. If yes, then assign same ISU ID to all readIDs sharing 1 or more positions.

See Also

clusterSites, isuSites, crossOverCheck, findIntegrations, getIntegrationSites, pslToRangedObject

Examples

1
2
3
4
isuSites(posID = c('chr1-', 'chr1-', 'chr1-', 'chr2+', 'chr15-', 'chr16-', 'chr11-'), 
value = c(rep(1000, 2), 5832, 1000, 12324, 65738, 928042), 
readID = paste('read', sample(letters, 7), sep = '-'), 
grouping = c('a', 'a',  'a', 'b', 'b', 'b', 'c'), parallel = FALSE)

malnirav/hiReadsProcessor documentation built on July 29, 2021, 6:33 a.m.