pub fn stage_data(
output_path: &PathBuf,
loci: &LinkedHashSet<(String, u64, u64, String)>,
seq_urls: &HashSet<Url>,
unmapped: bool,
haplotype: Option<u8>,
cache_path: &PathBuf,
) -> Result<usize>
Expand description
Public function to stage data from multiple BAM files and write to an output file.
§Arguments
output_path
- A reference to aPathBuf
representing the output file path.loci
- A reference to aHashSet
of tuples representing the loci to extract.seq_urls
- A reference to aHashSet
of URLs representing the sequence files.unmapped
- A boolean indicating whether to extract unmapped reads.cache_path
- A reference to aPathBuf
representing the cache directory path.
§Returns
The number of records written to the output file.
§Errors
This function returns an error if the output file cannot be created.
§Panics
If an error occurs while staging data from the files.