pub struct FastaImportOptions<'a> { /* private fields */ }Expand description
Options for importing a FASTA file into a RefgetStore.
§Single-knob parallelism model
jobs is the number of input FASTA files imported concurrently. 0 = auto
(std::thread::available_parallelism). 1 = serial. It has no effect with a
single input file (each file is processed by the basic read->digest->encode
pipeline either way).
§Two independent alias indexes
A store keeps two separate alias indexes, and these options feed exactly one each:
namespacesfeeds only the sequence alias index. It is a parsing directive: it lists whichns:valuetokens to harvest out of each FASTA header and register per sequence.collection_aliasfeeds only the collection alias index. It is an assertion by the caller naming the collection as a whole, because a FASTA says what each sequence is called but never what the assembly is called.
They are deliberately decoupled: setting namespaces never names the
collection, and setting collection_alias never registers a sequence alias.
Implementations§
Source§impl<'a> FastaImportOptions<'a>
impl<'a> FastaImportOptions<'a>
pub fn new() -> Self
pub fn force(self, yes: bool) -> Self
pub fn namespaces(self, ns: &'a [&'a str]) -> Self
Sourcepub fn jobs(self, n: usize) -> Self
pub fn jobs(self, n: usize) -> Self
Set the number of input FASTA files imported concurrently.
0 (the default) means auto via std::thread::available_parallelism;
1 means serial. No effect with a single input file.
Sourcepub fn collection_alias(self, namespace: &'a str, alias: &'a str) -> Self
pub fn collection_alias(self, namespace: &'a str, alias: &'a str) -> Self
Register the imported collection in the collection alias index under
namespace:alias (e.g. .collection_alias("ucsc", "hg38")).
This is an explicit assertion by the caller — nothing in a FASTA file
names the assembly. It is independent of Self::namespaces, which only
harvests per-sequence aliases from headers.
Only valid when importing a single FASTA file; importing multiple files
with this set returns an error, because one alias cannot name N
collections. For the multi-file case, import without this option and call
add_collection_alias per returned collection (results come back in
input order).
If the alias already resolves to a different collection digest, the
import errors rather than silently remapping it, unless
Self::force is set. Re-registering the same digest is a no-op.
Sourcepub fn standalone_file_limit(self, limit: usize) -> Self
pub fn standalone_file_limit(self, limit: usize) -> Self
Set the pre-flight ceiling on .seq file count for STANDALONE imports.
Packed stores bypass this gate; force does not. 0 is not special: to
lift the limit, pass a large number.