otuSites: Bin values or make OTUs 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 OTU (operation taxinomical 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
otuSites(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 otuID shown alongside the original input. If psl.rd parameter is defined, then a GRanges object.

Note

The algorithm for making OTUs of sites is as follows:

See Also

clusterSites, isuSites, crossOverCheck, findIntegrations, getIntegrationSites, pslToRangedObject

Examples

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

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