thackl / gggenomes

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

A question regarding synteny #122

Closed Rahimlou closed 1 year ago

Rahimlou commented 2 years ago

Just for my understanding, is it possible to show synteny for certain genes (i.e. some part of the genomes)? What function can be used to zoom a specific region in several genomes?

thackl commented 2 years ago

Yes, that is possible. The function to do that is focus. You can do something like this:

# full genomes
p1 <- gggenomes(emale_genes, emale_seqs) %>%
 add_sublinks(emale_prot_ava) +
 geom_seq() + geom_gene() + geom_gene_tag(aes(label=name)) + geom_link()
p1

a

# zoom in on major capsid protein
p1 %>% focus(name=="MCP", .expand=2000)

b