Package op
Class StorageFactory
java.lang.Object
op.StorageFactory
Factory class for creating and loading
Storage objects.-
Method Summary
-
Method Details
-
fromPath
Reads aStorageobject from the specified file path.This method validates the file, determines if it is GZIP-compressed based on its extension, and reads its contents. The contents are then deserialized into a
Storageobject using Gson.- Parameters:
path- ThePathto the file containing the serializedStorageobject.- Returns:
- The deserialized
Storageobject. - Throws:
IOException- If the file cannot be read or deserialized.
-
fromCli
Constructs aStorageobject from definitions inCLIBuild.This method initializes a
Storageobject using parameters provided via theCLIBuildinstance. It sets up the storage parameters, optionally populates contigs from a reference, and loads features and sample information from the CLI parameters.- Parameters:
cli- TheCLIBuildinstance containing the parameters and definitions for constructing theStorageobject.- Returns:
- A
Storageobject representing the loaded data. - Throws:
IOException- If an error occurs while reading files or parsing data.
-