pub struct DistributionBuilder { /* private fields */ }Expand description
Builder for creating FastaDistribution from multiple input files
This builder merges contig metadata from multiple sources (dict, VCF, SAM/BAM, etc.) keyed by (name, length). It handles:
- MD5 merging (first non-empty wins, error on conflict)
- Alias merging (union of all)
- Sort order preservation (first seen order)
Implementations§
Source§impl DistributionBuilder
impl DistributionBuilder
Sourcepub fn with_generate_ucsc_names(self, generate: bool) -> Self
pub fn with_generate_ucsc_names(self, generate: bool) -> Self
Configure whether to generate UCSC-style names for patches.
See ReferenceBuilder::generate_ucsc_names for details.
Sourcepub fn with_display_name(self, name: impl Into<String>) -> Self
pub fn with_display_name(self, name: impl Into<String>) -> Self
Set the display name
Sourcepub fn with_source(self, source: ReferenceSource) -> Self
pub fn with_source(self, source: ReferenceSource) -> Self
Set the reference source
Sourcepub fn with_download_url(self, url: impl Into<String>) -> Self
pub fn with_download_url(self, url: impl Into<String>) -> Self
Set the download URL
Set tags
Sourcepub fn add_input(&mut self, path: &Path) -> Result<&mut Self, BuilderError>
pub fn add_input(&mut self, path: &Path) -> Result<&mut Self, BuilderError>
Add an input file (auto-detect format)
§Errors
Returns BuilderError::Parse if format cannot be detected, or other
errors from parsing the specific format.
Sourcepub fn add_input_with_format(
&mut self,
path: &Path,
format: InputFormat,
) -> Result<&mut Self, BuilderError>
pub fn add_input_with_format( &mut self, path: &Path, format: InputFormat, ) -> Result<&mut Self, BuilderError>
Add an input file with explicit format
§Errors
Returns BuilderError::Io if the file cannot be read, BuilderError::Parse
if parsing fails, or BuilderError::Conflict if contig data conflicts.
Sourcepub fn build(self) -> Result<FastaDistribution, BuilderError>
pub fn build(self) -> Result<FastaDistribution, BuilderError>
Trait Implementations§
Source§impl Debug for DistributionBuilder
impl Debug for DistributionBuilder
Auto Trait Implementations§
impl Freeze for DistributionBuilder
impl RefUnwindSafe for DistributionBuilder
impl Send for DistributionBuilder
impl Sync for DistributionBuilder
impl Unpin for DistributionBuilder
impl UnwindSafe for DistributionBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more