Last updated on 2026-08-01 06:54:15 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 0.4.0 | 119.93 | 183.46 | 303.39 | OK | |
| r-devel-linux-x86_64-debian-gcc | 0.4.0 | 112.24 | 129.47 | 241.71 | NOTE | |
| r-devel-linux-x86_64-fedora-clang | 0.4.0 | 139.00 | 285.01 | 424.01 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 0.4.0 | 119.00 | 124.56 | 243.56 | OK | |
| r-devel-windows-x86_64 | 0.4.0 | 139.00 | 194.00 | 333.00 | OK | |
| r-patched-linux-x86_64 | 0.4.0 | 147.58 | 175.83 | 323.41 | OK | |
| r-release-linux-x86_64 | 0.4.0 | 150.34 | 167.65 | 317.99 | OK | |
| r-release-macos-arm64 | 0.4.0 | 30.00 | 39.00 | 69.00 | OK | |
| r-release-macos-x86_64 | 0.4.0 | 79.00 | 185.00 | 264.00 | OK | |
| r-release-windows-x86_64 | 0.4.0 | 139.00 | 197.00 | 336.00 | OK | |
| r-oldrel-macos-arm64 | 0.4.0 | 24.00 | 47.00 | 71.00 | OK | |
| r-oldrel-macos-x86_64 | 0.4.0 | 86.00 | 140.00 | 226.00 | ERROR | |
| r-oldrel-windows-x86_64 | 0.4.0 | 168.00 | 251.00 | 419.00 | OK |
Version: 0.4.0
Check: for new files in some other directories
Result: NOTE
Found the following files/directories:
‘~/tmp/scratch/Rtmp0LQ0N0’ ‘~/tmp/scratch/Rtmp1BIeaf’
‘~/tmp/scratch/Rtmp1GHFFI’ ‘~/tmp/scratch/Rtmp1HkCil’
‘~/tmp/scratch/Rtmp1WLyU6’ ‘~/tmp/scratch/Rtmp1nrGcS’
‘~/tmp/scratch/Rtmp23zEqs’ ‘~/tmp/scratch/Rtmp265PE4’
‘~/tmp/scratch/Rtmp2brlEx’ ‘~/tmp/scratch/Rtmp2qqvyq’
‘~/tmp/scratch/Rtmp2tZIq7’ ‘~/tmp/scratch/Rtmp3XIDjo’
‘~/tmp/scratch/Rtmp3lkX5E’ ‘~/tmp/scratch/Rtmp47LcO0’
‘~/tmp/scratch/Rtmp4I4osq’ ‘~/tmp/scratch/Rtmp4X1TSH’
‘~/tmp/scratch/Rtmp4vbVsJ’ ‘~/tmp/scratch/Rtmp5fKfhc’
‘~/tmp/scratch/Rtmp6Brw58’ ‘~/tmp/scratch/Rtmp6LkHOi’
‘~/tmp/scratch/Rtmp6X9ABf’ ‘~/tmp/scratch/Rtmp6cx9hQ’
‘~/tmp/scratch/Rtmp7Kf33g’ ‘~/tmp/scratch/Rtmp7fUQGT’
‘~/tmp/scratch/Rtmp7pVyJy’ ‘~/tmp/scratch/Rtmp8dBHPa’
‘~/tmp/scratch/Rtmp8qY9Cl’ ‘~/tmp/scratch/Rtmp93jvNZ’
‘~/tmp/scratch/RtmpA9eWtI’ ‘~/tmp/scratch/RtmpAbbEZX’
‘~/tmp/scratch/RtmpAtyYmB’ ‘~/tmp/scratch/RtmpAwRsrA’
‘~/tmp/scratch/RtmpBHVLFd’ ‘~/tmp/scratch/RtmpBRVGfQ’
‘~/tmp/scratch/RtmpCCLd8p’ ‘~/tmp/scratch/RtmpCZvCaZ’
‘~/tmp/scratch/RtmpCbjup8’ ‘~/tmp/scratch/RtmpDUHMNI’
‘~/tmp/scratch/RtmpDtETsi’ ‘~/tmp/scratch/RtmpDzHEbO’
‘~/tmp/scratch/RtmpEmfMZc’ ‘~/tmp/scratch/RtmpEnEqxG’
‘~/tmp/scratch/RtmpEoVSYS’ ‘~/tmp/scratch/RtmpEsffCm’
‘~/tmp/scratch/RtmpF2K1BE’ ‘~/tmp/scratch/RtmpFdDWvX’
‘~/tmp/scratch/RtmpFx2kwU’ ‘~/tmp/scratch/RtmpG8HpNe’
‘~/tmp/scratch/RtmpGqf927’ ‘~/tmp/scratch/RtmpH82qMb’
‘~/tmp/scratch/RtmpHBHjSh’ ‘~/tmp/scratch/RtmpI4EIwN’
‘~/tmp/scratch/RtmpI8Eynn’ ‘~/tmp/scratch/RtmpICdVHu’
‘~/tmp/scratch/RtmpIm6i66’ ‘~/tmp/scratch/RtmpJ447HU’
‘~/tmp/scratch/RtmpJ4tynV’ ‘~/tmp/scratch/RtmpJKk5Px’
‘~/tmp/scratch/RtmpJaVLmb’ ‘~/tmp/scratch/RtmpKFfynH’
‘~/tmp/scratch/RtmpKcb3Um’ ‘~/tmp/scratch/RtmpKxu1Po’
‘~/tmp/scratch/RtmpL1li7M’ ‘~/tmp/scratch/RtmpLNMsLY’
‘~/tmp/scratch/RtmpLRF539’ ‘~/tmp/scratch/RtmpLSuZKt’
‘~/tmp/scratch/RtmpLYC3UB’ ‘~/tmp/scratch/RtmpLnF5Zs’
‘~/tmp/scratch/RtmpLxY0Ta’ ‘~/tmp/scratch/RtmpM7C9AC’
‘~/tmp/scratch/RtmpMRE1FB’ ‘~/tmp/scratch/RtmpMs3DiB’
‘~/tmp/scratch/RtmpNNVUsW’ ‘~/tmp/scratch/RtmpNjh4Oe’
‘~/tmp/scratch/RtmpNvYXye’ ‘~/tmp/scratch/RtmpO8cACM’
‘~/tmp/scratch/RtmpOBDraV’ ‘~/tmp/scratch/RtmpOCsPSD’
‘~/tmp/scratch/RtmpOmgtZG’ ‘~/tmp/scratch/RtmpOwKfyd’
‘~/tmp/scratch/RtmpP2CHBs’ ‘~/tmp/scratch/RtmpQCowLb’
‘~/tmp/scratch/RtmpQcgN8m’ ‘~/tmp/scratch/RtmpQf9wFe’
‘~/tmp/scratch/RtmpQnCrLw’ ‘~/tmp/scratch/RtmpRPp95U’
‘~/tmp/scratch/RtmpRXR9oL’ ‘~/tmp/scratch/RtmpRoK3S7’
‘~/tmp/scratch/RtmpTnbgCJ’ ‘~/tmp/scratch/RtmpU3iLVV’
‘~/tmp/scratch/RtmpUZkF7F’ ‘~/tmp/scratch/RtmpW1B1Bb’
‘~/tmp/scratch/RtmpWcyKQ2’ ‘~/tmp/scratch/RtmpWdp0Qa’
‘~/tmp/scratch/RtmpWjY6Zb’ ‘~/tmp/scratch/RtmpWmOoHJ’
‘~/tmp/scratch/RtmpWoFTbA’ ‘~/tmp/scratch/RtmpXhBaHx’
‘~/tmp/scratch/RtmpY0xq2s’ ‘~/tmp/scratch/RtmpY81WgA’
‘~/tmp/scratch/RtmpY9vm1l’ ‘~/tmp/scratch/RtmpZfwBPo’
‘~/tmp/scratch/RtmpaaqIJc’ ‘~/tmp/scratch/Rtmpb1xj6R’
‘~/tmp/scratch/RtmpcUG7D7’ ‘~/tmp/scratch/RtmpcdINmY’
‘~/tmp/scratch/RtmpdAuaNF’ ‘~/tmp/scratch/RtmpdrRZms’
‘~/tmp/scratch/RtmpeB2FhY’ ‘~/tmp/scratch/RtmpevQgdO’
‘~/tmp/scratch/RtmpfHJpY7’ ‘~/tmp/scratch/RtmpfPN4yr’
‘~/tmp/scratch/Rtmpfn00jF’ ‘~/tmp/scratch/RtmpgJJLJy’
‘~/tmp/scratch/RtmpgqrSJA’ ‘~/tmp/scratch/Rtmphvkf0Z’
‘~/tmp/scratch/RtmphzXQ7v’ ‘~/tmp/scratch/RtmpiNxnzV’
‘~/tmp/scratch/RtmpjMW1cz’ ‘~/tmp/scratch/RtmpjjzkkA’
‘~/tmp/scratch/Rtmpk3A4cF’ ‘~/tmp/scratch/RtmpkFv1Qi’
‘~/tmp/scratch/RtmpkLK3Zl’ ‘~/tmp/scratch/Rtmpl6sklE’
‘~/tmp/scratch/Rtmpl77m8U’ ‘~/tmp/scratch/RtmplLTRyx’
‘~/tmp/scratch/RtmpmFujrX’ ‘~/tmp/scratch/RtmpmVUckp’
‘~/tmp/scratch/RtmpmnU5Kg’ ‘~/tmp/scratch/Rtmpo5Txak’
‘~/tmp/scratch/RtmpoBV4me’ ‘~/tmp/scratch/RtmpoR1CFC’
‘~/tmp/scratch/RtmppMaP5Z’ ‘~/tmp/scratch/RtmppTV1gT’
‘~/tmp/scratch/RtmppTxxr4’ ‘~/tmp/scratch/RtmppyERuh’
‘~/tmp/scratch/RtmpqR45jQ’ ‘~/tmp/scratch/RtmprVK53X’
‘~/tmp/scratch/RtmprpGO1u’ ‘~/tmp/scratch/RtmprsLB6I’
‘~/tmp/scratch/Rtmprw9bPx’ ‘~/tmp/scratch/RtmpsEt0by’
‘~/tmp/scratch/RtmptCgzFu’ ‘~/tmp/scratch/RtmptpzpSJ’
‘~/tmp/scratch/Rtmpty3WLt’ ‘~/tmp/scratch/RtmpuOwvFg’
‘~/tmp/scratch/RtmpuhDwUC’ ‘~/tmp/scratch/Rtmpv2yy12’
‘~/tmp/scratch/RtmpvHec3j’ ‘~/tmp/scratch/RtmpwNpqlT’
‘~/tmp/scratch/Rtmpwvu0xn’ ‘~/tmp/scratch/RtmpxrpLx5’
‘~/tmp/scratch/RtmpyTDKLr’ ‘~/tmp/scratch/RtmpybSWFW’
‘~/tmp/scratch/RtmpyeSV1g’ ‘~/tmp/scratch/RtmpzENx0m’
‘~/tmp/scratch/RtmpzLyRHs’ ‘~/tmp/scratch/RtmpzMOojI’
‘~/tmp/scratch/quarto-sessionc7b9241ed4daf274’
‘~/tmp/scratch/xvfb-run.0em0wS’ ‘~/tmp/scratch/xvfb-run.1n8H0K’
‘~/tmp/scratch/xvfb-run.3L0VDx’ ‘~/tmp/scratch/xvfb-run.6Xz5nE’
‘~/tmp/scratch/xvfb-run.6wWXjc’ ‘~/tmp/scratch/xvfb-run.BN1n20’
‘~/tmp/scratch/xvfb-run.BTbK9p’ ‘~/tmp/scratch/xvfb-run.DbZDsn’
‘~/tmp/scratch/xvfb-run.GO8ciy’ ‘~/tmp/scratch/xvfb-run.HIaJnK’
‘~/tmp/scratch/xvfb-run.HbbSkb’ ‘~/tmp/scratch/xvfb-run.I7Xnkg’
‘~/tmp/scratch/xvfb-run.K1Sgrg’ ‘~/tmp/scratch/xvfb-run.Km8rhP’
‘~/tmp/scratch/xvfb-run.NC1WGW’ ‘~/tmp/scratch/xvfb-run.NNc3V1’
‘~/tmp/scratch/xvfb-run.OKuRNO’ ‘~/tmp/scratch/xvfb-run.P55yK5’
‘~/tmp/scratch/xvfb-run.PSpy5a’ ‘~/tmp/scratch/xvfb-run.PgsWtr’
‘~/tmp/scratch/xvfb-run.QePXmM’ ‘~/tmp/scratch/xvfb-run.TNinz4’
‘~/tmp/scratch/xvfb-run.UmWUI6’ ‘~/tmp/scratch/xvfb-run.WmmDM6’
‘~/tmp/scratch/xvfb-run.Wrlyvq’ ‘~/tmp/scratch/xvfb-run.Xj7bt6’
‘~/tmp/scratch/xvfb-run.YBvFOa’ ‘~/tmp/scratch/xvfb-run.Yn2EGh’
‘~/tmp/scratch/xvfb-run.Z4tdwu’ ‘~/tmp/scratch/xvfb-run.ZcxsYR’
‘~/tmp/scratch/xvfb-run.ayWafi’ ‘~/tmp/scratch/xvfb-run.cgBzP3’
‘~/tmp/scratch/xvfb-run.cmC8i1’ ‘~/tmp/scratch/xvfb-run.dgf6SR’
‘~/tmp/scratch/xvfb-run.eNkb9d’ ‘~/tmp/scratch/xvfb-run.eetjpC’
‘~/tmp/scratch/xvfb-run.f0s0v0’ ‘~/tmp/scratch/xvfb-run.f39tZp’
‘~/tmp/scratch/xvfb-run.i1dQD3’ ‘~/tmp/scratch/xvfb-run.ig9qGe’
‘~/tmp/scratch/xvfb-run.iu55UZ’ ‘~/tmp/scratch/xvfb-run.jZr5pu’
‘~/tmp/scratch/xvfb-run.l16y0z’ ‘~/tmp/scratch/xvfb-run.nx64mB’
‘~/tmp/scratch/xvfb-run.o1jtlR’ ‘~/tmp/scratch/xvfb-run.pMAhj2’
‘~/tmp/scratch/xvfb-run.qAXzXu’ ‘~/tmp/scratch/xvfb-run.qT8U0z’
‘~/tmp/scratch/xvfb-run.qiPIS4’ ‘~/tmp/scratch/xvfb-run.rjsxvd’
‘~/tmp/scratch/xvfb-run.scneXL’ ‘~/tmp/scratch/xvfb-run.uDHXfm’
‘~/tmp/scratch/xvfb-run.uFlQIM’ ‘~/tmp/scratch/xvfb-run.vOJYYk’
‘~/tmp/scratch/xvfb-run.vQ8t24’ ‘~/tmp/scratch/xvfb-run.vbsIUM’
‘~/tmp/scratch/xvfb-run.xB0Qvd’ ‘~/tmp/scratch/xvfb-run.yd18SY’
‘~/tmp/scratch/xvfb-run.zceYod’ ‘~/tmp/scratch/xvfb-run.zvPewB’
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.4.0
Check: tests
Result: ERROR
Running ‘test_RadixForest.R’ [4s/4s]
Running ‘test_RadixTree.R’ [11s/9s]
Running ‘test_StarTree.R’ [71s/67s]
Running ‘test_pairwise.R’ [4s/6s]
Running the tests in ‘tests/test_pairwise.R’ failed.
Complete output:
> # This test file tests the `dist_matrix` and `dist_pairwise` functions
> # These two functions are simple dynamic programming algorithms for computing pairwise distances and are themselves used to validate
> # the RadixTree imeplementation (see test_radix_tree.R)
>
> runtime <- Sys.time()
>
> if(requireNamespace("seqtrie", quietly=TRUE) &&
+ requireNamespace("pwalign", quietly=TRUE)
+ ) {
+ library(seqtrie)
+ library(pwalign)
+
+ # Use 2 threads on github actions and CRAN, 4 threads locally
+ IS_LOCAL <- Sys.getenv("IS_LOCAL") != ""
+ NTHREADS <- ifelse(IS_LOCAL, 4, 2)
+ NITER <- ifelse(IS_LOCAL, 3, 1)
+ NSEQS <- 2500
+ MAXSEQLEN <- 200
+ CHARSET <- "ACGT"
+
+ test_seed <- Sys.getenv("SEQTRIE_TEST_SEED")
+ if (nzchar(test_seed)) {
+ test_seed <- as.integer(test_seed)
+ } else {
+ test_seed <- as.integer(as.numeric(Sys.time())) %% .Machine$integer.max
+ }
+ cat("Test seed:", test_seed, "\n")
+ set.seed(test_seed)
+
+ random_strings <- function(N, charset = "abcdefghijklmnopqrstuvwxyz") {
+ charset <- unlist(strsplit(charset, "", fixed = TRUE))
+ len <- sample(0:MAXSEQLEN, N, replace=TRUE)
+ vapply(len, function(n) {
+ paste0(sample(charset, n, replace = TRUE), collapse = "")
+ }, character(1))
+ }
+
+ mutate_strings <- function(x, prob = 0.025, indel_prob = 0.025, charset = "abcdefghijklmnopqrstuvwxyz") {
+ charset <- unlist(strsplit(charset, ""))
+ xsplit <- strsplit(x, "")
+ sapply(xsplit, function(a) {
+ r <- runif(length(a)) < prob
+ a[r] <- sample(charset, sum(r), replace=TRUE)
+ ins <- runif(length(a)) < indel_prob
+ a[ins] <- paste0(sample(charset, sum(ins), replace=TRUE), sample(charset, sum(ins), replace=TRUE))
+ del <- runif(length(a)) < indel_prob
+ a[del] <- ""
+ paste0(a, collapse = "")
+ })
+ }
+
+ # subject (target) must be of length 1 or equal to pattern (query)
+ # To get a distance matrix, iterate over target and perform a column bind
+ # special_zero_case -- if both query and target are empty, Biostrings fails with an error
+ pairwiseAlignmentFix <- function(pattern, subject, ...) {
+ results <- rep(0, length(subject))
+ special_zero_case <- nchar(pattern) == 0 & nchar(subject) == 0
+ if(all(special_zero_case)) {
+ results
+ } else {
+ results[!special_zero_case] <- pwalign::pairwiseAlignment(pattern=pattern[!special_zero_case], subject=subject[!special_zero_case], ...)
+ results
+ }
+ }
+
+ biostrings_matrix_global <- function(query, target, cost_matrix, gap_cost, gap_open_cost = 0) {
+ substitutionMatrix <- -cost_matrix
+ rows <- lapply(query, function(x) {
+ query2 <- rep(x, length(target))
+ -pairwiseAlignmentFix(pattern=query2, subject=target, substitutionMatrix = substitutionMatrix, gapOpening=gap_open_cost, gapExtension=gap_cost, scoreOnly=TRUE, type="global")
+ })
+ do.call(rbind, rows)
+ }
+
+ biostrings_pairwise_global <- function(query, target, cost_matrix, gap_cost, gap_open_cost = 0) {
+ substitutionMatrix <- -cost_matrix
+ -pairwiseAlignment(pattern=query, subject=target, substitutionMatrix = substitutionMatrix,gapOpening=gap_open_cost, gapExtension=gap_cost, scoreOnly=TRUE, type="global")
+ }
+
+ biostrings_matrix_anchored <- function(query, target, query_size, target_size, cost_matrix, gap_cost, gap_open_cost = 0) {
+ substitutionMatrix <- -cost_matrix
+ rows <- lapply(seq_along(query), function(i) {
+ query2 <- substring(query[i], 1, query_size[i,,drop=TRUE])
+ target2 <- substring(target, 1, target_size[i,,drop=TRUE])
+ -pairwiseAlignmentFix(pattern=query2, subject=target2, substitutionMatrix = substitutionMatrix, gapOpening=gap_open_cost, gapExtension=gap_cost, scoreOnly=TRUE, type="global")
+ })
+ do.call(rbind, rows)
+ }
+
+ biostrings_pairwise_anchored <- function(query, target, query_size, target_size, cost_matrix, gap_cost, gap_open_cost = 0) {
+ substitutionMatrix <- -cost_matrix
+ query2 <- substring(query, 1, query_size)
+ target2 <- substring(target, 1, target_size)
+ -pairwiseAlignmentFix(pattern=query2, subject=target2, substitutionMatrix = substitutionMatrix, gapOpening=gap_open_cost, gapExtension=gap_cost, scoreOnly=TRUE, type="global")
+ }
+
+ hamming_pairwise <- function(query, target) {
+ vapply(seq_along(query), function(i) {
+ if(nchar(query[i]) != nchar(target[i])) return(Inf)
+ sum(strsplit(query[i], "", fixed = TRUE)[[1]] != strsplit(target[i], "", fixed = TRUE)[[1]])
+ }, numeric(1))
+ }
+
+ hamming_matrix <- function(query, target) {
+ rows <- lapply(query, function(q) hamming_pairwise(rep(q, length(target)), target))
+ do.call(rbind, rows)
+ }
+
+ unit_cost_matrix <- function(charset) {
+ chars <- unlist(strsplit(charset, "", fixed = TRUE))
+ cost_matrix <- matrix(1L, nrow = length(chars), ncol = length(chars), dimnames = list(chars, chars))
+ diag(cost_matrix) <- 0L
+ cost_matrix
+ }
+
+ for(. in 1:NITER) {
+
+ print("Checking hamming search correctness")
+ local({
+ # Note: seqtrie returns `NA_integer_` for hamming distance when the lengths are different.
+ # This is why we need to replace `NA_integer_` with `Inf` when comparing results
+
+ target <- unique(c(random_strings(NSEQS, CHARSET),""))
+ query <- sample(c(sample(target, NSEQS/1000), random_strings(NSEQS/1000, CHARSET)))
+ query <- unique(c(mutate_strings(query, indel_prob=0, charset = CHARSET), ""))
+
+ # Check matrix results
+ results_seqtrie <- dist_matrix(query, target, mode = "hamming", nthreads=NTHREADS)
+ results_seqtrie[is.na(results_seqtrie)] <- Inf
+ results_hamming <- hamming_matrix(query, target)
+ stopifnot(all(results_seqtrie == results_hamming))
+
+ # Check pairwise results
+ query_pairwise <- mutate_strings(target, prob=0.025, indel_prob=0.05, charset = CHARSET)
+ results_seqtrie <- dist_pairwise(query_pairwise, target, mode = "hamming", nthreads=NTHREADS)
+ results_seqtrie[is.na(results_seqtrie)] <- Inf
+ results_hamming <- hamming_pairwise(query_pairwise, target)
+ stopifnot(all(results_seqtrie == results_hamming))
+ })
+
+ print("Checking levenshtein search correctness")
+ local({
+ target <- unique(c(random_strings(NSEQS, CHARSET),""))
+ query <- sample(c(sample(target, NSEQS/1000), random_strings(NSEQS/1000, CHARSET)))
+ query <- unique(c(mutate_strings(query, indel_prob=0, charset = CHARSET), ""))
+
+ # Check matrix results
+ results_seqtrie <- dist_matrix(query, target, mode = "levenshtein", nthreads=NTHREADS)
+ cost_matrix <- unit_cost_matrix(CHARSET)
+ results_pwalign <- biostrings_matrix_global(query, target, cost_matrix = cost_matrix, gap_cost = 1L)
+ stopifnot(all(results_seqtrie == results_pwalign))
+
+ # Check pairwise results
+ query_pairwise <- mutate_strings(target, prob=0.025, indel_prob=0.05, charset = CHARSET)
+ results_seqtrie <- dist_pairwise(query_pairwise, target, mode = "levenshtein", nthreads=NTHREADS)
+ results_pwalign <- biostrings_pairwise_global(query_pairwise, target, cost_matrix = cost_matrix, gap_cost = 1L)
+ stopifnot(all(results_seqtrie == results_pwalign))
+ })
+
+ print("Checking anchored search correctness")
+ local({
+ # There is no anchored search in pwalign. To get the same results, we
+ # substring query and target by the seqtrie anchored endpoints and compare
+ # the resulting global alignments.
+
+ target <- unique(c(random_strings(NSEQS, CHARSET),""))
+ query <- sample(c(sample(target, NSEQS/1000), random_strings(NSEQS/1000, CHARSET)))
+ query <- unique(c(mutate_strings(query, indel_prob=0, charset = CHARSET), ""))
+
+ # Check matrix results
+ results_seqtrie <- dist_matrix(query, target, mode = "anchored", nthreads=NTHREADS)
+ query_size <- attr(results_seqtrie, "query_size")
+ target_size <- attr(results_seqtrie, "target_size")
+ cost_matrix <- unit_cost_matrix(CHARSET)
+ results_pwalign <- biostrings_matrix_anchored(query, target, query_size, target_size, cost_matrix = cost_matrix, gap_cost = 1L)
+ stopifnot(all(results_seqtrie == results_pwalign))
+
+ # Check pairwise results
+ query_pairwise <- mutate_strings(target, prob=0.025, indel_prob=0.05, charset = CHARSET)
+ results_seqtrie <- dist_pairwise(query_pairwise, target, mode = "anchored", nthreads=NTHREADS)
+ query_size <- attr(results_seqtrie, "query_size")
+ target_size <- attr(results_seqtrie, "target_size")
+ results_pwalign <- biostrings_pairwise_anchored(query_pairwise, target, query_size, target_size, cost_matrix = cost_matrix, gap_cost = 1L)
+ stopifnot(all(results_seqtrie == results_pwalign))
+ })
+
+ print("Checking global search with linear gap for correctness")
+ local({
+ target <- unique(c(random_strings(NSEQS, CHARSET),""))
+ query <- sample(c(sample(target, NSEQS/1000), random_strings(NSEQS/1000, CHARSET)))
+ query <- unique(c(mutate_strings(query, indel_prob=0, charset = CHARSET), ""))
+
+ # Check matrix results
+ cost_matrix <- matrix(sample(1:3, size = nchar(CHARSET)^2, replace=TRUE), nrow=nchar(CHARSET))
+ diag(cost_matrix) <- 0
+ colnames(cost_matrix) <- rownames(cost_matrix) <- strsplit(CHARSET, "")[[1]]
+ gap_cost <- sample(1:3, size = 1)
+ results_seqtrie <- dist_matrix(query, target, mode = "levenshtein", cost_matrix = cost_matrix, gap_cost = gap_cost, nthreads=NTHREADS)
+ results_biostrings <- biostrings_matrix_global(query, target, cost_matrix = cost_matrix, gap_cost = gap_cost)
+ stopifnot(all(results_seqtrie == results_biostrings))
+
+ # Check pairwise results
+ query_pairwise <- mutate_strings(target, prob=0.025, indel_prob=0.05, charset = CHARSET)
+ results_seqtrie <- dist_pairwise(query_pairwise, target, mode = "levenshtein", cost_matrix = cost_matrix, gap_cost = gap_cost, nthreads=NTHREADS)
+ results_biostrings <- biostrings_pairwise_global(query_pairwise, target, cost_matrix = cost_matrix, gap_cost = gap_cost)
+ stopifnot(all(results_seqtrie == results_biostrings))
+ })
+
+ print("Checking anchored search with linear gap for correctness")
+ local({
+ target <- unique(c(random_strings(NSEQS, CHARSET),""))
+ query <- sample(c(sample(target, NSEQS/1000), random_strings(NSEQS/1000, CHARSET)))
+ query <- unique(c(mutate_strings(query, indel_prob=0, charset = CHARSET), ""))
+
+ # Check matrix results
+ cost_matrix <- matrix(sample(1:3, size = nchar(CHARSET)^2, replace=TRUE), nrow=nchar(CHARSET))
+ diag(cost_matrix) <- 0
+ colnames(cost_matrix) <- rownames(cost_matrix) <- strsplit(CHARSET, "")[[1]]
+ gap_cost <- sample(1:3, size = 1)
+ results_seqtrie <- dist_matrix(query, target, mode = "anchored", cost_matrix = cost_matrix, gap_cost = gap_cost, nthreads=NTHREADS)
+ query_size <- attr(results_seqtrie, "query_size")
+ target_size <- attr(results_seqtrie, "target_size")
+ results_biostrings <- biostrings_matrix_anchored(query, target, query_size, target_size, cost_matrix = cost_matrix, gap_cost = gap_cost)
+ stopifnot(all(results_seqtrie == results_biostrings))
+
+ # Check pairwise results
+ query_pairwise <- mutate_strings(target, prob=0.025, indel_prob=0.05, charset = CHARSET)
+ results_seqtrie <- dist_pairwise(query_pairwise, target, mode = "anchored", cost_matrix = cost_matrix, gap_cost = gap_cost, nthreads=NTHREADS)
+ query_size <- attr(results_seqtrie, "query_size")
+ target_size <- attr(results_seqtrie, "target_size")
+ results_biostrings <- biostrings_pairwise_anchored(query_pairwise, target, query_size, target_size, cost_matrix = cost_matrix, gap_cost = gap_cost)
+ stopifnot(all(results_seqtrie == results_biostrings))
+ })
+
+
+
+ print("Checking global search with affine gap for correctness")
+ local({
+ target <- unique(c(random_strings(NSEQS, CHARSET),""))
+ query <- sample(c(sample(target, NSEQS/1000), random_strings(NSEQS/1000, CHARSET)))
+ query <- unique(c(mutate_strings(query, indel_prob=0, charset = CHARSET), ""))
+
+ # Check matrix results
+ cost_matrix <- matrix(sample(1:3, size = nchar(CHARSET)^2, replace=TRUE), nrow=nchar(CHARSET))
+ diag(cost_matrix) <- 0
+ colnames(cost_matrix) <- rownames(cost_matrix) <- strsplit(CHARSET, "")[[1]]
+ gap_cost <- sample(1:3, size = 1)
+ gap_open_cost <- sample(1:3, size = 1)
+ results_seqtrie <- dist_matrix(query, target, mode = "levenshtein", cost_matrix = cost_matrix, gap_cost = gap_cost, gap_open_cost=gap_open_cost, nthreads=NTHREADS)
+ results_biostrings <- biostrings_matrix_global(query, target, cost_matrix = cost_matrix, gap_cost = gap_cost, gap_open_cost=gap_open_cost)
+ stopifnot(all(results_seqtrie == results_biostrings))
+
+ # Check pairwise results
+ query_pairwise <- mutate_strings(target, prob=0.025, indel_prob=0.05, charset = CHARSET)
+ results_seqtrie <- dist_pairwise(query_pairwise, target, mode = "levenshtein", cost_matrix = cost_matrix, gap_cost = gap_cost, gap_open_cost=gap_open_cost, nthreads=NTHREADS)
+ results_biostrings <- biostrings_pairwise_global(query_pairwise, target, cost_matrix = cost_matrix, gap_cost = gap_cost, gap_open_cost=gap_open_cost)
+ stopifnot(all(results_seqtrie == results_biostrings))
+ })
+
+ print("Checking anchored search with affine gap for correctness")
+ local({
+ target <- unique(c(random_strings(NSEQS, CHARSET),""))
+ query <- sample(c(sample(target, NSEQS/1000), random_strings(NSEQS/1000, CHARSET)))
+ query <- unique(c(mutate_strings(query, indel_prob=0, charset = CHARSET), ""))
+
+ # Check matrix results
+ cost_matrix <- matrix(sample(1:3, size = nchar(CHARSET)^2, replace=TRUE), nrow=nchar(CHARSET))
+ diag(cost_matrix) <- 0
+ colnames(cost_matrix) <- rownames(cost_matrix) <- strsplit(CHARSET, "")[[1]]
+ gap_cost <- sample(1:3, size = 1)
+ gap_open_cost <- sample(1:3, size = 1)
+ results_seqtrie <- dist_matrix(query, target, mode = "anchored", cost_matrix = cost_matrix, gap_cost = gap_cost, gap_open_cost=gap_open_cost, nthreads=NTHREADS)
+ query_size <- attr(results_seqtrie, "query_size")
+ target_size <- attr(results_seqtrie, "target_size")
+ results_biostrings <- biostrings_matrix_anchored(query, target, query_size, target_size, cost_matrix = cost_matrix, gap_cost = gap_cost, gap_open_cost=gap_open_cost)
+ stopifnot(all(results_seqtrie == results_biostrings))
+
+ # Check pairwise results
+ query_pairwise <- mutate_strings(target, prob=0.025, indel_prob=0.05, charset = CHARSET)
+ results_seqtrie <- dist_pairwise(query_pairwise, target, mode = "anchored", cost_matrix = cost_matrix, gap_cost = gap_cost, gap_open_cost=gap_open_cost, nthreads=NTHREADS)
+ query_size <- attr(results_seqtrie, "query_size")
+ target_size <- attr(results_seqtrie, "target_size")
+ results_biostrings <- biostrings_pairwise_anchored(query_pairwise, target, query_size, target_size, cost_matrix = cost_matrix, gap_cost = gap_cost, gap_open_cost=gap_open_cost)
+ stopifnot(all(results_seqtrie == results_biostrings))
+ })
+ }
+
+ }
Loading required package: BiocGenerics
Loading required package: generics
Attaching package: 'generics'
The following objects are masked from 'package:base':
as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
setequal, union
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
as.data.frame, basename, cbind, colnames, dirname, do.call,
duplicated, eval, evalq, get, grep, grepl, is.unsorted, lapply,
mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
rank, rbind, rownames, sapply, saveRDS, table, tapply, unique,
unsplit, which.max, which.min
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following object is masked from 'package:utils':
findMatches
The following objects are masked from 'package:base':
I, expand.grid, unname
Loading required package: IRanges
Loading required package: Biostrings
Loading required package: XVector
Loading required package: GenomeInfoDb
Attaching package: 'Biostrings'
The following object is masked from 'package:base':
strsplit
Attaching package: 'pwalign'
The following objects are masked from 'package:Biostrings':
PairwiseAlignments, PairwiseAlignmentsSingleSubject, aligned,
alignedPattern, alignedSubject, compareStrings, deletion,
errorSubstitutionMatrices, indel, insertion, mismatchSummary,
mismatchTable, nedit, nindel, nucleotideSubstitutionMatrix,
pairwiseAlignment, pattern, pid, qualitySubstitutionMatrices,
stringDist, unaligned, writePairwiseAlignments
Test seed: 1785554642
[1] "Checking hamming search correctness"
[1] "Checking levenshtein search correctness"
Error in unlist(substitutionMatrix, substitutionMatrix) :
'recursive' must be a length-1 vector
Calls: <Anonymous> ... mpi.XStringSet.pairwiseAlignment -> XStringSet.pairwiseAlignment -> array -> unlist
Execution halted
Flavor: r-oldrel-macos-x86_64