Entering edit mode

7.8 years ago

dam4l
▴
200

Hi,

I used PLINK (--freq) to get the minor allele frequencies for all SNPs in my GWAS. I would like to plot the distribution of MAFs in R with MAF on the x-axis and proportion of SNPs with a given MAF on the y-axis. I was able to plot the distribution of MAFs using the basic hist() function:

```
hist(maf_file$MAF, freq = TRUE)
```

This plots MAF on the x-axis and the frequency of each MAF on the y-axis. As I stated above, I want to be able to plot proportion rather than frequency on the y-axis.

Any input would be greatly appreciated.

Have you tried

`freq = FALSE`

?https://stat.ethz.ch/R-manual/R-devel/library/graphics/html/hist.html

I managed to do it using

`freq = FALSE`

with some additional information: