Skip to content

Indels Are Miscounted as Variant Reads in pileup2actg.pl #3

@claraFT

Description

@claraFT

While testing your method to perform a benchmark analysis on background error rate calculation methods, I found that the script you're using to convert pileup files to base frequency tables (pileup2actg.pl) does not correctly handle insertions and deletions (indels).

Specifically, the script does not parse or remove indel annotations such as -6GGGCGG or +2AA from the base string before counting base occurrences. As a result, the individual bases inside the indel (e.g., the G, G, G, C, G, G in -6GGGCGG) are mistakenly interpreted as variant base calls at the current position.

For example, in the case of -6GGGCGG, the script adds 5 variant G reads, and 1 variant C read at that position.

This leads to systematic overestimation of variant counts, especially in repetitive or deletion-rich regions, and distorts downstream estimates of variant frequency and background noise.

Suggested fix: filter out all indel annotations (e.g., -[0-9]+[ACGTNacgtn]+ and +[0-9]+[ACGTNacgtn]+) from the base string before splitting and counting individual bases. It's also important to ensure the number of nucleotides removed matches the numeric prefix in each indel.

Let me know if you’d like help testing a fix or validating output against a cleaned version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions