Skip to content

Commit

Permalink
Enable genome parameter to be a string; #1437
Browse files Browse the repository at this point in the history
  • Loading branch information
timoast committed Jun 28, 2023
1 parent 2ad6c3c commit 2d7ac60
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions R/motifs.R
Expand Up @@ -29,6 +29,14 @@ AddMotifs.default <- function(
if (verbose) {
message("Building motif matrix")
}
# genome can be string
if (is.character(x = genome)) {
if (!requireNamespace("BSgenome", quietly = TRUE)) {
stop("Please install BSgenome.
https://www.bioconductor.org/packages/BSgenome/")
}
genome <- BSgenome::getBSgenome(genome = genome)
}
motif.matrix <- CreateMotifMatrix(
features = object,
pwm = pfm,
Expand Down

0 comments on commit 2d7ac60

Please sign in to comment.