-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gene Orientation not correct #68
Comments
Because library(tidyverse)
library(gggenes)
dfg <- tribble(
~gene, ~element, ~start, ~end, ~strand, ~orientation,
"Ltn1", "stop_codon", 16353834, 16353837, "reverse", 0,
"Ltn1", "exon", 16353837, 16353954, "reverse", 0,
"Ltn1", "intron", 16353954, 16354032, "reverse", 0,
"Ltn1", "exon", 16354032, 16354473, "reverse", 0,
"Ltn1", "intron", 16354473, 16354532, "reverse", 0,
"Ltn1", "exon", 16354532, 16354808, "reverse", 0,
"Ltn1", "intron", 16354808, 16354878, "reverse", 0,
"Ltn1", "exon", 16354878, 16355062, "reverse", 0,
"Ltn1", "intron", 16355062, 16355118, "reverse", 0,
"Ltn1", "exon", 16355118, 16355351, "reverse", 0,
"Ltn1", "intron", 16355351, 16355406, "reverse", 0,
"Ltn1", "exon", 16355406, 16356726, "reverse", 0,
"Ltn1", "intron", 16356726, 16357235, "reverse", 0,
"Ltn1", "exon", 16357235, 16358277, "reverse", 0,
"Ltn1", "intron", 16358277, 16358363, "reverse", 0,
"Ltn1", "exon", 16358363, 16358543, "reverse", 0,
"Ltn1", "intron", 16358543, 16358602, "reverse", 0,
"Ltn1", "exon", 16358602, 16359381, "reverse", 0,
"Ltn1", "intron", 16359381, 16359443, "reverse", 0,
"Ltn1", "exon", 16359443, 16359491, "reverse", 0,
"Ltn1", "start_codon", 16359488, 16359491, "reverse", 0,
"Ltn1", "TE", 16353156, 16353284, "reverse", 0)
ggplot(dfg, aes(xmin = start, xmax = end, y = gene, fill = element, label = element, forward = orientation)) +
geom_gene_arrow() +
facet_wrap(~ gene, scales = "free", ncol = 1) +
scale_fill_brewer(palette = "Set3") +
geom_blank(data = dfg, aes(forward = 1)) +
theme_genes() Created on 2023-11-14 with reprex v2.0.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have specified the strand orientation in the table as forward= 1 and reverse= -1 and I use below command to draw my genes
my problem is the figure returns incorrect orientation in relation to the upstream, downstream elements that I have. For example:
<style> </style>TE should be placed before the first exon based on the coordinates (downstream) but instead it is drawn as an "upstream" element:
I got this problem since I had to re-install the package.
The text was updated successfully, but these errors were encountered: