tanghaibao / jcvi

Python library to facilitate genome assembly, annotation, and comparative genomics
BSD 2-Clause "Simplified" License
738 stars 187 forks source link

replace connected curves with straight lines #185

Closed LHXqwq closed 4 years ago

LHXqwq commented 4 years ago

Is there any to replace connected curves with straight lines for the karyotype .pdf results, the curves looks very nice, but i am trying seveal genomes, the curves make pictures look confusing.Thanks ,best wishes.

tanghaibao commented 4 years ago

@LHXqwq

Straight lines are not available at the moment -- although probably not too difficult to implement. I'll leave this issue open until I find the time to work on this but not likely going to happen soon.

In the mean time, if you find a way to do this, please open a PR.

Haibao

tanghaibao commented 4 years ago

@LHXqwq

I just implemented this change. To use, pull the latest change, so that we can have alternative shade style with option --shadestyle:

$ python -m jcvi.graphics.karyotype seqids layout --shadestyle=line

Note that the shade now turns into lines instead of the Bezier curve before.

Grape-peach-karyotype-line

Please note that similar option is also available in jcvi.graphics.synteny. For example with:

$ python -m jcvi.graphics.synteny blocks grape_peach.bed blocks.layout --shadestyle=line

Grape-peach-blocks-line

Let me know if this works for you.

Haibao

LHXqwq commented 4 years ago

Thank you very much for your help. I updated the latest version of the software and can draw straight lines. For comparison of the genomes of multiple species, the straight lines do look clearer. Thank you again and wish you a happy life and a smooth work. 图片 图片