diff --git a/.utilities.R b/.utilities.R index ca633fd..09f56d4 100644 --- a/.utilities.R +++ b/.utilities.R @@ -2,10 +2,11 @@ # # Miscellaneous R code to suppport the project # -# Version: 1.3 -# Date: 2017 09 - 2017 10 +# Version: 1.3.1 +# Date: 2017 09 - 2019 11 # Author: Boris Steipe # +# V 1.3.1 prefix Biostrings:: to subseq() # V 1.3 load msa support functions # V 1.2 update database utilities to support 2017 version of JSON sources # V 1.1 2017 updates for ABC-units @@ -134,7 +135,8 @@ waitTimer <- function(t, nIntervals = 50) { fetchMSAmotif <- function(ali, mot) { - # retrieve a subset from ali that spans the sequence in mot. + # Retrieve a subset from ali that spans the sequence in mot. + # Biostrings package must be installed. # Parameters: # ali MsaAAMultipleAlignment object # mot chr substring within ali @@ -169,7 +171,7 @@ fetchMSAmotif <- function(ali, mot) { x <- as.numeric(x) x <- cumsum(x) - return(subseq(ali@unmasked, + return(Biostrings::subseq(ali@unmasked, start = which(x == motifStart)[1], # get the first position end = which(x == motifEnd)[1])) }