Skip to content

Commit

Permalink
Update runDoRothEA.R
Browse files Browse the repository at this point in the history
Fix the hidden bug when calling the object "viper_regulon" instead of "regulon" inside the function.

This function didn't return an error so far, possible due to the fact that the object "viper_regulon" was loaded into the workspace prior to calling the function. Nevertheless, it is a standard practice to correct all detected bugs to prevent future issues.


Former-commit-id: 84ef4f6 [formerly 68fc0c6]
Former-commit-id: ef1cc7d
  • Loading branch information
ptrairatphisan committed Jun 4, 2019
1 parent 2f5615e commit 31556c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/runDoRothEA.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ runDoRothEA<-function(df, regulon, confidence_level=c('A','B','C'), write2file =
library(viper)
library(tibble)
library(tidyr)
names(regulon) <- sapply(strsplit(names(viper_regulon), split = ' - '), head, 1)
# names(regulon) <- sapply(strsplit(names(viper_regulon), split = ' - '), head, 1)
names(regulon) <- sapply(strsplit(names(regulon), split = ' - '), head, 1)
filtered_regulon <- regulon %>%
map_df(.f = function(i) {
tf_target = i$tfmode %>%
Expand Down

0 comments on commit 31556c2

Please sign in to comment.