Load ’em up

library(dplyr)
library(ggplot2)
library(magrittr)
library(cowplot)
library(tidyr)

Data

Download subgenome coordinates from gbrowse track at maizegdb.

Download 1cM genetic map from panzea.

Both are on AGPv2

Munge

Pull out useful data from genetic map:
cut -f 3-5 NAM_phasedImputed_1cM_AllZeaGBSv2.3_allChrs.hmp.txt > ~/Desktop/map.txt

Rewrite as recombination rate and start-stop:

map<-read.table("~/Desktop/map.txt",header=T)
for(chrom in 1:10){
  bob=subset(map$pos,map[,1]==chrom)
  start=bob[1:(length(bob)-1)]+1
  end=bob[2:(length(bob))]
  rec=1/diff(bob)
  y=data.frame(chrom,start,end,rec)
  write.table(y,file="rec.txt",sep="\t",append=T,quote=F,col.names=F,row.names=F)  
}

Bedtools FTW:
bedtools intersect -a rec.txt -b Annotations.gff3.txt -wo > subgenome_rec.txt

Shameful perl:
perl -e 'open FILE, "<subgenome_rec.txt"; while(<FILE>){ $_=~s/Name=\%22//; $_=~s/\%20Ortholog\%20of\%20/\t/g; $_=~s/\%\S+//g; print $_; }' | cut -f 1-4,13-15 > subgenome_rec_for_analysis.txt

Quick and Dirty Analysis

Get data, keep rec segments with perfect overlap:

final_data<-read.table("~/Desktop/subgenome_rec_for_analysis.txt") %>% 
  set_names(c("chr","start","end","rec","sub","sb","overlap")) %>% 
  mutate(dist=end-start,rec=rec*1e6,sub=gsub("Maize","M",sub),sb=gsub("Sb","S",sb),inter=interaction(as.factor(sub),as.factor(sb))) %>% 
  filter(overlap-dist==0)

Take a peek:

Maize1 seems smaller?! Check by ancestral chromosome:

Varies a lot. Let’s check numbers:

summarize(group_by(final_data,sub),mean(rec))
## Source: local data frame [2 x 2]
## 
##   sub mean(rec)
## 1  M1  2.146173
## 2  M2  2.398824
wilcox.test(subset(final_data$rec,final_data$sub=="M1"),subset(final_data$rec,final_data$sub=="M2"))
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(final_data$rec, final_data$sub == "M1") and subset(final_data$rec, final_data$sub == "M2")
## W = 190032.5, p-value = 0.002931
## alternative hypothesis: true location shift is not equal to 0

Are maize chromosomes correlated?

##           M2
## M1 0.2736872

Not much. Are ancestral chromosomes correlated?

##             M2
## M1 -0.06501275

Even less. So local recombination has changed a lot since tetraploidy. And maize1 seems to have \(\approx 10\%\) lower rec than maize1.

ToDo