AliTVTeam / AliTV

Visualize whole genome alignments as linear maps
https://alitvteam.github.io/AliTV/d3/AliTV.html
MIT License
69 stars 11 forks source link

chromosome label #148

Closed llq0325 closed 2 years ago

llq0325 commented 5 years ago

Hi,

Thank you very much for developing this useful tool! I have a problem with using showChromosomeLabels feature. I set it like this: {"chromosome":{"color":"#000000","showChromosomeLabels":true,"size":25} but it doesn't draw the chromosome name.

regards,

Langqing

iimog commented 5 years ago

Hi @llq0325,

thanks for raising this issue. In fact it looks like the showChromosomeLabels feature is not properly implemented, even though it was planned. This is probably, due to our own data sets either having a single chromosome per genome or hundreds, in both cases chromosome labels are not very useful. Looking into the code I assume that it is not too much work to implement this feature. How urgently do you need it?

Best, Markus

iimog commented 5 years ago

I hacked a little "show chromosome lables" feature together. You can test it here: https://alitvteam.github.io/AliTV/beta/AliTV.html Go to Layout Settings > Lable Chromosomes. Lable visibility is now a global setting and can not be toggled by chromosome. Also the style is currently not configurable. So it is hopefully good enough to quickly see which chromosome is which. But it is certainly not good enough to include into final figures for publication. Let me know what you think and what improvements would be most important for you.

iimog commented 5 years ago

Ah, just realized that the displayed labels seem to be our internal ones and not the original ones. I have to check that and spend a bit more time on implementing the feature properly.

iimog commented 2 years ago

This issue came up again in #173 I finally came around to fixing the sequence names (no longer showing internal ids). It still does not look very nice. So please feel free to suggest any improvements. Once we are happy how it looks in the beta https://alitvteam.github.io/AliTV/beta/AliTV.html I'll merge it into the main instance.

MiaoGuo95 commented 2 years ago

This issue came up again in #173 I finally came around to fixing the sequence names (no longer showing internal ids). It still does not look very nice. So please feel free to suggest any improvements. Once we are happy how it looks in the beta https://alitvteam.github.io/AliTV/beta/AliTV.html I'll merge it into the main instance.

Thank you for your update! "Label Chromosome" function works well in the beta. But for many sequences as queries or references, I still can't see the name on the short rectangles clearly though I can get the sequence information by right-click on the sequence. I am wondering if it would be better to show the names above or under each sequence and people can adjust the names' direction?

iimog commented 2 years ago

These are excellent suggestions. I'm currently working on implementing these. I hope to deploy it to the beta tomorrow.

iimog commented 2 years ago

I just pushed changes to the beta: https://alitvteam.github.io/AliTV/beta/AliTV.html When you activate chromosome labels now you can set their font size, rotation (positive or negative), and y offset (positive and negative). I hope it helps you. But it is not perfect, yet. Especially the clipping to the left and at the top cause labels to be incomplete. I have to find a way to avoid that. Anyway, let me know what you think.