Commit 01515227 authored by Stefano Beretta's avatar Stefano Beretta
Browse files

Update WESopt_plot_results.R

parent 14a5691d
...@@ -145,7 +145,7 @@ plot_variants <- function(full.t, out_dir, plot_prefix, fill_by) { ...@@ -145,7 +145,7 @@ plot_variants <- function(full.t, out_dir, plot_prefix, fill_by) {
############### ###############
### General ### ### General ###
############### ###############
wdir <- "WESopt" wdir <- "Fiumara_BasePrimeEd2022_WES/WESopt"
out_dir <- paste(wdir, "results", sep = "/") out_dir <- paste(wdir, "results", sep = "/")
dir.create(out_dir, showWarnings = F) dir.create(out_dir, showWarnings = F)
...@@ -162,7 +162,7 @@ samples <- c("S1_B1", "S2_B2", "S3_B3", ...@@ -162,7 +162,7 @@ samples <- c("S1_B1", "S2_B2", "S3_B3",
full.t <- data.frame() full.t <- data.frame()
for (ss in samples) { for (ss in samples) {
print(ss) print(ss)
t <- read.table(gzfile(paste(wdir, "data", ss, paste0(ss, "-DP500_PASS_sGQ80_sDP10.ANNOT.vcf.gz"), sep = "/")), comment.char = "#", sep = "\t") t <- read.table(gzfile(paste(wdir, "data", paste0(ss, "-DP500_PASS_sGQ80_sDP10.ANNOT.vcf.gz"), sep = "/")), comment.char = "#", sep = "\t")
colnames(t) <- c("CHROM","POS","ID","REF","ALT","QUAL","FILTER", "ANNOT", "FORMAT", "SAMPLE") colnames(t) <- c("CHROM","POS","ID","REF","ALT","QUAL","FILTER", "ANNOT", "FORMAT", "SAMPLE")
t$Sample <- ss t$Sample <- ss
t$Vars <- paste(t$CHROM, t$POS, t$REF, t$ALT, sep = "-") t$Vars <- paste(t$CHROM, t$POS, t$REF, t$ALT, sep = "-")
......
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