thackl / gggenomes

A grammar of graphics for comparative genomics
https://thackl.github.io/gggenomes/
Other
581 stars 64 forks source link

Draw all links and not only those between adjacent genomes #70

Closed thackl closed 3 years ago

thackl commented 3 years ago

By default links are only drawn between adjacent genomes. In most cases, computing all links is slow and drawing all links is slow and usually way too messy to be informative.

adjacent_only=TRUE is implemented as flag for layout_links, however, currently cannot be modified because gggenomes only passes through arguments to layout_seqs. Internally, there is already a args_links parameter, but it is not yet used. Related to #69. Will need to modify gggenomes API for layout args to make this work properly.

Also, geom_link() should also get an adjacent_only flag, which if set to FALSE should throw an error if the layout wasn't computed with adjacent_only=FALSE in the first place.

thackl commented 3 years ago

Like so...

gggenomes(links=emale_ava) + geom_link()
gggenomes(links=emale_ava, adjacent_only = FALSE) + geom_link()

image image