INNER CODE UNIT · Rust

read_cram_impl

abdenlab/oxbow · r-oxbow/src/rust/src/lib.rs:254

pub fn read_cram_impl(
    path: &str,
    reference: Option<String>,
    reference_index: Option<String>,
    region: Option<String>,
    index: Option<String>,
    fields: Option<Vec<String>>,
    scan_rows: Option<usize>,
) -> Vec<u8> {
    let scan_rows = Some(scan_rows.unwrap_or(1024));
    let reader = std::fs::File::open(path)
        .map(|f| BufReader::with_capacity(BUFFER_SIZE_BYTES, f))
        .unwrap();

    // Build FASTA repository
    let repo = match reference {
        Some(ref_path) => {
            let fai_path = reference_index.unwrap_or(format!("{}.fai", ref_path));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…