Skip to content

Instantly share code, notes, and snippets.

@allenday
Created March 6, 2019 10:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save allenday/9c3e670a02d210caf40ec958eb8c5402 to your computer and use it in GitHub Desktop.
Rice3K analysis 2: dataviz some specific regions are under selective pressure
data = read.csv("~/data.csv")
colnames(data) <- c("contig", "pos", "t", "f", "value", "value2")
qplot(data=data, x=pos,y=1,color=value, alpha=I(1),geom="jitter",facets=contig ~ ., main="Position vs. % of Alleles out of Hardy-Weinberg Equilibrium (p<=0.05)", xlab="Chromosome Position (Bin Size=10Kb)",ylab="") + theme_bw() + theme(axis.title = element_text(size = 15), axis.ticks.y=element_blank(),axis.text.y=element_blank()) + scale_x_continuous() + guides(colour = guide_legend(override.aes = list(alpha = 1))) + scale_colour_gradient(low="white",high="red")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment