Skip to main content

for_each_score

Function for_each_score 

Source
pub fn for_each_score<F>(
    input: &Path,
    config: &ScanConfig,
    emit: F,
) -> Result<RunStats>
where F: FnMut(&str, usize, f64) -> Result<()>,
Expand description

Score every record in input, passing each score to emit as it is produced.

emit receives the record name, the 1-based position the score belongs to, and the score. It is called in position order within a record and in file order across records, which is the order a bigWig writer requires.