Software/R package to plot thousands of stacked bars in a barplot (each bar=allele frequencies of one site)?
1
0
Entering edit mode
6.8 years ago
thal ▴ 10

Hello,

the title is pretty much the whole question.

I have identified potential selective sweep regions and I want to plot the allele frequencies of each site in this region using a stacked barplot (or something that looks like one). The regions contain 20-30 thousand sites, so I need to plot many bars. I tried R's standard barplot function and ggplot2 but there are so many bars that everything is just black.

I wonder if anyone knows a way to make such a plot. Best would be a R solution, but I'm also open for another software or python (although I just started to learn python, so R would be better).

Thank in advance.

R • 1.7k views
ADD COMMENT
1
Entering edit mode

Perhaps look at a beeswarm plot.

ADD REPLY
0
Entering edit mode

Another option is to make your data in a form that can be rendered as a "stacked" or overlay view of Wiggle data in a UCSC Genome Browser, where scores are frequencies. This blog post goes into more detail about this view type: http://blog.openhelix.eu/?p=19029

ADD REPLY
1
Entering edit mode
6.8 years ago
Fabio Marroni ★ 3.0k

1) You could do something similar to a manhattan plot, used for GWAS data. On the X you plot the position, on the Y you plot the allele frequency 2) You could work in windows, and plot the average MAF in a window of X Kb ofr Y SNPs.

ADD COMMENT

Login before adding your answer.

Traffic: 2362 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6