gggenomes icon indicating copy to clipboard operation
gggenomes copied to clipboard

flip_by_links() is not working

Open xvtyzn opened this issue 2 years ago • 1 comments

Hi

I have observed a different behavior regarding flip_by_links() than before. I'm sorry if it's my mistake.

library(gggenomes)

# to inspect the example data shipped with gggenomes
data(package="gggenomes")

gggenomes(emale_genes, emale_seqs, emale_tirs, emale_ava) %>%
  add_feats(ngaros=emale_ngaros, gc=emale_gc) %>%
  add_sublinks(emale_prot_ava) %>%
  flip_by_links() +
  geom_feat(position="identity", size=6) +
  geom_seq() +
  geom_link(data=links(2)) +
  geom_bin_label() +
  geom_gene(aes(fill=name)) +
  geom_gene_tag(aes(label=name), nudge_y=0.1, check_overlap = TRUE) +
  geom_feat(data=feats(ngaros), alpha=.3, size=10, position="identity") +
  geom_feat_note(aes(label="Ngaro-transposon"), feats(ngaros),
                 nudge_y=.1, vjust=0) +
  geom_ribbon(aes(x=(x+xend)/2, ymax=y+.24, ymin=y+.38-(.4*score),
                  group=seq_id, linetype="GC-content"), feats(gc),
              fill="lavenderblush4", position=position_nudge(y=-.1)) +
  scale_fill_brewer("Genes", palette="Dark2", na.value="cornsilk3")

image

Also, it seems that flip_by_links() is not working in the official references.

I appreciate any help you can provide.

Keigo

xvtyzn avatar Mar 02 '22 14:03 xvtyzn

I can confirm that this is a bug. It seems to be related to providing both seqs and genes at the same time. Otherwise flip_by_links seems to work fine. Unfortunately, I haven't gotten to the bottom of the problem yet...

thackl avatar Mar 16 '22 21:03 thackl