ggplot2 returns empty plot
Hi,
I am trying to determine copy number in tumor and normal sample, so I calculated depth and so on by mosdepth and I finished with this table
https://www.dropbox.com/s/11jlie6kufibg4y/all_depth.txt?dl=0
> head(all_depth)
Chr Start Counts.100Tumor Counts.100Normal diff
1 1 0 0.00 0.00000 0.000000
2 1 10000 55.21 69.75838 -14.548375
3 1 20000 32.24 34.81226 -2.572259
4 1 30000 33.36 36.21775 -2.857753
5 1 40000 24.45 26.22632 -1.776319
6 1 50000 35.73 34.33420 1.395800
>
ggplot(all_depth[all_depth$Chr == "chr6",], aes(x=Start, y=diff, color=diff)) + geom_point() + scale_color_viridis("Depth", option = "plasma")
I was going to plot that like this picture from tutorial

But R gives me an empty plot, do you know why? I don't know where I am doing wrong I even tried for all chromosomes
• 2,124 views
•
link
0 answers
No answers yet.
Log in to answer this question.
all_depth$Chr == "chr6" Chr -> 6 !!! But I guess you also got an error
This solves the problem, F?
Yes and returned this frustrating plot
Good evening. You have an extreme outlier with a value of ~1260. The other points are 'squashed' on the 0 line because the plot window is too small. Try to change the value of
xlim()Hello F!
We believe that this post does not fit the main topic of this site.
Not related to bioinformatics, didn't work because of typo:
"chr6"should b6, also check the class of the columnclass(all_depth$Chr).For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!