Set chromosome length axis
annerilotter opened this issue · 4 comments
Hi
Would it be possible to set the chromosome size axis as standard for all chromosomes i.e. 80 Mb. THe reason I am asking is that I have many genome comparisons, and would need to plot each chromosome individually due to the number of comparisons, however because the chromosome length is determined by the max length in the set, the x-axis is inconsistent. This causes scaling issues for plots even when height and width are set.
Any help would be appreciated.
Kind regards
Sorry for a very delayed reply. I guess, it would not be helpful for you anymore, but might help future readers.
Natively, plotsr does not have this option, but I think one can use the --reg
option to set the chromosome length.
Hi @mnshgl0110 , Thank you very much.
I actually managed by editing line 1379 of the func.py file as following:
ax.set_xlim(minl, maxl)
ax.xaxis.grid(True, which='both', linestyle='--')
TO:
ax.set_xlim(minl, 85000000) #####
ax.xaxis.grid(True, which='both', linestyle='-', linewidth=0.5)
So all the x-axis printed to the same max size I wanted, so when I made single chromosome plots the scaling wasn't an issue. I just pasted them all to have the same size and cropped to the appropriate length after.
may I ask on a different note, what would be the appropriate manner to calculate percentage of SV type contribution to the comparisson. Would you e.g. take the total size of inversions and divide it by 1) the length of the genome it is found in, 2)the length of the reference genome, 3)the total length of all variants in the query genome.
The last option is not the same as the first because I have found the total length may be longer than the assembly size.
Hi @annerilotter. Setting the maxl value is a good idea. In the current setup, you might need to manually reset and recompile plotsr if you need to use different values. But, I guess, this can be parameterised as well. I would consider this option for future updates.
Regarding the SV length, the total length is often longer than assembly length because some SVs overlap. The normalisation strategy depends on the comparison that you would like to describe, as such I do not think that any strategy is more appropriate than the other. Although, do note that, if you used syri for inversion identification, then the inversion would most probably have different lengths in the reference vs query genomes, as they often have different indels within inverted regions. You might need to consider this for the analysis.
Added a new option maxl
in base.cfg that can be used to manually define the max x-coordinate (97899b7).