forked from aniafijarczyk/Fijarczyk2020_JeanTalon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73eb575
commit c3f7b60
Showing
12 changed files
with
149 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,36 @@ | ||
Code and input files for plotting Figure 1: results of ploidy estimation, spore viability, large copy number variants and aneuploidies | ||
|
||
|
||
### Ploidy estimation measured with DNA staining & fluorescence | ||
plotFigure1.R | ||
|
||
plotPloidy.R | ||
|
||
requirements: | ||
./input_files/Ploidy_JT_tot.txt | ||
### Ploidy estimation measured with DNA staining & fluorescence | ||
|
||
output: | ||
plotPloidy.pdf | ||
./input_files/Ploidy_JT_tot.txt.gz | ||
|
||
./output/plotPloidy.pdf | ||
|
||
|
||
### Distribution of allele frequencies of single nucleotide variants in Jean-Talon | ||
|
||
plotFreq.R | ||
### Distribution of allele frequencies of single nucleotide variants in Jean-Talon | ||
|
||
requirements: | ||
./input_files/SNP_frequencies.tab | ||
./input_files/SNP_frequencies.tab.gz | ||
|
||
output: | ||
plotFreq.pdf | ||
./output/plotFreq.pdf | ||
|
||
|
||
|
||
### Viable spores per tetrad | ||
|
||
plotDotplot.R | ||
|
||
requirements: | ||
./input_files/sporulation_data.tab | ||
|
||
output: | ||
plotDotplot.pdf | ||
./output/plotDotplot.pdf | ||
|
||
|
||
|
||
### Copy number in 250 bp windows across the Jean-Talon genome | ||
|
||
plotCNVsInGenome.R | ||
|
||
requirements: | ||
./input_files/formatInput_Jean-Talon.tab | ||
./input_files/formatInput_Jean-Talon.tab.gz | ||
|
||
output: | ||
plotCNVsInGenome.pdf | ||
./output/plotCNVsInGenome.pdf |
26 changes: 0 additions & 26 deletions
26
01_ploidy_spore_viability_aneuploidies/input_files/sporulation_data.tab
This file was deleted.
Oops, something went wrong.
Binary file renamed
BIN
+315 KB
...ability_aneuploidies/plotCNVsInGenome.pdf → ..._aneuploidies/output/plotCNVsInGenome.pdf
Binary file not shown.
Binary file renamed
BIN
+4.95 KB
...re_viability_aneuploidies/plotDotplot.pdf → ...ility_aneuploidies/output/plotDotplot.pdf
Binary file not shown.
Binary file renamed
BIN
+4.58 KB
...spore_viability_aneuploidies/plotFreq.pdf → ...iability_aneuploidies/output/plotFreq.pdf
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
|
||
### Plotting ploidy from DNA staining of the Jean-Talon colonies | ||
|
||
# author:Souhir Marsit | ||
library(ggplot2) | ||
library(dplyr) | ||
|
||
|
||
tab_total = read.table(gzfile('./input_files/Ploidy_JT_tot.txt.gz'), header = T, sep = '\t') | ||
tab_total= filter (tab_total, GRN.B.HLog> 2000) | ||
tab_ech= filter (tab_total, ech != 90) | ||
tab_ech= filter (tab_ech, ech != 93) | ||
tab_ech= filter (tab_ech, ech !=91) | ||
tab_ech= filter (tab_ech, ech != 92) | ||
tab_ech= filter (tab_ech, ech != 89) | ||
tab_ech= filter (tab_ech, ech != 96) | ||
tab_ech= filter (tab_ech, ech != 95) | ||
tab_ech= filter (tab_ech, ech != 94) | ||
tab_ech= filter (tab_ech, GRN.B.HLog> 5000) | ||
tab_ech= filter (tab_ech, ech != "ech") | ||
tab_ech = mutate (tab_ech, "rep"= "sampl") | ||
tab_ctl1= filter(tab_total, ech==90 ) | ||
tab_ctl2= filter(tab_total, ech==93 ) | ||
tab_ctl1 = mutate (tab_ctl1, "rep"= "ctl1") | ||
tab_ctl2 = mutate (tab_ctl2, "rep"= "ctl2") | ||
tab_tot = rbind (tab_ctl1, tab_ctl2, tab_ech) | ||
|
||
|
||
p <- ggplot(tab_tot, aes(x = GRN.B.HLog, colour = rep, group = ech, linetype = rep)) + | ||
geom_density() + | ||
scale_colour_manual(values = c(ctl1 = "black", ctl2 = "black", sampl= "black", name="")) + | ||
scale_linetype_manual(values = c(ctl1 = "dotted", ctl2 = "longdash", sampl = "solid", name="")) + | ||
xlim(0, 35000) + | ||
labs(x = "Fluorescence (a.u.)", y = "Density") + | ||
theme(panel.background = element_blank(), | ||
panel.grid = element_blank(), | ||
legend.position = "None", | ||
legend.title = element_blank(), | ||
axis.title = element_text(size = 20), | ||
axis.text = element_text(size = 16)) | ||
p | ||
|
||
|
||
pdf("./output/plotPloidy.pdf", onefile = T, width = 7, height = 7) | ||
p | ||
dev.off() | ||
|
||
|
||
|
||
### Plotting spore viability | ||
|
||
# author:aniafijarczyk | ||
library(ggplot2) | ||
library(dplyr) | ||
library(tidyr) | ||
|
||
#df <- read.table("./input_files/sporulation_data.tab", sep = "\t", header = TRUE) | ||
|
||
df <- data.frame("JT1" = c(1,2,0,2,0,2,1,2,1,2,0,1,3,1,2,1,3,0,0,2,1,2,1,0), | ||
"JT2" = c(2,3,1,1,2,2,1,2,2,0,1,1,2,2,1,1,0,1,2,1,0,2,1,0), | ||
"JT3" = c(2,1,0,2,1,4,1,2,2,2,0,0,0,2,2,1,2,1,1,2,0,2,1,1)) | ||
dd <- df %>% gather(key = "Replicate", value = "Spores", JT1:JT3) | ||
|
||
|
||
p <-ggplot(dd) + aes(x = Replicate, y = Spores) + | ||
geom_boxplot(fill = "grey80") + | ||
geom_dotplot(binaxis='y', stackdir='center',dotsize=1.2, stackratio = 1) + | ||
labs(x = "Replicates", y = "No. viable spores per tetrad") + | ||
theme(panel.background = element_blank(), | ||
panel.grid = element_blank(), | ||
axis.title = element_text(size = 18), | ||
axis.text.x = element_blank(), | ||
axis.ticks.x = element_blank(), | ||
axis.text.y = element_text(size = 18)) | ||
p | ||
|
||
pdf("./output/plotDotplot.pdf",w=7,h=4) | ||
p | ||
dev.off() | ||
|
||
|
||
|
||
### Plotting frequencies of the Jean-Talon variants | ||
|
||
|
||
df <- read.table(gzfile("./input_files/SNP_frequencies.tab.gz"), sep = "\t", header=TRUE) | ||
|
||
p <- ggplot(df) + aes(x = FreqAlt) + | ||
geom_histogram(colour = "white", fill = "black") + | ||
labs(x = "Variant frequency", y = "No. variants") + | ||
#ggtitle(label = " Frequency of mapped variants") + | ||
theme(panel.background = element_blank(), | ||
panel.grid = element_blank(), | ||
plot.title = element_text(hjust = 0.5, size = 18), | ||
axis.text = element_text(size = 16), | ||
axis.title = element_text(size = 20)) | ||
p | ||
|
||
pdf("./output/plotFreq.pdf",w=7,h=7) | ||
p | ||
dev.off() | ||
|
||
|
||
|
||
### Plotting coverage profile across Jean-Talon genome | ||
|
||
|
||
# Reading & filtering input | ||
|
||
df <- read.table(gzfile("./input_files/formatInput_Jean-Talon.tab.gz"), sep = "\t", header = TRUE) | ||
dff <- df %>% dplyr::filter(row_number() %% 3 != 1) ## Delete every 3rd row starting from 1 | ||
|
||
|
||
# Plotting coverage | ||
p <- ggplot(dff) + | ||
geom_rect(data=df,aes(xmin = win_stop-250, xmax = win_stop, ymin = -Inf, ymax = Inf, fill = chrom)) + | ||
scale_fill_manual(values = rep(c("white","grey80"),8)) + | ||
geom_point(aes(x = win_stop-125, y = cn, colour = type), size = 0.1) + | ||
scale_colour_manual(values = c("#D55E00", "#0072B2","grey20")) + | ||
#facet_wrap(~chrom, ncol = 4) + | ||
scale_x_continuous(expand = c(0, 0), breaks = c(115132.5,637066.5,1202495,2127210,3182043,3606023,4286949.5,5114076,5615542,6208748.5,6915625.5,7788439.5,8789909.5,9644448.5,10582321.5,11602066.5), | ||
labels = c("I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV","XVI")) + | ||
scale_y_continuous(limits = c(0,8)) + | ||
#geom_text(data = dtext, aes(x = pos.x, y = pos.y, label = label)) + | ||
labs(x = "Chromosomes", y = "Norm. copy number") + | ||
theme(panel.background = element_blank(), | ||
panel.grid = element_blank(), | ||
legend.position = "none", | ||
axis.text = element_text(size = 12), | ||
axis.title = element_text(size = 14), | ||
axis.ticks.x = element_blank()) | ||
p | ||
|
||
|
||
# Saving plot | ||
pdf("./output/plotCNVsInGenome.pdf",w=12,h=3) | ||
p | ||
dev.off() | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.