Hi pretty basic question, but I have a data.frame that looks as follows:
chrom start stop frag dev span
1 chr1 3466334 3466335 60 0.09543313 0.94
2 chr1 4970790 4970791 51 0.08546289 1.00
3 chr1 5022767 5022768 27 0.45680640 0.20
4 chr1 5022807 5022808 34 0.35155312 0.20
5 chr1 5022904 5022905 45 0.12787640 0.20
6 chr1 5023063 5023064 29 0.26792518 0.20
I am trying to do a scatter plot at specific genomic locations, just not sure how to limit it to the right chromosome, here is my ggplot2 command:
my_data %>% ggplot() + geom_point(aes(x = start, y = frag)) + scale_y_continuous(limits=c(0,80)) + xlim(109005904, 109017426) + xlab("Genomic Position") + geom_smooth(aes(x = start, y = frag), method="loess", span=.66, color = "red", fill = "black") + theme_bw()
Thanks!