Skip to content

Commit fa080df

Browse files
Quit step 2 when neither of the contrasts were calculated
1 parent cb8fdd0 commit fa080df

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tools/dockerfiles/scripts/diff_tools/run_deseq_lrt_step_2.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,17 @@ for (i in 1:length(selected_contrasts)) {
256256
}
257257
print("Collected DESeq results")
258258
collected_deseq_results <- collected_deseq_results %>%
259-
rownames_to_column(var="Feature") # we need to to join with cluster information
259+
rownames_to_column(var="Feature") # we need to to join with cluster information
260260
print(head(collected_deseq_results))
261+
if(!any(grepl("_padj$", colnames(collected_deseq_results)))){ # to check that we have at least one contrast successfully calculated
262+
print(
263+
paste(
264+
"Exiting: neither of the selected",
265+
"contrasts were successfully calculated."
266+
)
267+
)
268+
quit(save="no", status=1, runLast=FALSE)
269+
}
261270

262271
print(
263272
paste(

0 commit comments

Comments
 (0)