INNER CODE UNIT · Rust

parse_bed_line

informationsea/transanno · liftover-rs/src/bedparse/mod.rs:118

pub fn parse_bed_line<'a>(input: &'a [u8]) -> IResult<&'a [u8], BedEntry<'a>> {
    let (input, chrom) = take_till1(|x| x == b'\t')(input)?;
    let (input, _) = tag(b"\t")(input)?;
    let (input, start) = map_res(
        map_res(take_while1(is_digit), str::from_utf8),
        str::parse::<u64>,
    )(input)?;
    let (input, _) = tag(b"\t")(input)?;
    let (input, end) = map_res(
        map_res(take_while1(is_digit), str::from_utf8),
        str::parse::<u64>,
    )(input)?;

    let (input, (others, _)) = tuple((
        opt_field(opt_field(opt_field(opt(tuple((
            tag(b"\t"),
            take_while1(|x| x != b'\n'),
        )))))),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…