You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @wilkox ,
Thank you for this amazing package. It's really helpful :)
I have a problem with the visualization of gene length (group_506) as I have attached the files.
Pic_01 is the plot that i need, and Pic_02 is what i got. I'm quite not sure whether anything i can do to increase the length of group_506.
Thanks for your kind words about the package. The gene map in Pic_01 is not drawn to scale. For example, in molecule NC_006142.1, the distance between the two genes based on their locations is about 65,000 bp, but the space between them in the image is only about 1.5 times the width of the genes which are 246 bp in length. ggplot2 draws the genes with an accurate x-axis scale, which is why they are (correctly) drawn so small and far apart in Pic_02.
It is possible to draw something like Pic_01 with ggplot2 (you don't even need gggenes), but it would probably be easier to use vector graphics software like Inkscape or Adobe Illustrator instead, as the image is more of a schematic illustration than a plot.
Hi @wilkox ,
![01](https://private-user-images.githubusercontent.com/31235067/319018615-e3d549cd-9582-4d68-8d7f-683e0518245a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTUxODYsIm5iZiI6MTczOTU5NDg4NiwicGF0aCI6Ii8zMTIzNTA2Ny8zMTkwMTg2MTUtZTNkNTQ5Y2QtOTU4Mi00ZDY4LThkN2YtNjgzZTA1MTgyNDVhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0NDgwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlM2NiMTlkMTU2NzU3MTdmOTc1OTM4NDg2ZWIzNDY2NWFhZTkyYWFmOWJjNDI3YzA3ZmJjYjE3NjcyZmU3MjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.eBVwRJ8eVs7RPh3e3Jef6CtUmKVOqLpLL70A3KZeGuQ)
![02](https://private-user-images.githubusercontent.com/31235067/319018624-4a315d4c-9f8e-419a-a567-678b90694054.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTUxODYsIm5iZiI6MTczOTU5NDg4NiwicGF0aCI6Ii8zMTIzNTA2Ny8zMTkwMTg2MjQtNGEzMTVkNGMtOWY4ZS00MTlhLWE1NjctNjc4YjkwNjk0MDU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0NDgwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM4M2ZhZjc3M2MwOWQ1MTYzYzVlN2Q4ZTk0YzhiMDQ2ZTJhYzgzNzNkYWM2OTRlMTdjZDAyMTI3OWRiMTE4YzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oCsEgpUwPTTqk9WjQM-rGy_c5DB-mMJjieATzuzXrlc)
Thank you for this amazing package. It's really helpful :)
I have a problem with the visualization of gene length (group_506) as I have attached the files.
Pic_01 is the plot that i need, and Pic_02 is what i got. I'm quite not sure whether anything i can do to increase the length of group_506.
this is the code i used:
ggplot(input, aes(xmin = start, xmax = end, y = molecule, fill = gene)) + geom_gene_arrow() + facet_wrap(~ molecule, scales = "free", ncol = 1) + scale_fill_brewer(palette = "Set3") + theme_genes()
this is my dataset:
And when i tried to use dummies to align by group_505, Pic_03 is the plot i got
![03](https://private-user-images.githubusercontent.com/31235067/319025843-7c522579-4a27-4402-a8c0-8fe618ace111.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTUxODYsIm5iZiI6MTczOTU5NDg4NiwicGF0aCI6Ii8zMTIzNTA2Ny8zMTkwMjU4NDMtN2M1MjI1NzktNGEyNy00NDAyLWE4YzAtOGZlNjE4YWNlMTExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0NDgwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ5N2U1NDA0MmI3NWUwMTdkOTc4M2NlOGEzOTM3NzAwYmMzM2MyZTU3YTJlMGI2YzVhYTNjMGU4MmI1NmM0NGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-JMT18UyigmxPNq-LjJ6h_F0yx6Szv3n0_M9H9SBTMY)
`dummies <- make_alignment_dummies(
input,
aes(xmin = start, xmax = end, y = molecule, id = gene),
on = "group_505"
)
ggplot(input, aes(xmin = start, xmax = end, y =
molecule, fill = gene, label = gene)) +
geom_gene_arrow(arrowhead_height = unit(3, "mm"), arrowhead_width = unit(1, "mm")) +
geom_gene_label(align = "left") +
geom_blank(data = dummies) +
facet_wrap(~ molecule, scales = "free", ncol = 1) +
scale_fill_brewer(palette = "Set3") +
theme_genes()`
Thank you
The text was updated successfully, but these errors were encountered: