-
Notifications
You must be signed in to change notification settings - Fork 9
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
lines extend to gene model with geom_junction_label_repel #8
Comments
Hi - thanks for your feedback on I'm unable to reproduce this issue and can't spot anything wrong in the code or environment. The grey boxes representing the CDS (which should be generated by On a fresh R session, could you try running the code below and let me know if the outputted plot still has the
|
Hi,
Thanks for your feedback!
I've tried it again, and the same issue has happened. I copied the code
directly from your email this time, and the CDS's are definitely there. The
plot is attached.
Do you think it could be to do with versions of ggplot2? I get this warning
message:
Using the `size` aesthetic in this geom was deprecated in ggplot2 3.4.0.
Please use `linewidth` in the `default_aes` field and elsewhere instead.
It's interesting because this code doesn't use 'size' or 'linewidth', but
perhaps the problem is ggplot anyway?
Thanks again,
Srishti
[image: image.png]
…On Sat, Nov 26, 2022 at 1:22 PM David Zhang ***@***.***> wrote:
Hi - thanks for your feedback on ggtranscript!
I'm unable to reproduce this issue and can't spot anything wrong in the
code or environment. The grey boxes representing the CDS (which should be
generated by geom_range(data = sod1_201_cds)) are also missing from your
plot - are you sure this is the plot generated by your attached code?
On a fresh R session, could you try running the code below and let me know
if the outputted plot still has the geom_junction_label_repel issue:
library(ggtranscript)
library(ggplot2)
library(dplyr)
library(magrittr)
sod1_exons <- sod1_annotation %>% dplyr::filter(type == "exon")
sod1_cds <- sod1_annotation %>% dplyr::filter(type == "CDS")
sod1_201_exons <- sod1_exons %>% dplyr::filter(transcript_name == "SOD1-201")
sod1_201_cds <- sod1_cds %>% dplyr::filter(transcript_name == "SOD1-201")
sod1_202_exons <- sod1_exons %>% dplyr::filter(transcript_name == "SOD1-202")
sod1_202_cds <- sod1_cds %>% dplyr::filter(transcript_name == "SOD1-202")
sod1_junctions <- sod1_junctions %>%
dplyr::mutate(transcript_name = "SOD1-201")
sod1_201_exons %>%
ggplot(aes(
xstart = start,
xend = end,
y = transcript_name
)) +
geom_range(
fill = "white",
height = 0.25
) +
geom_range(
data = sod1_201_cds
) +
geom_intron(
data = to_intron(sod1_201_exons, "transcript_name")
) +
geom_junction(
data = sod1_junctions,
junction.y.max = 0.5
) +
geom_junction_label_repel(
data = sod1_junctions,
aes(label = round(mean_count, 2)),
junction.y.max = 0.5
)
—
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWTHDPFG7RSQFCK76TW3RMDWKIFHTANCNFSM6AAAAAASBGDVCY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm having the same issue. |
Thanks for raising, this issue should now be fixed. |
Hi,
Firstly, thanks for this R package; it's already really useful to me, and it's quite user friendly :)
However, I'm having an issue with the geom_junction_label_repel 'geom' and getting different results from the examples in the README. I was expecting the lines coming from the labels to connect to the junction lines, but instead, they connect to the gene models. I have tried this both with the SOD gene example in the GitHub instructions and with my own data.
I have copied the resulting plot from copying the given code into R below.
My session info is below:
Could you please advise what to do?
Thanks!
The text was updated successfully, but these errors were encountered: