rnb.load.annotation: rnb.load.annotation

Description Usage Arguments Details Value Author(s) See Also

View source: R/annotations.R


Loads a previously saved custom region annotation from a binary (RData) file.





One-element character vector giving the name of the file that contains the annotation data.


One-element character vector giving the name of the region annotation. If this annotation is already available, it will be overwritten for the current session.


If the region annotation cannot be loaded from the specified location, this function exits with an error message in the form "unable to load object from ...". This could happen, for example, when fname does not refer to a valid RData file, or the file cannot be accessed due to security restrictions.

If the file is loaded in the current session, but no annotation was added, the function returns invisibly one of the following short failure messages:

"invalid format"

The RData file does not store exactly the following three objects - assembly, regions, and mapping, or they are not of the expected type.

"unsupported assembly"

The specified assembly is unknown.

"invalid format of regions"

The specified region annotation table is invalid.

"invalid format of mappings"

The specified region mapping tables are invalid.


Invisibly, TRUE if the annotation was loaded successfully; an error message if the objects in the given file do not encode an annotation.


Yassen Assenov

See Also

rnb.save.annotation for saving annotation to a binary file; rnb.set.annotation for loading an annotation from a BED file.

RnBeads documentation built on March 3, 2021, 2 a.m.