Prefix Biostrings:: to subseq()

This commit is contained in:
hyginn 2019-11-14 22:38:53 -05:00
parent 84aa2dca0b
commit bae2d33f14

View File

@ -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]))
}