Skip to content

Commit

Permalink
fix case empty significant
Browse files Browse the repository at this point in the history
  • Loading branch information
wolski committed Nov 25, 2018
1 parent 8f21f91 commit 4002133
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/multigroupVolcano.R
Expand Up @@ -52,10 +52,12 @@ multigroupVolcano <- function(misspX,
effectX <-misspX[,effect]
typeX<-misspX[,type]
subsetData <- subset(misspX, (effectX < xintercept[1] | xintercept[2] < effectX) & typeX < pvalue )
p <- p + geom_text_repel(data=subsetData, aes_string(effect , colname , label=label),
size=size
, segment.size = segment.size,
segment.alpha = segment.alpha)
if(nrow(subsetData) > 0){
p <- p + geom_text_repel(data=subsetData, aes_string(effect , colname , label=label),
size=size
, segment.size = segment.size,
segment.alpha = segment.alpha)
}
}
return(p)
}
Expand Down

0 comments on commit 4002133

Please sign in to comment.