Created
April 4, 2011 21:58
-
-
Save stephenturner/902545 to your computer and use it in GitHub Desktop.
snp distribution histograms.r
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myquery="SELECT * FROM igf1_union_nomismatch WHERE highqual=1 OR (highqual IS NULL AND maf1000g>0.01);" | |
d=query(myquery) | |
main <- paste(nrow(d),"SNPs") | |
p=qplot(d$pos18, binw=2000, xlab="Chromosome 12 position (hg18)", ylab="SNP Density", main=main) | |
ggsave("2011-04-04 SNP Density 728 SNPs.png", p, w=6, h=6, dpi=100) | |
myquery="SELECT * FROM igf1_union_nomismatch WHERE maxmaf>=0.05 OR (meanmaf IS NULL AND maf1000g>0.01);" | |
d=query(myquery) | |
main <- paste(nrow(d),"SNPs") | |
p=qplot(d$pos18, binw=2000, xlab="Chromosome 12 position (hg18)", ylab="SNP Density", main=main) | |
ggsave("2011-04-04 SNP Density 875 SNPs.png", p, w=6, h=6, dpi=100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment