trackdata: Access Track Data

trackdataR Documentation

Access Track Data

Description

Access and modify the track data. x$name and x$name <- value are just shortcuts for trackData(x)$name and trackData(x)$name <- value, respectively.

Usage

trackData(x)

trackData(x) <- value

## S4 method for signature 'TnTTrack'
x$name

## S4 replacement method for signature 'TnTTrack'
x$name <- value

Arguments

x

A TnTTrack object.

value

Replaced value.

name

Passed to the inner method for track data.

Value

trackData on all track types except "CompositeTrack" returns an object that inherits GRanges class, which means they should behave like a GRanges. While trackData on "CompositeTrack" returns a list of tracks.

Examples

track <- BlockTrack(GRanges("chr1", IRanges(6, 54)))
class(trackData(track)) # track data of block track is an object that inherits GRanges.
#trackData(track)
ctrack <- merge(track, track)
class(trackData(ctrack)) # track data of composite track is a list of tracks
#trackData(ctrack)

Marlin-Na/TnT documentation built on Sept. 15, 2024, 5:27 a.m.