Commit 3ce3a323 authored by mariefbourdon's avatar mariefbourdon
Browse files

220628 figures

parent ae7929d3
No preview for this file type
......@@ -55,7 +55,7 @@ na_plot <- tab2 %>% mutate(prop_NA=n_NA/176) %>% ggplot(aes(x=prop_NA)) +
x="Proportion of NA",y="Number of markers") +
theme(
aspect.ratio=0.8,
plot.title = element_text(hjust = 0.4,face="bold",size=14))
plot.title = element_text(hjust = 0.4,size=14))
na_plot
```
......@@ -77,14 +77,14 @@ prop_plot <- tab2 %>% filter(n_NA<88) %>% filter(!chr %in% c("M","X","Y")) %>%
geom_vline(xintercept = 0.1,linetype="dashed",size=.3) +
geom_abline(intercept = 0.9, slope=-1,linetype="dashed",size=.3) +
labs(title="Exclusion of markers with mark_prop()",
x="Proportion of homozygous individuals AA",
y="Proportion of homozygous individuals BB",
x="Proportion of A/A individuals",
y="Proportion of B/B individuals",
color="Exclusion") +
theme_classic() +
theme(aspect.ratio=0.8,
legend.position=c(0.8,0.8),
legend.title = element_blank()) +
theme(plot.title = element_text(hjust = 0.4,face="bold",size=14)) +
theme(plot.title = element_text(hjust = 0.4,size=14)) +
geom_segment(x = 0.2, y = 0.78,
xend = 0.25, yend = 0.72,
color = "#1d91c0",
......@@ -112,7 +112,6 @@ gridnaprop <- plot_grid(na_plot,prop_plot,
gridnaprop
ggsave("figures/fig2.pdf",gridnaprop,width=5,height=8)
ggsave("figures/fig2.png",gridnaprop,width=5,height=8)
rm(na_plot,prop_plot)
```
......@@ -128,7 +127,6 @@ rm(na_plot,prop_plot)
grid_before <- plot_grid(as_grob(plotmap_before),rec_ratios_before,pheno_before_annot,pheno_before_zoom,ncol=2,labels=c("A","B","C","D"),label_size=20)
ggsave("figures/fig1prev.pdf",grid_before,width=14,height = 10)
ggsave("figures/fig1prev.png",grid_before,width=14,height = 10)
```
......@@ -138,9 +136,8 @@ ggsave("figures/fig1prev.png",grid_before,width=14,height = 10)
```{r grid fig1, fig.height = 7, fig.width = 13, fig.align = "center"}
grid_after <- plot_grid(as_grob(plotmap_after),rec_ratios_after,pheno_after_plot,pheno_after_zoom,ncol=2,labels=c("A","B","C","D"),label_size=20)
ggsave("figures/fig3.pdf",grid_after,width=14,height = 10)
ggsave("figures/fig3.png",grid_after,width=14,height = 10)
grid_after
ggsave("figures/fig3prev.pdf",grid_after,width=14,height = 10)
```
# Differences between real and reference genotypes for parental strains
......@@ -297,9 +294,6 @@ narrow_grid <- ggdraw() +
narrow_grid
ggsave(narrow_grid,file="figures/figS3prev.pdf",width=10,height=14)
ggsave(narrow_grid,file="figures/figS3prev.png",width=10,height=14)
rm(peak1,peak1_tab,peak2,peak2_tab,peak3,peak3_tab,peak5,peak5_tab)
```
......@@ -308,17 +302,17 @@ rm(peak1,peak1_tab,peak2,peak2_tab,peak3,peak3_tab,peak5,peak5_tab)
### Map before and rec ratio distrib
```{r}
grid_mapbef <- plot_grid(plotmap_before_data2,rec_ratios_before_data2,plotmap_before_data3,rec_ratios_before_data3,ncol=2,labels=c("A","B","C","D"),label_size=20)
grid_mapbef <- plot_grid(plotmap_before_data2,plotmap_before_data3,rec_ratios_before_data2,rec_ratios_before_data3,ncol=2,labels=c("A","B","C","D"),label_size=20)
ggsave("figures/figS2.pdf",grid_mapbef ,width=14,height = 10)
ggsave("figures/figS2prev.pdf",grid_mapbef ,width=14,height = 10)
```
### Map after and rec ratio distrib
```{r}
grid_mapaf <- plot_grid(plotmap_after_data2,rec_ratios_after_data2,plotmap_after_data3,rec_ratios_after_data3,ncol=2,labels=c("A","B","C","D"),label_size=20)
grid_mapaf <- plot_grid(plotmap_after_data2,plotmap_after_data3,rec_ratios_after_data2,rec_ratios_after_data3,ncol=2,labels=c("A","B","C","D"),label_size=20)
ggsave("figures/figS4.pdf",grid_mapaf,width=14,height = 10)
ggsave("figures/figS4prev.pdf",grid_mapaf,width=14,height = 10)
```
### Scans
......
No preview for this file type
......@@ -88,7 +88,7 @@ load("files/cluster/newmap_before.rda")
# plot
plotMap(cross_before,newmap_before,shift=TRUE)
plotmap_before <- ~plotMap(cross_before,newmap_before,shift=TRUE,main="Before stuart", ylab='')
plotmap_before <- ~plotMap(cross_before,newmap_before,shift=TRUE,main="", ylab='')
```
## Before: plot genome scan
......@@ -119,7 +119,8 @@ pheno_before_plot <- qtl_plot(pheno_before,lod=data.frame(group = c("alpha=0.05"
size=0.6,
strip.pos="bottom") +
theme(legend.position = "none") +
ggtitle("")
ggtitle("Genome scan") +
theme(plot.title = element_text(face="plain",size=14))
pheno_before_plot
chrs <- c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "X")
......@@ -155,8 +156,9 @@ pheno_before_zoom <- qtl_plot(pheno_before,lod=data.frame(group = c("alpha=0.05"
theme(legend.position = "none",
strip.background = element_blank(),
strip.text.x = element_blank()) +
xlab("Position (cM)") +
ggtitle("Peak 2")
xlab("Position on chromosome 13 (cM)") +
ggtitle("Peak p2") +
theme(plot.title = element_text(face="plain",size=14))
pheno_before_zoom
```
......@@ -221,12 +223,13 @@ rec_ratios %>% summarise(mean=mean(rat_prev,na.rm=TRUE),
rec_ratios_before <- rec_ratios %>% ggplot(aes(x=rat_prev)) +
geom_histogram(binwidth = .1,alpha=0.4, position="identity",fill="#990000") +
scale_x_log10() +
scale_x_log10(limits=c(0.2,1000)) +
labs(x="Ratio between the calculated and the known distance with the previous marker",
y="Count",
fill="",
title="Fold change distance between adjacent markers") +
ggpubr::theme_classic2()
title="Distance between adjacent markers") +
ggpubr::theme_classic2() +
theme(plot.title = element_text(face="plain",size=14,hjust=0.5))
rec_ratios_before
......@@ -262,7 +265,7 @@ load("files/cluster2/newmap_after2.rda")
# plot
plotMap(cross_after2,newmap_after2,shift=TRUE)
plotmap_after <- ~plotMap(cross_after2,newmap_after2,shift=TRUE,main="After stuart")
plotmap_after <- ~plotMap(cross_after2,newmap_after2,shift=TRUE,main="")
```
### After: plot genome scan
......@@ -291,8 +294,9 @@ pheno_after_plot <- qtl_plot(pheno_after,lod=data.frame(group = c("alpha=0.05",
size=0.6,
strip.pos="bottom") +
theme(legend.position = "none") +
ggtitle("")
pheno_after_plot
ggtitle("Genome scan") +
theme(plot.title = element_text(face="plain",size=14))
pheno_after_plot
pheno_after_zoom <- qtl_plot(pheno_after,lod=data.frame(group = c("alpha=0.05", "alpha=0.1","alpha=0.63"),
lod = threshold_after[1:3]),
......@@ -306,7 +310,8 @@ pheno_after_zoom <- qtl_plot(pheno_after,lod=data.frame(group = c("alpha=0.05",
strip.background = element_blank(),
strip.text.x = element_blank()) +
xlab("Position (cM)") +
ggtitle("QTL")
ggtitle("QTL") +
theme(plot.title = element_text(face="plain",size=14))
pheno_after_zoom
```
......@@ -368,12 +373,13 @@ rec_ratios %>% summarise(mean=mean(rat_prev,na.rm=TRUE),
rec_ratios_after <- rec_ratios %>% ggplot(aes(x=rat_prev)) +
geom_histogram(binwidth = .1,alpha=0.4, position="identity",fill="#2171b5") +
scale_x_log10() +
scale_x_log10(limits=c(0.2,1000)) +
labs(x="Ratio between the calculated and the known distance with the previous marker",
y="ount",
y="Count",
fill="",
title="Fold change distance between adjacent markers") +
ggpubr::theme_classic2()
title="Distance between adjacent markers") +
ggpubr::theme_classic2() +
theme(plot.title = element_text(face="plain",size=14,hjust=0.5))
rec_ratios_after
......@@ -416,7 +422,6 @@ peak1 <- qtl_plot(pheno_before,lod=data.frame(group = c("alpha=0.05", "alpha=0.1
lod = threshold_before[1:3]),
ylab="LOD score",
title="QTL mapping",
x.label = element_blank(),
size=0.6,
strip.pos="bottom",
chr="5",
......@@ -424,9 +429,10 @@ peak1 <- qtl_plot(pheno_before,lod=data.frame(group = c("alpha=0.05", "alpha=0.1
theme(legend.position = "none",
strip.background = element_blank(),
strip.text.x = element_blank()) +
xlab("Position (cM)") +
xlab("Position on chromosome 5 (cM)") +
xlim(c(15,35)) +
ggtitle("Peak 1: 1 marker")
ggtitle("Peak p1") +
theme(plot.title = element_text(face="plain",size=14))
peak1
```
......@@ -490,9 +496,10 @@ peak2 <- qtl_plot(pheno_before,
theme(legend.position = "none",
strip.background = element_blank(),
strip.text.x = element_blank()) +
xlab("Position (cM)") +
xlab("Position on chromosome 13 (cM)") +
xlim(c(23,43)) +
ggtitle("Peak 2")
ggtitle("Peak p2") +
theme(plot.title = element_text(face="plain"))
peak2
```
......@@ -548,8 +555,8 @@ test_plot
pheno_data1 <- phenos %>% ggplot(aes(x=Pheno)) +
geom_histogram(binwidth=0.1) +
ggpubr::theme_classic2() +
labs(y="Count", x="Quantitative phenotype",title="Data 1") +
theme(plot.title = element_text(hjust=0.5))
labs(y="Count", x="Quantitative phenotype",title="Dataset 1") +
theme(plot.title = element_text(hjust=0.5,size=14))
pheno_data1
```
......
No preview for this file type
No preview for this file type
......@@ -52,7 +52,7 @@ plotMap(cross_before,newmap_before,shift=TRUE)
cross_before_data2 <- cross_before
newmap_before_data2 <- newmap_before
plotmap_before_data2 <- ~plotMap(cross_before_data2,newmap_before_data2,shift=TRUE,main="Data 2", ylab='')
plotmap_before_data2 <- ~plotMap(cross_before_data2,newmap_before_data2,shift=TRUE,main='',ylab='')
```
### Before: plot genome scan
......@@ -148,12 +148,13 @@ rec_ratios %>% summarise(mean=mean(rat_prev,na.rm=TRUE),
rec_ratios_before_data2 <- rec_ratios %>% ggplot(aes(x=rat_prev)) +
geom_histogram(binwidth = .1,alpha=0.4, position="identity",fill="#990000") +
scale_x_log10() +
scale_x_log10(limits=c(0.2,1000)) +
labs(x="Ratio between the calculated and the known distance with the previous marker",
y="ount",
y="Count",
fill="",
title="Fold change distance between adjacent markers") +
ggpubr::theme_classic2()
title="Distance between adjacent markers") +
ggpubr::theme_classic2() +
theme(plot.title = element_text(face="plain",size=14,hjust=0.5))
rec_ratios_before_data2
......@@ -208,7 +209,7 @@ plotMap(cross_after,newmap_after,shift=TRUE)
cross_after_data2 <- cross_after
newmap_after_data2 <- newmap_after
plotmap_after_data2 <- ~plotMap(cross_after_data2,newmap_after_data2,shift=TRUE,main="Data 2", ylab='')
plotmap_after_data2 <- ~plotMap(cross_after_data2,newmap_after_data2,shift=TRUE,main="")
tab2 <- mark_estmap(tab=tab2,map=newmap_after,annot=annot_mini) #0 marker removed
......@@ -238,7 +239,8 @@ pheno_after_plot_data2 <- qtl_plot(pheno_after,lod=data.frame(group = c("alpha=0
x.label = element_blank(),
size=0.6) +
theme(legend.position = "none") +
ggtitle("Data 2")
ggtitle("Dataset 2: genome scan") +
theme(plot.title = element_text(face="plain",size=14,hjust=0.5))
pheno_after_plot_data2
```
......@@ -329,12 +331,13 @@ rec_ratios %>% summarise(mean=mean(rat_prev,na.rm=TRUE),
rec_ratios_after_data2 <- rec_ratios %>% ggplot(aes(x=rat_prev)) +
geom_histogram(binwidth = .1,alpha=0.4, position="identity",fill="#2171b5") +
scale_x_log10() +
scale_x_log10(limits=c(0.2,1000)) +
labs(x="Ratio between the calculated and the known distance with the previous marker",
y="ount",
y="Count",
fill="",
title="Fold change distance between adjacent markers") +
ggpubr::theme_classic2()
title="Distance between adjacent markers") +
ggpubr::theme_classic2() +
theme(plot.title = element_text(face="plain",size=14,hjust=0.5))
rec_ratios_after_data2
......@@ -364,7 +367,8 @@ pheno_before_annot_data2 <- pheno_before_plot + geom_text(
label = label,
color="blue")
) +
ggtitle("Data 2")
ggtitle("Dataset 2: genome scan") +
theme(plot.title = element_text(face="plain",size=14,hjust=0.5))
pheno_before_annot_data2
rm(ann_dat_text)
......@@ -379,7 +383,6 @@ peak3 <- qtl_plot(pheno_before,lod=data.frame(group = c("alpha=0.05", "alpha=0.1
lod = threshold_before[1:3]),
ylab="LOD score",
title="QTL mapping",
x.label = element_blank(),
size=0.6,
strip.pos="bottom",
chr="11",
......@@ -387,9 +390,10 @@ peak3 <- qtl_plot(pheno_before,lod=data.frame(group = c("alpha=0.05", "alpha=0.1
theme(legend.position = "none",
strip.background = element_blank(),
strip.text.x = element_blank()) +
xlab("Position (cM)") +
xlab("Position on chromosome 11 (cM)") +
xlim(c(11,31)) +
ggtitle("Peak 3: 1 pseudomarker")
ggtitle("Peak p3") +
theme(plot.title = element_text(face="plain",size=14,hjust=0.5))
peak3
```
......@@ -444,8 +448,8 @@ The two markers before the pseudomarker have an excess of homozygous.
pheno_data2 <- phenos %>% ggplot(aes(x=Pheno)) +
geom_histogram(binwidth=0.1) +
ggpubr::theme_classic2() +
labs(y="Count", x="Quantitative phenotype",title="Data 2") +
theme(plot.title = element_text(hjust=0.5))
labs(y="Count", x="Quantitative phenotype",title="Dataset 2") +
theme(plot.title = element_text(hjust=0.5,size=14))
pheno_data2
```
......
No preview for this file type
No preview for this file type
......@@ -51,7 +51,7 @@ plotMap(cross_before,newmap_before,shift=TRUE)
cross_before_data3 <- cross_before
newmap_before_data3 <- newmap_before
plotmap_before_data3 <- ~plotMap(cross_before_data3,newmap_before_data3,shift=TRUE,main="Data 3", ylab='')
plotmap_before_data3 <- ~plotMap(cross_before_data3,newmap_before_data3,shift=TRUE,main="", ylab='')
```
### Before: plot genome scan
......@@ -147,12 +147,13 @@ rec_ratios %>% summarise(mean=mean(rat_prev,na.rm=TRUE),
rec_ratios_before_data3 <- rec_ratios %>% ggplot(aes(x=rat_prev)) +
geom_histogram(binwidth = .1,alpha=0.4, position="identity",fill="#990000") +
scale_x_log10() +
scale_x_log10(limits=c(0.2,1000)) +
labs(x="Ratio between the calculated and the known distance with the previous marker",
y="ount",
y="Count",
fill="",
title="Fold change distance between adjacent markers") +
ggpubr::theme_classic2()
title="Distance between adjacent markers") +
ggpubr::theme_classic2() +
theme(plot.title = element_text(hjust=0.5,size=14))
rec_ratios_before_data3
......@@ -226,7 +227,7 @@ plotMap(cross_after2,newmap_after2,shift=TRUE)
cross_after_data3 <- cross_after2
newmap_after_data3 <- newmap_after2
plotmap_after_data2 <- ~plotMap(cross_after_data3,newmap_after_data3,shift=TRUE,main="Data 3", ylab='')
plotmap_after_data3 <- ~plotMap(cross_after_data3,newmap_after_data3,shift=TRUE,main="")
```
```{r after_scan}
......@@ -254,7 +255,8 @@ pheno_after_plot_data3 <- qtl_plot(pheno_after,lod=data.frame(group = c("alpha=0
x.label = element_blank(),
size=0.6) +
theme(legend.position = "none") +
ggtitle("Data 3")
ggtitle("Dataset 3: genome scan") +
theme(plot.title = element_text(face="plain",size=14,hjust=0.5))
pheno_after_plot_data3
```
......@@ -316,12 +318,13 @@ rec_ratios %>% summarise(mean=mean(rat_prev,na.rm=TRUE),
rec_ratios_after_data3 <- rec_ratios %>% ggplot(aes(x=rat_prev)) +
geom_histogram(binwidth = .1,alpha=0.4, position="identity",fill="#2171b5") +
scale_x_log10() +
scale_x_log10(limits=c(0.2,1000)) +
labs(x="Ratio between the calculated and the known distance with the previous marker",
y="ount",
y="Count",
fill="",
title="Fold change distance between adjacent markers") +
ggpubr::theme_classic2()
title="Distance between adjacent markers") +
ggpubr::theme_classic2() +
theme(plot.title = element_text(hjust=0.5,size=14))
rec_ratios_after_data3
......@@ -378,7 +381,8 @@ pheno_before_annot_data3 <- pheno_before_plot + geom_text(
label = label,
color="blue")
) +
ggtitle("Data 3")
ggtitle("Dataset 3: genome scan") +
theme(plot.title = element_text(face="plain",size=14,hjust=0.5))
pheno_before_annot_data3
```
......@@ -448,8 +452,8 @@ geno_plot4
pheno_data3 <- phenos %>% ggplot(aes(x=Pheno)) +
geom_histogram(binwidth=0.2) +
ggpubr::theme_classic2() +
labs(y="Count", x="Quantitative phenotype",title="Data 3") +
theme(plot.title = element_text(hjust=0.5))
labs(y="Count", x="Quantitative phenotype",title="Dataset 3") +
theme(plot.title = element_text(hjust=0.5,size=14))
pheno_data3
```
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
Supports Markdown
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