Prefix Biostrings:: to subseq()
This commit is contained in:
parent
84aa2dca0b
commit
bae2d33f14
10
.utilities.R
10
.utilities.R
@ -2,10 +2,11 @@
|
|||||||
#
|
#
|
||||||
# Miscellaneous R code to suppport the project
|
# Miscellaneous R code to suppport the project
|
||||||
#
|
#
|
||||||
# Version: 1.3
|
# Version: 1.3.1
|
||||||
# Date: 2017 09 - 2017 10
|
# Date: 2017 09 - 2019 11
|
||||||
# Author: Boris Steipe
|
# Author: Boris Steipe
|
||||||
#
|
#
|
||||||
|
# V 1.3.1 prefix Biostrings:: to subseq()
|
||||||
# V 1.3 load msa support functions
|
# V 1.3 load msa support functions
|
||||||
# V 1.2 update database utilities to support 2017 version of JSON sources
|
# V 1.2 update database utilities to support 2017 version of JSON sources
|
||||||
# V 1.1 2017 updates for ABC-units
|
# V 1.1 2017 updates for ABC-units
|
||||||
@ -134,7 +135,8 @@ waitTimer <- function(t, nIntervals = 50) {
|
|||||||
|
|
||||||
|
|
||||||
fetchMSAmotif <- function(ali, mot) {
|
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:
|
# Parameters:
|
||||||
# ali MsaAAMultipleAlignment object
|
# ali MsaAAMultipleAlignment object
|
||||||
# mot chr substring within ali
|
# mot chr substring within ali
|
||||||
@ -169,7 +171,7 @@ fetchMSAmotif <- function(ali, mot) {
|
|||||||
x <- as.numeric(x)
|
x <- as.numeric(x)
|
||||||
x <- cumsum(x)
|
x <- cumsum(x)
|
||||||
|
|
||||||
return(subseq(ali@unmasked,
|
return(Biostrings::subseq(ali@unmasked,
|
||||||
start = which(x == motifStart)[1], # get the first position
|
start = which(x == motifStart)[1], # get the first position
|
||||||
end = which(x == motifEnd)[1]))
|
end = which(x == motifEnd)[1]))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user