@@ -86,44 +86,44 @@ while (i < nrow(out_table)) {
8686}
8787
8888# skipping diagnostinc plots for chromosome 9
89-
90- if (is.element(" 9" ,chrs )){
91- cat(" Creating diagnostic plots...\n " , file = stderr())
92- # Some diagnostic plots
93- pdf(paste0(output_body , " .diagnostic_plots.pdf" ))
94- smoothScatter(gc , logratio , pch = " ." , xlab = " GC-content" , ylab = " Log-ratio" )
95- smoothScatter(tumour_fb_ratio , logratio , pch = " ." , xlab = " Tumour FB ratio" , ylab = " Log-ratio" )
96- smoothScatter(normal_fb_ratio , logratio , pch = " ." , xlab = " Normal FB ratio" , ylab = " Log-ratio" )
97- plot.gam(gam_m , rugplot = F )
98- idx = d.t [,1 ] == " 9"
99- plot(d.t [idx , 3 ], d.t [idx , 6 ], xlab = " Chr 9 position" , ylab = " Read depth" , pch = " ." )
100- plot(d.t [idx , 3 ], normalised_logratio [idx ], xlab = " Chr 9 position" , ylab = " Normalised log-ratio" , pch = " ." )
101- dev.off()
102- }else if (is.element(" chr9" ,chrs )){
103- cat(" Creating diagnostic plots...\n " , file = stderr())
104- # Some diagnostic plots
105- pdf(paste0(output_body , " .diagnostic_plots.pdf" ))
106- smoothScatter(gc , logratio , pch = " ." , xlab = " GC-content" , ylab = " Log-ratio" )
107- smoothScatter(tumour_fb_ratio , logratio , pch = " ." , xlab = " Tumour FB ratio" , ylab = " Log-ratio" )
108- smoothScatter(normal_fb_ratio , logratio , pch = " ." , xlab = " Normal FB ratio" , ylab = " Log-ratio" )
109- plot.gam(gam_m , rugplot = F )
110- idx = d.t [,1 ] == " chr9"
111- plot(d.t [idx , 3 ], d.t [idx , 6 ], xlab = " Chr 9 position" , ylab = " Read depth" , pch = " ." )
112- plot(d.t [idx , 3 ], normalised_logratio [idx ], xlab = " Chr 9 position" , ylab = " Normalised log-ratio" , pch = " ." )
113- dev.off()
114- }else {
115- cat(" Diagnostic plots created for fifth chromosome in the list...\n " , file = stderr())
116- # Some diagnostic plots
117- pdf(paste0(output_body , " .diagnostic_plots.pdf" ))
118- smoothScatter(gc , logratio , pch = " ." , xlab = " GC-content" , ylab = " Log-ratio" )
119- smoothScatter(tumour_fb_ratio , logratio , pch = " ." , xlab = " Tumour FB ratio" , ylab = " Log-ratio" )
120- smoothScatter(normal_fb_ratio , logratio , pch = " ." , xlab = " Normal FB ratio" , ylab = " Log-ratio" )
121- plot.gam(gam_m , rugplot = F )
122- idx = d.t [,1 ] == chrs [5 ]
123- plot(d.t [idx , 3 ], d.t [idx , 6 ], xlab = paste0(" chr " ,chrs [5 ]," position" ), ylab = " Read depth" , pch = " ." )
124- plot(d.t [idx , 3 ], normalised_logratio [idx ], xlab = paste0(" chr " ,chrs [5 ]," position" ), ylab = " Normalised log-ratio" , pch = " ." )
125- dev.off()
126- }
89+ library( mgcv )
90+ # if(is.element("9",chrs)){
91+ # cat("Creating diagnostic plots...\n", file = stderr())
92+ # # Some diagnostic plots
93+ # pdf(paste0(output_body, ".diagnostic_plots.pdf"))
94+ # smoothScatter(gc, logratio, pch = ".", xlab = "GC-content", ylab = "Log-ratio")
95+ # smoothScatter(tumour_fb_ratio, logratio, pch = ".", xlab = "Tumour FB ratio", ylab = "Log-ratio")
96+ # smoothScatter(normal_fb_ratio, logratio, pch = ".", xlab = "Normal FB ratio", ylab = "Log-ratio")
97+ # plot.gam(gam_m, rugplot = F)
98+ # idx = d.t[,1] == "9"
99+ # plot(d.t[idx, 3], d.t[idx, 6], xlab = "Chr 9 position", ylab = "Read depth", pch = ".")
100+ # plot(d.t[idx, 3], normalised_logratio[idx], xlab = "Chr 9 position", ylab = "Normalised log-ratio", pch = ".")
101+ # dev.off()
102+ # }else if(is.element("chr9",chrs)){
103+ # cat("Creating diagnostic plots...\n", file = stderr())
104+ # # Some diagnostic plots
105+ # pdf(paste0(output_body, ".diagnostic_plots.pdf"))
106+ # smoothScatter(gc, logratio, pch = ".", xlab = "GC-content", ylab = "Log-ratio")
107+ # smoothScatter(tumour_fb_ratio, logratio, pch = ".", xlab = "Tumour FB ratio", ylab = "Log-ratio")
108+ # smoothScatter(normal_fb_ratio, logratio, pch = ".", xlab = "Normal FB ratio", ylab = "Log-ratio")
109+ # plot.gam(gam_m, rugplot = F)
110+ # idx = d.t[,1] == "chr9"
111+ # plot(d.t[idx, 3], d.t[idx, 6], xlab = "Chr 9 position", ylab = "Read depth", pch = ".")
112+ # plot(d.t[idx, 3], normalised_logratio[idx], xlab = "Chr 9 position", ylab = "Normalised log-ratio", pch = ".")
113+ # dev.off()
114+ # }else{
115+ # cat("Diagnostic plots created for fifth chromosome in the list...\n", file = stderr())
116+ # # Some diagnostic plots
117+ # pdf(paste0(output_body, ".diagnostic_plots.pdf"))
118+ # smoothScatter(gc, logratio, pch = ".", xlab = "GC-content", ylab = "Log-ratio")
119+ # smoothScatter(tumour_fb_ratio, logratio, pch = ".", xlab = "Tumour FB ratio", ylab = "Log-ratio")
120+ # smoothScatter(normal_fb_ratio, logratio, pch = ".", xlab = "Normal FB ratio", ylab = "Log-ratio")
121+ # plot.gam(gam_m, rugplot = F)
122+ # idx = d.t[,1] == chrs[5]
123+ # plot(d.t[idx, 3], d.t[idx, 6], xlab = paste0("chr ",chrs[5]," position"), ylab = "Read depth", pch = ".")
124+ # plot(d.t[idx, 3], normalised_logratio[idx], xlab = paste0("chr ",chrs[5]," position"), ylab = "Normalised log-ratio", pch = ".")
125+ # dev.off()
126+ # }
127127
128128cat(" Outputting data...\n " , file = stderr())
129129
0 commit comments