baseDepthTable: Base Depth Tables and Vectors

Description Usage Arguments Details Value Note See Also

Description

Routines and objects to manage Base Depth data, such as Wiggle tracks

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
baseDepthTable(start, stop, weight = 1)
baseDepthVector(start, stop, weight = 1)

baseDepthTableToVector(baseTbl)
baseDepthVectorToTable(baseVec)

baseDepthTableSubset(baseTbl, start, stop)

sum.baseDepthTable(baseTbl)
sum.baseDepthTableSubset(baseTbl, start, stop)

merge.baseDepthTables(baseTbl1, baseTbl2)

emptyBaseDepthTable()
emptyBaseDepthVector()

factorBaseLocations(x)

Arguments

start

an integer vector of starting locations

stop

an integer vector of stopping locations

weight

a numeric vector of weights (depths)

baseTbl

a data frame of base depths with elements START, STOP, DEPTH

baseVec

a numeric vector of base depths, with integer names representing the base locations, sorted by name (location)

x

an integer vector of base locations, potentially with duplicates and unordered

Details

The Base Depth objects and functions implement the idea of wiggle tracks, where short nucleotide sequences pile up on chromosomal locations. The table form is compact, while the vector form allows for easy merging, adding, etc. Functions for subsetting and counting bases are provided.

Value

The default constructors emptyBaseDepthTable emptyBaseDepthVector return empty objects of the appropriate type.

The standard constructors turn a set of start/stop pairs with explicit depths (weights) into either type of base depth object.

The converters turn a table into a vector or vice versa.

Subsetting returns a (usually) smaller table containing just the locations within the given start,stop boundaries.

The 'sum' functions return the total number of bases in the table or subset.

the 'merge' function adds the depths from the 2 tables into a new merged table.

Note

These routines track the depth (count) of bases at locations. They do not store any base identity information whatsoever.

See Also

mergeIntegerTables, for merging (adding) base depth vectors.


robertdouglasmorrison/DuffyTools documentation built on Dec. 14, 2018, 3:05 p.m.