I have a dataframe mydf
with chromosome, start position, and number of reads at that position. I was using genomicranges
to follow the method discussed here, but I was not able to plot it as in the figure below. Could you please help me plot this. Thank you for your help.
mydf<- structure(list(chr = structure(c(2L, 2L, 2L, 4L, 4L, 4L, 5L,
5L, 5L), .Label = c("Ch1", "Ch10", "Ch11", "Ch12", "Ch13", "Ch14",
"Ch15", "Ch16", "Ch2", "Ch3", "Ch4", "Ch5", "Ch6", "Ch7", "Ch8",
"Ch9"), class = "factor"), start = c(1000940, 1001133, 1001566,
1060328, 1060590, 1060887, 1495099, 1497788, 1497980), read.counts = c(7,
2, 1, 14, 8, 6, 62, 15, 7)), .Names = c("chr", "start", "read.counts"
), class = "data.frame", row.names = c(NA, -9L))
This is how I want my plot to look like(but for all chromosomes):https://ibb.co/nrbLLG