I'm trying to plot a copy number variation profile plot in R. This is what I'm looking for but with all the cells in my data.
Ploidy is on the Y axis and chromosome number is on the X axis
This is my data and this is what I've tried so far but it's not giving me what I'm looking for
input <- data.frame(chrom = sample("chr1"),start = sample(c(780000, 2920000, 4920000)), stop=sample(c(2920000, 4920000, 692000)), cell0=sample(1), cell1=sample(1,3,1),cell2=sample(2,1,2)
ggplot(input, aes(x=chrom, y=cell_0, group=1)) +
geom_point() +
geom_line(color = "#00AFBB", size = 1)
Here's a link to the whole file
When I run the code in the answer this is what I get. I'm hoping that all the chromosomes can be horizontal like the above plot.