quinlan-lab / bedder-rs

an API for intersections of genomic data
MIT License
74 stars 0 forks source link

chrom_ordering from other files #4

Open brentp opened 1 year ago

brentp commented 1 year ago

currently, it's required to get chrom_ordering from a .genome (fai) file. But bedder should also support reading it from a bam/sam/cram header or a .dict file. It can use the current sniffers and get the appropriate info into the HashMap<String, Chromosome> format: https://github.com/quinlan-lab/bedder-rs/blob/fe37df328dac154067cc1c1c535e45fb3b58983f/src/chrom_ordering.rs#L5-L12

brentp commented 1 year ago

Should probably also update length to u64 and use u64::MAX if it's not given.