Skip to content

Commit

Permalink
Merge pull request #25 from chr1swallace/groups
Browse files Browse the repository at this point in the history
final changes in group branch
  • Loading branch information
chr1swallace authored May 3, 2018
2 parents 0f6d6a2 + e82dfde commit f737967
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ggsnp <- function(summx,snp.name="snp") {
summx <- unique(summx[,c(snp.name,"tag","x.scale")])
ggplot(summx,aes_string(x="x.scale",y=1,label=snp.name,xintercept="x.scale")) +
geom_vline(aes(xintercept=x.scale,col=tag),size=0.2,alpha=0.5) +
geom_text(angle=90,vjust=0.5,hjust=0,size=2,fontface="bold") +
geom_text(angle=90,vjust=0.5,hjust=0,size=4,fontface="bold") +
theme(legend.position="none",axis.text=element_blank(),
axis.ticks=element_blank(),axis.title=element_blank()) + ylim(1,1.4)
}
Expand Down Expand Up @@ -125,7 +125,7 @@ plot_diffuse <- function(results, maxrank=1000, thin=500) {
##' @family plotting GUESSFM results
ggld <- function(data, summ) {
use <- !duplicated(summ$snpnum)
snps.num <- structure(summ$snpnum[use],names=summ$snp[use])
snps.num <- structure(summ$snpnum[use],names=rownames(summ)[use])
all.snps <- names(snps.num)
LD <- melt(as(ld(data[,all.snps], stats="R.squared", depth=length(all.snps)-1, symmetric=TRUE),"matrix"))
LD$X1 <- snps.num[as.character(LD$X1)] - 1
Expand Down

0 comments on commit f737967

Please sign in to comment.