Commit e4900339 authored by Kosmas Hench's avatar Kosmas Hench
Browse files

update figures

parent 8ec8eaab
Loading
Loading
Loading
Loading
+205 −0

File added.

Preview size limit exceeded, changes collapsed.

+5568 −0

File added.

Preview size limit exceeded, changes collapsed.

+76.2 KiB

File added.

No diff preview for this file type.

+7 −5
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ create_K_plot <- function(searchLG,gfffile,xr,searchgene,secondary_genes,searchs
  
  clr <- c('#fb8620','#1b519c','#d93327')
  annoclr <- c('lightgray',highclr,rgb(.3,.3,.3))[1:3]
  df_list[[1]] <- df_list[[1]] %>% mutate(label=paste("italic(",tolower(Parentgenename),")",sep='') )
  df_list[[1]] <- df_list[[1]] %>% 
    mutate(label=paste("italic(",tolower(Parentgenename),")",sep='') )
  
  LW <- .3;lS <- 9;tS <- 6
  plotSET <-  theme(rect = element_blank(),
@@ -67,7 +68,7 @@ create_K_plot <- function(searchLG,gfffile,xr,searchgene,secondary_genes,searchs
    # color settings
    scale_color_manual(values=annoclr,breaks=c("x","y","z"),guide=F)+  
    scale_fill_manual(values=annoclr,guide=F)+
    scale_x_continuous(name=paste(searchLG,' (',muskID,', kb)'),expand=c(0,0),position = 'top')+
    scale_x_continuous(name=paste0(searchLG,' (',muskID,', kb)'),expand=c(0,0),position = 'top')+
    scale_y_continuous(breaks = seq(0,.75,length.out = 4))+
    theme(rect = element_blank(),
          text=element_text(size=tS,color='black'),
@@ -130,7 +131,8 @@ create_K_plot <- function(searchLG,gfffile,xr,searchgene,secondary_genes,searchs
              ,aes(x=POS,y=avgp_wald,col=run),lwd=LW)+
    # geom_line(data=(data_pfst_pw %>% filter(POS > xr[1],POS<xr[2]))
    #            ,aes(x=POS,y=avgp_wald,col=run,linetype=group),lwd=1)+
    scale_color_manual(values=c(clr,annoclr),breaks=c("nig-pue","nig-uni","pue-uni","x","y","z"),guide=F)+  
    scale_color_manual(values=c(clr,annoclr),
                       breaks=c("nig-pue","nig-uni","pue-uni","x","y","z"),guide=F)+  
    facet_grid(window~.,scales='free_y',
               switch = 'y',labeller = label_parsed,as.table = T)+
    scale_x_continuous(name=searchLG,expand=c(0,0),position = 'top')+
@@ -151,7 +153,7 @@ create_K_plot <- function(searchLG,gfffile,xr,searchgene,secondary_genes,searchs
    scale_linetype(name='location',label=c('Belize','Honduras','Panama'))+
    guides(linetype= guide_legend(override.aes = list(color = 'black')))+plotSET
  
  
  p2 <- plot_grid(p11,p12,p13,p14,
                  ncol = 1,align = 'v',axis = 'r',rel_heights = c(1.3,rep(1,3)))
                  ncol = 1,align = 'v',axis = 'r',
                  rel_heights = c(1.3,rep(1,3)))
  return(p2)}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ pBOX <- ggplot(BW,aes(x=run,y=R.2))+
  geom_point(inherit.aes = F, data=dt2,aes(x=run,y=val,fill=type),shape=23,size=1)+
  scale_x_discrete(labels = expression(Global,Panama,Belize,Honduas,
                                       italic("H. nigricans"),italic("H. puella"),italic("H. unicolor")))+
  scale_y_continuous('genome wide r²')+
  scale_y_continuous('genome wide ILD ()')+
  scale_fill_manual('',values = clr[c(6,1)],labels=c('mean','median'))+
  guides(shape = guide_legend(ncol = 1))+
  theme(legend.position = c(-.4,1.27),
Loading