INNER CODE UNIT · Rust
load
informationsea/transanno · liftover-rs/src/chain/mod.rs:469
pub fn load<R: Read>(chain_file: R) -> Result<ChainFile, LiftOverError> {
let mut reader = BufReader::new(chain_file);
let mut status = LiftOverReadStatus::Outside;
let mut line = String::new();
let mut line_num = 0;
let mut chain_list = Vec::new();
let mut current_chain: Option<Chain> = None;
let mut original_chromosomes: Vec<Chromosome> = Vec::new();
let mut new_chromosomes: Vec<Chromosome> = Vec::new();
loop {
line_num += 1;
line.clear();
let read_bytes = reader.read_line(&mut line)?;
if read_bytes == 0 {
// last line