Skip to content

Commit

Permalink
better error message when protein domains can't be drawn due to lack …
Browse files Browse the repository at this point in the history
…of strand info
  • Loading branch information
suhrig committed Dec 23, 2022
1 parent 4b500dc commit ab17022
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions draw_fusions.R
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ drawProteinDomains <- function(fusion, exons1, exons2, proteinDomains, color1, c
text(0.5, 0.5, "No coding regions retained in fusion transcript.")
return(NULL)
}
if ((codingLength1 == 0 || grepl("\\.$", fusion$strand1)) && (codingLength2 == 0 || grepl("\\.$", fusion$strand2))) {
text(0.5, 0.5, "Failed to determine retained protein domains due to lack of strand information.")
return(NULL)
}
antisenseTranscription1 <- sub("/.*", "", fusion$strand1) != sub(".*/", "", fusion$strand1)
antisenseTranscription2 <- sub("/.*", "", fusion$strand2) != sub(".*/", "", fusion$strand2)
if ((codingLength1 == 0 || antisenseTranscription1) && (codingLength2 == 0 || antisenseTranscription2)) {
Expand Down

0 comments on commit ab17022

Please sign in to comment.