igvteam / igv

Integrative Genomics Viewer. Fast, efficient, scalable visualization tool for genomics data and annotations
https://igv.org
MIT License
641 stars 384 forks source link

Bug in showing mismatched bases #1516

Closed gevro closed 3 months ago

gevro commented 5 months ago

IGV v. 2.17.4 on Mac

See the mismatched base in one of the reads here:

Screenshot 2024-05-04 at 3 58 44 PM

The mismatched base is not showing up even though 'show mismatched bases' is selected: Screenshot 2024-05-04 at 3 59 12 PM

jrobinso commented 5 months ago

I can't reproduce this, and its not really possible to guess what is going on from the screenshots.

gevro commented 5 months ago

Weird, I tried to reproduce it and can't. There was something in that specific read that was preventing it from showing mismatches. Unless there is some setting in preferences that can somehow cause mismatches not to show up even when 'show mismatched bases' is selected.

jrobinso commented 5 months ago

I can't think of any setting that would cause that, if its low base quality changing the shading formula in preferences might but I doubt it. Are you sure you are looking at the same alignment? Its impossible to say from a screenshot, alignment rows might be in a different order between the two.

gevro commented 5 months ago

100% sure I was looking at the same alignment. And I turned off shading by base quality - I thought of that - and no difference.

In that session of IGV, for some reason for that specific alignment, the mismatches were not showing up per the screenshot. The screenshot for sure shows that so I know I'm not hallucinating :-) And going to other loci in that session showed mismatches fine.

If it recurs, I will let you know.

gevro commented 3 months ago

Hi, The bug is happening again. Can I e-mail you offline to share a BAM file showing the issue?

jrobinso commented 3 months ago

Yes, igv-team@broadinstitute.org. Also exact steps to reproduce, including genome selection, and include your "prefs.properties" file from the "igv" folder.

gevro commented 3 months ago

Sent

jrobinso commented 3 months ago

OK mystery solved, you are in "quick consensus mode", which by default is on for long read alignments. This default definitely needs changed, and will be in the next release, but in the meantime you can go to "View > Preferences > Third Gen" and uncheck the "quick consensus mode" box. This should have occurred to me earlier, honestly I had forgotten about this. For more background on this mode see https://www.pacb.com/blog/igv-3-improves-support-pacbio-long-reads/#:~:text=IGV%20has%20added%20two%20features,(recommended%20setting%3A%2025%25)..

gevro commented 3 months ago

Phew that's a relief. I thought I was imagining this! Thanks

jrobinso commented 3 months ago

No, and you did ask if there were any preference settings. Really I just forgot, I'm relieved its not something more serious as well.

gevro commented 3 months ago

It is a bit confusing that 'show mismatched bases' can be overridden by the quick consensus mode. Perhaps that is something to consider for the future in how these interact. Maybe they should be mutually exclusive settings.

jrobinso commented 3 months ago

@gevro That would defeat its purpose, the purpose is precisely to not show mismatches unless there is consensus. If you read the link I posted above you'll understand the rationale, but with modern PacBio data its no longer necessary. Earlier generations of pacbio (and ont) data were not interpretable without this. The defaults haven't kept pace with the technology in this case.

gevro commented 3 months ago

Got it, thanks.

gevro commented 3 months ago

Are there any other settings that affect this? Because on a different computer I have the opposite issue. Even though I set quick consensus mode on both in the 'third gen' and in the 'alignments' preferences, I still see the mismatch.

jrobinso commented 3 months ago

The mode is explained pretty well in the article I posted. Note "The logic is the same as used by the coverage track". So the threshold for quick consensus is the threshold used for the coverage track, which in turned is governed by "Coverage allele-fraction threshold" and "Quality weight allele fraction".

`