update.TRAMP: Interactively Alter a TRAMP Object

Description Usage Arguments Warning Note Examples

View source: R/TRAMP.R

Description

This function allows some manual checking and correction of a TRAMP object. By default, it steps through each sample, and offers to (1) add a new known to the TRAMPknowns database within the TRAMP object (see add.known for details), (2) mark matches to be ignored in future calls to plot.TRAMP (see remove.TRAMP.match), (3) save the current plot as a PDF.

Usage

1
2
3
4
## S3 method for class 'TRAMP'
update(object, sample.fk=labels(object$samples), grouped=FALSE,
       ignore=TRUE, delay.rebuild=FALSE, default.species=NULL,
       filename.fmt="TRAMP_%d.pdf", ...)

Arguments

object

A TRAMP object.

sample.fk

A vector of sample.fk to cycle through. If omitted, this will default to all samples present in the TRAMPsamples component of the TRAMP object.

grouped, ignore

Plotting parameters, as in plot.TRAMP. Currently these cannot be altered from their default values.

delay.rebuild

Logical: Should the rebuild of the TRAMP object be delayed until the function returns? If this is FALSE (the default), then the TRAMP object will rebuild every time a new known is added. This may take a while for large objects, so if set to TRUE, then the TRAMP object will not be rebuilt until all sample.fks have been displayed. This means that any new samples added as knowns will not be included in plots.

default.species

Default species name for newly added knowns. Passed to add.known.

filename.fmt

Format used to generate filenames when saving PDFs. Include a "%d" to stand in for the sample.fk (so "TRAMP_%d.pdf" becomes "TRAMP_12.pdf" for sample.fk 12).

...

Further arguments passed to the plotting function plot.TRAMP.

Warning

If an error occurs while running update, all modifications will be lost.

Note

update.TRAMP returns a modified TRAMP object, and does not modify the original TRAMP object in place. You must use it like:

x <- update(x)

or

x2 <- update(x)

to modify the original object or create a new, modified object in place. Note that if creating mutiple objects, if the TRAMPknowns object has a file.pat element, then any changes to either of x or x2 will be written back to file, but the knowns contained in x and x2 may be different. See the note in add.known.

The action “Quit” will always exit the update function and save the object.

Be careful when using a TRAMP object whose TRAMPknowns element has a file.pat element; new knowns added will be immediately written to file.

Examples

1
## Since this function runs interactively, there can be no sample.

richfitz/TRAMPR documentation built on Feb. 10, 2022, 3:10 p.m.