Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

Clarification on GC Content Increment for G/C Reference Deletions #16

@xianyu0623

Description

@xianyu0623

Hello,

Firstly, I want to express my appreciation for this project! I’m currently learning Rust for bioinformatics, and your codebase is one of the best practical tutorials I’ve encountered. However, I’ve come across something in the code that I don’t fully understand, and I’m hoping for some clarification.

In the following section of the code:

best/src/stats.rs

Lines 470 to 474 in c1c69bb

let curr =
curr_ref_seq[Position::new(ref_pos).unwrap()].to_ascii_uppercase();
if curr == b'C' || curr == b'G' {
res.gc_content += 1.0;
}

During the processing of deletions, when a G or C is encountered in the reference, the GC content is incremented. Could you explain the reasoning behind this? My understanding is that a deletion would reduce the GC content since there would be fewer Gs or Cs in the read sample.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions