-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
There's a bug with the addLogo function were the dbVersion always ended up with v10 and not the previous v9 when old version of the database is used.
Lines 22 to 44 in 33623d4
| addLogo <- function(motifEnrDT, addHTML=TRUE, dbVersion=NULL, motifCol="motif") | |
| { | |
| # Depending on whether it is the motif enrichment or annotation file: | |
| annotationVersion <- attr(motifEnrDT, "annotationVersion") | |
| if(is.null(annotationVersion)) annotationVersion <- attr(motifEnrDT, "SourceFileName") | |
| if(is.null(annotationVersion)) | |
| { | |
| warning("There is no annotation version attribute in the input table ", | |
| "(it has probably been loaded with an older version of the package).", | |
| "'v9' will be used as it was the old default,", | |
| "but we recommend to re-load the annotations and/or re-run the enrichment to make sure everything is consistent.") | |
| dbVersion <- 'v9' | |
| } | |
| if(is.null(dbVersion)) | |
| { | |
| if(grepl('v10|10nr', annotationVersion)) dbVersion <- 'v10nr_clust' | |
| if(grepl('v8|mc8nr', annotationVersion)) dbVersion <- 'v8' | |
| if(grepl('v9|mc9nr', annotationVersion)) dbVersion <- 'v9' | |
| }else{ | |
| dbVersion <- 'v10nr_clust' | |
| } |
In Line 28-35, the code already assigned v9 to dbVersion if previous version is detected.
Lines 28 to 35 in 33623d4
| if(is.null(annotationVersion)) | |
| { | |
| warning("There is no annotation version attribute in the input table ", | |
| "(it has probably been loaded with an older version of the package).", | |
| "'v9' will be used as it was the old default,", | |
| "but we recommend to re-load the annotations and/or re-run the enrichment to make sure everything is consistent.") | |
| dbVersion <- 'v9' | |
| } |
But the next if/else reset it back to v10nr_clust because dbVersion is not NULL.
The lead to wrong URLs to the motif logos embedded in the HTML.
Lines 37 to 44 in 33623d4
| if(is.null(dbVersion)) | |
| { | |
| if(grepl('v10|10nr', annotationVersion)) dbVersion <- 'v10nr_clust' | |
| if(grepl('v8|mc8nr', annotationVersion)) dbVersion <- 'v8' | |
| if(grepl('v9|mc9nr', annotationVersion)) dbVersion <- 'v9' | |
| }else{ | |
| dbVersion <- 'v10nr_clust' | |
| } |
DiracZhu1998
Metadata
Metadata
Assignees
Labels
No labels