igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.
MIT License
347 stars 51 forks source link

Non ACTG Nucleotides #107

Closed StephanHolgerD closed 1 month ago

StephanHolgerD commented 7 months ago

Hello, great package thanks for providing this :)

I have a question regarding non-ACTG nucleotides in BAM files.

I try to visualize a BAM file that contains alignments with nucleotide representations like the follwoing ones:

K Guanine / Thymine M Adenine / Cytosine S Guanine / Cytosine W Adenine / Thymine

Somehow, igv-reports don’t show anything for positions with those nucleotides, just empty fields:

image

Is it possible to visualize such an alignment file properly?

StephanHolgerD commented 7 months ago

In IGV Desktop it looks perfectly fine

image

jrobinso commented 7 months ago

You are visualizing the alignment, I think you mean to say you don't see the nucleotides. No it is not currently possible, as you have discovered. I can work on this but will need an example BAM file, which of course can be small.

StephanHolgerD commented 7 months ago

I can provide an example file. Is this behavior specific for igv-reports or is the origin in the igv-js library?

jrobinso commented 7 months ago

This is actually an igv.js issue, igv-reports just extracts and packs data into the html file.

StephanHolgerD commented 7 months ago

thanks for you help, I uploaded a small dummy bam here https://filesync.medizin.uni-leipzig.de/d/136d263ef84f4273b58b/

jrobinso commented 7 months ago

This is fixed in igv.js, but can't be fixed in igv-reports until igv.js release. As a workaround or test you can use the snapshot igv.js build in your reports, i.e. change the igv.js script element in the template to

    <script src="https://igv.org/web/snapshot/dist/igv.min.js"></script>
StephanHolgerD commented 7 months ago

Thanks, will test this asap

StephanHolgerD commented 7 months ago

test_bam.txt

Hey I testest the new igv.min.js but somehow the nucleotides are still not visible, I uploaded the the html (I just changed the ending to .txt because github does not allow .html uploads here)

jrobinso commented 7 months ago

The dev build was probably not ready yet, it build nightly, sorry I should have mentioned that. I see them now with your test.

On Wed, Feb 28, 2024 at 11:52 PM Stephan Drukewitz @.***> wrote:

test_bam.txt https://github.com/igvteam/igv-reports/files/14444647/test_bam.txt

Hey I testest the new igv.min.js but somehow the nucleotides are still not visible, I uploaded the the html (I just changed the ending to .txt because github does not allow .html uploads here)

— Reply to this email directly, view it on GitHub https://github.com/igvteam/igv-reports/issues/107#issuecomment-1970593003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHD2HGI43VSCP3S46F56TTYV3O5HAVCNFSM6AAAAABD7HNSIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZQGU4TGMBQGM . You are receiving this because you commented.Message ID: @.***>

StephanHolgerD commented 7 months ago

No problem, I really appreciate your help!

jrobinso commented 1 month ago

This should be fixed now in igv-reports version 1.13.0. Old reports can be patched by updating the igv.js version to 3.0.2