drawable.list-class | R Documentation |
"drawable.list"
The purpose of this class is to store and manage a collection of drawable
objects. These collections are to be used by tk.browse
and browsePlot
as input.
Objects can be created by the drawable.list
constructor, and edited / created using the tk.tracks
Tcl-tk interface.
By default, the drawable.list$add()
method is only able to handle objects from drawable
-inheriting classes saved in RDT or RDS individual files. This can however be extended defining functions named drawableFromFile.EXTENSION
and drawableFromClass.CLASS
, in the global environment or a package. Such a function will take the same arguments as the drawable.list$add()
method, and will only have to return a drawable
-inheriting object.
All reference classes extend and inherit methods from envRefClass
.
classes
:Read-only, returns a vector of objects
classes.
count
:Read-only, returns the length of objects
, as a single integer.
files
:Character vector, the paths where each drawable object is to be stored.
hidden
:Logical vector, whether each object is to drawn or hidden in plots.
names
:Read-only, returns a vector of objects
'name' fields.
objects
:List of drawable
-inheriting objects.
add(file, track = , hidden = , ...)
:Add a track to the list.
- file : single character value, the path to the file containing the 'drawable' object to add.
- track : a 'drawable' object to add. If NULL, will be extracted from 'file'.
- hidden : single logical value, whether the track is to be shown on plots or hidden. This value can be changed later.
- ... : further arguments to be passed to drawableFromFile.EXTENSION or drawableFromClass.CLASS, if relevant.
check(warn = )
:Raises an error if the object is not valid, else returns TRUE
fix.files(parent = )
:Edit drawable list using a Tcl-tk GUI
- parent : tcltk parent frame for inclusion, or NULL.
fix.param(selection = , parent = )
:Edit drawing parameters using a Tcl-tk GUI
- selection : single integer value, the position of the track selected in the list.
- parent : tcltk parent frame for inclusion, or NULL.
get(index, what = )
:Returns a single 'what' from the series
- index : single numeric value, the position of the track to get.
- what : single character value, the field to be exracted.
getByClasses(classes, what = )
:Returns a subset of 'what' from the series, querying by class inheritance
- classes : character vector, the class names of the objects to get (inheriting classes are picked too).
- what : single character value, the field to be exracted.
getByNames(names, what = )
:Returns a subset of 'what' from the series, querying by track name
- names : character vector, the names of the objects to get.
- what : single character value, the field to be exracted.
getByPositions(positions, what = )
:Returns a subset of 'what' from the series, querying by position
- positions : integer vector, the positions of the objects to get.
- what : single character value, the field to be exracted.
getChromEnd(chrom)
:Returns as a single integer value the maximal ending position of the object descriptions of the given chromosome.
- chrom : single integer, numeric or character value, the chromosomal location.
,
initialize(files = , objects = , hidden = , ...)
:moveDown(toMove)
:Increases the position of a track, switching position with the next one
- toMove : single numeric value, the position of the track to move.
moveUp(toMove)
:Decreases the position of a track, switching position with the previous one
- toMove : single numeric value, the position of the track to move.
remove(toRemove)
:Remove one or many tracks from the list
- toRemove : numeric vector, the positions of the tracks to remove.
The following methods are inherited (from the corresponding class):
callSuper (envRefClass)
copy (envRefClass)
export (envRefClass)
field (envRefClass)
getClass (envRefClass)
getRefClass (envRefClass)
import (envRefClass)
initFields (envRefClass)
show (envRefClass, overloaded)
trace (envRefClass)
untrace (envRefClass)
usingMethods (envRefClass)
Sylvain Mareschal
drawable.list
, drawable-class
, tk.browse
, browsePlot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.