Save metadata and mcols for Annotated or Vector objects, respectively, to disk. These are typically used inside saveObject methods for concrete subclasses.

saveMetadata(x, metadata.path, mcols.path, ...)

Arguments

x

A Vector or Annotated object.

metadata.path

String containing the path in which to save the metadata. If NULL, no metadata is saved.

mcols.path

String containing the path in which to save the mcols. If NULL, no mcols is saved.

...

Further arguments to be passed to altSaveObject.

Value

The metadata for x is saved to metadata.path, and similarly for the mcols.

Details

If mcols(x) has no columns, nothing is saved by saveMcols. Similarly, if metadata(x) is an empty list, nothing is saved by saveMetadata. This avoids creating unnecessary files with no meaningful content.

If mcols(x) has non-NULL row names, these are removed prior to staging. These names are usually redundant with the names associated with elements of x itself.

See also

readMetadata, which restores metadata to the object.

Author

Aaron Lun