diff --git a/public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/plot_heatmap.R b/public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/plot_heatmap.R index ec3e98da470c22812f7a3d21fb921674e1fd6e85..2f6acb3b7ee6139cf8953024af51978917287931 100755 --- a/public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/plot_heatmap.R +++ b/public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/plot_heatmap.R @@ -136,7 +136,13 @@ plotPlaceholder <- function(out.name=OUTPUT.PLOT, text.display="Not enough data } -parsed <- prepTable(INPUT.PATH) +parsed <- tryCatch( + prepTable(INPUT.PATH), + error=function (e) { + plotPlaceholder(text.display="Error occured during table parsing") + q(status=0) + }) + if (nrow(parsed) > 0) { cors <- cor(parsed, method="spearman") tryCatch(plotHeatmap(cors), error=function (e) plotPlaceholder(text.display="Error occured during plotting"))