thackl / gggenomes

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

position seq tracks? #127

Closed TC-Hewitt closed 2 years ago

TC-Hewitt commented 2 years ago

Hello, this is mainly an aesthetic thing but say I have something like the following: image Is it possible to centre the seqs so the links aren't so stretched out? Or are seqs always left-justified? I know I can use the focus() function to zoom in on linked regions but in my case I want to show the whole sequences and flanking regions. Thank you

thackl commented 2 years ago

Have a look at shift and shift(center=TRUE). Might do what you want.

library(gggenomes)

gggenomes(seqs=emale_seqs, links=emale_ava) %>%
  shift(center=TRUE) +
  geom_seq() + geom_link() +
  geom_bin_label()

image