Comments (1)
Because -1
coerces to the logical value TRUE
, setting orientation as -1
is the same as setting forward = TRUE
. If you replace it with 0, you should get the expected result:
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
from gggenes.
Related Issues (20)
- theme_genes() produces error HOT 3
- Can you modify the length of the following genomic region HOT 3
- Terminator point feature HOT 5
- Deprecate `size` in favour of `linewidth`
- Implement SBOL sequence feature glyphs HOT 3
- Break strand in intra-CDS regions HOT 2
- geom_feature_label text size very small when ncol=1 in facet_wrap HOT 1
- How to prepare for gggenes HOT 3
- An incomprehensible error HOT 4
- would be nice for protein people HOT 2
- How about an option to draw an interrupted X-axis? HOT 1
- Genome alignment HOT 1
- error: No "geom_terminator" functions HOT 2
- Can I draw two different arrows simultaneously on a gene HOT 8
- how to rescale and align genes of different size? HOT 1
- Gene length issue HOT 1
- How to deal with larger length for the genes HOT 1
- Calculate the direction of data obtained from gff file HOT 4
- How to use scale_colour_manual to specify color for individual genes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gggenes.