Package 'alabaster.string'

Title: Save and Load Biostrings to/from File
Description: Save Biostrings objects to file artifacts, and load them back into memory. This is a more portable alternative to serialization of such objects into RDS files. Each artifact is associated with metadata for further interpretation; downstream applications can enrich this metadata with context-specific properties.
Authors: Aaron Lun [aut, cre]
Maintainer: Aaron Lun <[email protected]>
License: MIT + file LICENSE
Version: 1.5.0
Built: 2024-06-30 02:56:03 UTC
Source: https://github.com/bioc/alabaster.string

Help Index


Read an XStringSet from disk.

Description

Read a XStringSet object from its on-disk representation. This is usually not directly called by users, but is instead called by dispatch in readObject.

Usage

readXStringSet(path, metadata, ...)

Arguments

path

String containing a path to a directory, itself created using the saveObject method for XStringSet objects.

metadata

Named list of metadata for this object, see readObjectFile for details.

...

Further arguments passed to internal altReadObject calls.

Value

An XStringSet subclass containing DNA, RNA, protein or custom sequences. This may also be a QualityScaledDNAStringSet with quality scores.

See Also

"saveObject,XStringSet-method", to save an XStringSet to disk.

Examples

library(Biostrings)
stuff <- DNAStringSet(c("AAA", "CC", "G", "TTTT"))

tmp <- tempfile()
saveObject(stuff, tmp)
readObject(tmp)

Save a XStringSet to disk

Description

Save a XStringSet to its on-disk representation.

Usage

## S4 method for signature 'XStringSet'
saveObject(x, path, ...)

Arguments

x

A XStringSet or any of its subclasses such as a QualityScaledXStringSet.

path

String containing the path to a directory in which to save x.

...

Further arguments to pass to specific methods.

Value

The contents of x are saved into a path, and NULL is invisibly returned.

Author(s)

Aaron Lun

See Also

readXStringSet, to read the XStringSet back into the R session.

Examples

library(Biostrings)
stuff <- DNAStringSet(c("AAA", "CC", "G", "TTTT"))

tmp <- tempfile()
saveObject(stuff, tmp)
list.files(tmp, recursive=TRUE)