Commit cbc7183d authored by Kosmas Hench's avatar Kosmas Hench

correct S10 and S11

parent c97fc920
......@@ -15,7 +15,7 @@ karyo <- read.csv('../../0_data/0_resources/F2.karyo.txt',sep='\t') %>%
bh <- read.csv('../../2_output/08_popGen/05_fst/bel-hon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BH');
bp <- read.csv('../../2_output/08_popGen/05_fst/bel-hon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
bp <- read.csv('../../2_output/08_popGen/05_fst/bel-boc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BP');
hp <- read.csv('../../2_output/08_popGen/05_fst/hon-boc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
......
......@@ -15,7 +15,7 @@ karyo <- read.csv('../../0_data/0_resources/F2.karyo.txt',sep='\t') %>%
bh <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/bel-hon-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BH');
bp <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/bel-hon-gemma.lm.50k.5k.smooth',sep='\t') %>%
bp <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/bel-boc-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BP');
hp <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/hon-boc-gemma.lm.50k.5k.smooth',sep='\t') %>%
......
---
output: html_document
editor_options:
editor_options:
chunk_output_type: console
---
# Supplementary Figure 10
......@@ -74,46 +74,46 @@ library(grConvert)
library(tidyverse)
library(cowplot)
library(hrbrthemes)
karyo <- read.csv('../../0_data/0_resources/F2.karyo.txt',sep='\t') %>%
karyo <- read.csv('../../0_data/0_resources/F2.karyo.txt',sep='\t') %>%
mutate(GSTART=lag(cumsum(END),n = 1,default = 0),
GEND=GSTART+END,GROUP=rep(letters[1:2],12)) %>%
GEND=GSTART+END,GROUP=rep(letters[1:2],12)) %>%
select(CHROM,GSTART,GEND,GROUP)
# global -------------
bh <- read.csv('../../2_output/08_popGen/05_fst/bel-hon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
bh <- read.csv('../../2_output/08_popGen/05_fst/bel-hon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BH');
bp <- read.csv('../../2_output/08_popGen/05_fst/bel-hon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
bp <- read.csv('../../2_output/08_popGen/05_fst/bel-boc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BP');
hp <- read.csv('../../2_output/08_popGen/05_fst/hon-boc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
hp <- read.csv('../../2_output/08_popGen/05_fst/hon-boc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='HP',RUN='HP');
# NIG -------------
bhN <- read.csv('../../2_output/08_popGen/05_fst/nigbel-nighon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
bhN <- read.csv('../../2_output/08_popGen/05_fst/nigbel-nighon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BHN');
bpN <- read.csv('../../2_output/08_popGen/05_fst/nigbel-nigboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
bpN <- read.csv('../../2_output/08_popGen/05_fst/nigbel-nigboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BPN');
hpN <- read.csv('../../2_output/08_popGen/05_fst/nighon-nigboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
hpN <- read.csv('../../2_output/08_popGen/05_fst/nighon-nigboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='HP',RUN='HPN');
# PUE -------------
bhP <- read.csv('../../2_output/08_popGen/05_fst/puebel-puehon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
bhP <- read.csv('../../2_output/08_popGen/05_fst/puebel-puehon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BHP');
bpP <- read.csv('../../2_output/08_popGen/05_fst/puebel-pueboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
bpP <- read.csv('../../2_output/08_popGen/05_fst/puebel-pueboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BPP');
hpP <- read.csv('../../2_output/08_popGen/05_fst/puehon-pueboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
hpP <- read.csv('../../2_output/08_popGen/05_fst/puehon-pueboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='HP',RUN='HPP');
# UNI -------------
bhU <- read.csv('../../2_output/08_popGen/05_fst/unibel-unihon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
bhU <- read.csv('../../2_output/08_popGen/05_fst/unibel-unihon.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BHU');
bpU <- read.csv('../../2_output/08_popGen/05_fst/unibel-uniboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
bpU <- read.csv('../../2_output/08_popGen/05_fst/unibel-uniboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BPU');
hpU <- read.csv('../../2_output/08_popGen/05_fst/unihon-uniboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
hpU <- read.csv('../../2_output/08_popGen/05_fst/unihon-uniboc.50kb.5kb.windowed.weir.fst',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='HP',RUN='HPU');
# ------------------------------------------
......@@ -122,13 +122,13 @@ data$RUN <- factor(as.character(data$RUN),
levels=c('BH','BP','HP','BHN','BPN','HPN','BHP','BPP','HPP','BHU','BPU','HPU'))
data$COL <- factor(as.character(data$COL),levels=c('BH','BP','HP'))
data2 <- read.csv('../../0_data/0_resources/fst_outlier_windows.txt', sep='\t') %>%
select(-RUN) %>%
group_by(musk) %>%
data2 <- read.csv('../../0_data/0_resources/fst_outlier_windows.txt', sep='\t') %>%
select(-RUN) %>%
group_by(musk) %>%
summarise_all(function(x){x[1]})
musks <- read.csv('../../0_data/0_resources/fst_outlier_ID.txt', sep='\t') %>%
select(-RUN) %>%
group_by(musk) %>%
musks <- read.csv('../../0_data/0_resources/fst_outlier_ID.txt', sep='\t') %>%
select(-RUN) %>%
group_by(musk) %>%
summarise_all(function(x){x[1]}) %>%
mutate(RUN=factor("BH",levels=c('BH','BP','HP','BHN','BPN','HPN','BHP','BPP','HPP','BHU','BPU','HPU')))
......
---
output: html_document
editor_options:
editor_options:
chunk_output_type: console
---
# Supplementary Figure 11
......@@ -39,46 +39,46 @@ library(grConvert)
library(tidyverse)
library(cowplot)
library(hrbrthemes)
karyo <- read.csv('../../0_data/0_resources/F2.karyo.txt',sep='\t') %>%
karyo <- read.csv('../../0_data/0_resources/F2.karyo.txt',sep='\t') %>%
mutate(GSTART=lag(cumsum(END),n = 1,default = 0),
GEND=GSTART+END,GROUP=rep(letters[1:2],12)) %>%
select(CHROM,GSTART,GEND,GROUP)
# global -------------
bh <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/bel-hon-gemma.lm.50k.5k.smooth',sep='\t') %>%
bh <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/bel-hon-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BH');
bp <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/bel-hon-gemma.lm.50k.5k.smooth',sep='\t') %>%
bp <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/bel-boc-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BP');
hp <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/hon-boc-gemma.lm.50k.5k.smooth',sep='\t') %>%
hp <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/hon-boc-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='HP',RUN='HP');
# NIG -------------
bhN <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/nigbel-nighon-gemma.lm.50k.5k.smooth',sep='\t') %>%
bhN <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/nigbel-nighon-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BHN');
bpN <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/nigbel-nigboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
bpN <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/nigbel-nigboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BPN');
hpN <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/nighon-nigboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
hpN <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/nighon-nigboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='HP',RUN='HPN');
# PUE -------------
bhP <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/puebel-puehon-gemma.lm.50k.5k.smooth',sep='\t') %>%
bhP <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/puebel-puehon-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BHP');
bpP <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/puebel-pueboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
bpP <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/puebel-pueboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BPP');
hpP <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/puehon-pueboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
hpP <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/puehon-pueboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='HP',RUN='HPP');
# UNI -------------
bhU <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/unibel-unihon-gemma.lm.50k.5k.smooth',sep='\t') %>%
bhU <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/unibel-unihon-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BH',RUN='BHU');
bpU <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/unibel-uniboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
bpU <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/unibel-uniboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='BP',RUN='BPU');
hpU <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/unihon-uniboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
hpU <- read.csv('../../2_output/08_popGen/06_GxP/smoothed/50kb/unihon-uniboc-gemma.lm.50k.5k.smooth',sep='\t') %>%
merge(.,(karyo %>% select(-GEND,-GROUP)),by='CHROM',allx=T) %>% mutate(POS=(BIN_START+BIN_END)/2,GPOS=POS+GSTART,COL='HP',RUN='HPU');
# ------------------------------------------
......@@ -87,13 +87,13 @@ data$RUN <- factor(as.character(data$RUN),
levels=c('BH','BP','HP','BHN','BPN','HPN','BHP','BPP','HPP','BHU','BPU','HPU'))
data$COL <- factor(as.character(data$COL),levels=c('BH','BP','HP'))
data2 <- read.csv('../../0_data/0_resources/fst_outlier_windows.txt', sep='\t') %>%
select(-RUN) %>%
group_by(musk) %>%
data2 <- read.csv('../../0_data/0_resources/fst_outlier_windows.txt', sep='\t') %>%
select(-RUN) %>%
group_by(musk) %>%
summarise_all(function(x){x[1]})
musks <- read.csv('../../0_data/0_resources/fst_outlier_ID.txt', sep='\t') %>%
select(-RUN) %>%
group_by(musk) %>%
musks <- read.csv('../../0_data/0_resources/fst_outlier_ID.txt', sep='\t') %>%
select(-RUN) %>%
group_by(musk) %>%
summarise_all(function(x){x[1]}) %>%
mutate(RUN=factor("BH",levels=c('BH','BP','HP','BHN','BPN','HPN','BHP','BPP','HPP','BHU','BPU','HPU')))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment