Skip to content

Commit

Permalink
feat: FIRE extract update
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvollger committed Jan 3, 2024
1 parent bfed259 commit 7ddcf19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/fire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,7 @@ pub fn fire_to_bed9(fire_opts: &FireOptions, bam: &mut bam::Reader) -> Result<()
.chain(rec.nuc.reference_ends.iter());
let qual_iter = rec.msp.qual.iter().chain(rec.nuc.qual.iter());
let n_msps = rec.msp.reference_starts.len();
let mut count = 0;
for ((start, end), qual) in start_iter.zip(end_iter).zip(qual_iter) {
for (count, ((start, end), qual)) in start_iter.zip(end_iter).zip(qual_iter).enumerate() {
if let (Some(start), Some(end)) = (start, end) {
let fdr = if count < n_msps {
100.0 - *qual as f32 / 255.0 * 100.0
Expand All @@ -588,7 +587,6 @@ pub fn fire_to_bed9(fire_opts: &FireOptions, bam: &mut bam::Reader) -> Result<()
);
out_buffer.write_all(bed9.as_bytes())?;
}
count += 1;
}
}
Ok(())
Expand Down
4 changes: 1 addition & 3 deletions src/footprint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ pub fn define_footprint(fiber: FiberseqData, bed_rec: CenterPosition, _modules:
if fiber.target_name != bed_rec.chrom
|| fiber.record.reference_start() > bed_rec.position
|| fiber.record.reference_end() < bed_rec.position
{
return;
}
{}
}

pub fn start_finding_footprints(opts: &FootprintOptions) -> Result<(), anyhow::Error> {
Expand Down

0 comments on commit 7ddcf19

Please sign in to comment.