Hello,
I am facing the problem to plot a typical CNV plot using R (and ggplot2), with ratios on the Y axis and the chromosome and position interval on the X-axis (e.g chr1:17000-17100) but I only get it sorted numerically by default. Do you know how could I do it?
Not completely sure what you mean. Are the values "chr1:17000-17100" plotted like that in the x-axis? (in which case they would be considered factors and ordered by their order as factors. If that is the case then googling for something like "order factor ggplot2" may give you some hints (this is a commonly asked question). At any rate, I would suggest you add a minimum reproducible example so that people in this site can see what you get and give you an alternative.