Lattice-Automation / seqviz

a JavaScript DNA, RNA, and protein sequence viewer
https://tools.latticeautomation.com/seqviz
MIT License
241 stars 53 forks source link

simple annotation bug in vanillaJS #90

Closed Sanrrone closed 3 years ago

Sanrrone commented 3 years ago

Dears, using this config

<script src="https://unpkg.com/seqviz"></script>
<script>
window.seqviz.Viewer("myseqid", {
    style: { height: "100vh", width: "100vw" },
    showComplement: false,
    name: 'test_seq',
    seq: 'ATGAGTTCCATGATGTATATGCTGTTGCTCTGCCTCTCGGCTGGCTTAATATCGGTAGTCCAGGGTGAAGACCCTTACCTGTACTTCACATGGAATGTCACCTTCGGAAC',
    viewer: "linear",
    annotations: [
        {start: 70, end: 74, name: "test1", direction: 1},
        {start: 80, end: 100, name: "test2", direction: 1},
        ],
})
.render();
</script>

I got Captura de pantalla de 2021-02-09 12-49-15

As you see the circular annotation is ok but the lienar draws extend the positions (bug I think), If the annotations are in the same block I got this behaviour but, if the annotation are on different block it's ok.

thanks for the help in advance! Sandro

Sanrrone commented 3 years ago

I found if you add "id" tag in annotation the bug dissapear, so, is not really a bug just a lack of documentation

jjti commented 3 years ago

I think that this ID issue may have been the same as was documented in this other comment: https://github.com/Lattice-Automation/seqviz/issues/87

please let me know if this is resolved in the latest version, 3.0.27, as I believe that it should be