Skip to content

Commit e28f80a

Browse files
committed
add mxsize argument to cmalign
1 parent 652df0e commit e28f80a

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: inferrnal
22
Title: Interface to Call Programs from Infernal RNA Covariance Model Package
3-
Version: 0.99.2
3+
Version: 0.99.3
44
Authors@R:
55
person(given = "Brendan",
66
family = "Furneaux",

NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# inferrnal 0.99.3
2+
3+
* Added `mxsize` argument to `cmalign` to change the maximum matrix size.
4+
15
# inferrnal 0.99.2
26

37
* Added convenience functions `cm_5_8S()`, `sample_rRNA_fasta()`,

R/inferrnal.R

+12-1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ cmsearch <- function(cm, seq, glocal = TRUE, alignment, cpu) {
200200
#' See \href{http://eddylab.org/infernal/}{Infernal} documentation for
201201
#' more information.
202202
#' @param cpu (\code{integer} scalar) The number of cpus to use.
203+
#' @param mxsize (\code{double} scalar) The maximum DP matrix size, in Mb.
204+
#' Maximum potential memory usage is approximately cpu*mxsize, although
205+
#' this is usually not realized.
206+
#' See \href{http://eddylab.org/infernal/}{Infernal} documentation for
207+
#' more information.
203208
#'
204209
#' @return the aligned sequences, as returned by
205210
#' \code{\link{read_stockholm_msa}}.
@@ -213,7 +218,7 @@ cmsearch <- function(cm, seq, glocal = TRUE, alignment, cpu) {
213218
#' # also works if the fasta file has already been loaded
214219
#' unaln <- Biostrings::readRNAStringSet(unaln)
215220
#' cmalign(cm, unaln, cpu = 1)
216-
cmalign <- function(cmfile, seq, glocal = TRUE, cpu) {
221+
cmalign <- function(cmfile, seq, glocal = TRUE, cpu = NULL, mxsize = NULL) {
217222
assertthat::assert_that(assertthat::is.readable(cmfile),
218223
assertthat::is.flag(glocal))
219224
args <- "cmalign"
@@ -222,6 +227,12 @@ cmalign <- function(cmfile, seq, glocal = TRUE, cpu) {
222227
assertthat::assert_that(assertthat::is.count(cpu))
223228
args <- c(args, "--cpu", cpu)
224229
}
230+
if (!missing(mxsize)) {
231+
assertthat::assert_that(
232+
assertthat::is.number(mxsize),
233+
mxsize > 0)
234+
args <- c(args, "--mxsize", mxsize)
235+
}
225236

226237
seqfile <- NULL
227238
if (assertthat::is.string(seq) && file.exists(seq)) {

man/cmalign.Rd

+7-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)