SunPengChuan / wgdi

WGDI: A user-friendly toolkit for evolutionary analyses of whole-genome duplications and ancestral karyotypes
https://wgdi.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
114 stars 22 forks source link

deal_gff.py improvement #28

Open ardy20 opened 1 year ago

ardy20 commented 1 year ago

Hello SunPeng

Can we change the python deal_gff.py in a way that can sort the genome file and gff file in descending order (based on the length of chromosomes in fasta file from larger to smaller) and also shorten the name of sequences (seq_id). For example, I used words "Chr1", "Chr2", "Chr3" and it was still large to be fitted in to dotplot figure nicely. Even the word "Chr" is long.

I ordered the order of chromosomes in .lens file but it did not help and still giving me unsorted chromosome orders.

When I manually edited/sorted lens and gff file to make the the sequence ids shorter and also in descending order (biggest Chr first to smallest) it did not help and it still started from chr10, chr11,.......... instead of chr1, chr2 etc..

I suggest we change this deal_gff.py in a way that can either make the fonts smaller or shorter the name of sequence ids in a way that can be fitted into the dot plot (whichever easier) and also sort the the sequences (in both pep.fa and .gff) descending (Chr1-Chr..n, larger to smallest, respectively).

Hope this is possible to improve the quality of your great work.

SunPengChuan commented 1 year ago

Edit the chromosomes (whole line) of the lens file to adjust the order of chromosomes in dotplot.