Last updated on 2026-08-03 13:49:43 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 | 110.38 | 126.00 | 236.38 | 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 | 148.62 | 166.93 | 315.55 | 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 | 83.00 | 146.00 | 229.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/Rtmp087tDY’ ‘~/tmp/scratch/Rtmp0HF8cj’
‘~/tmp/scratch/Rtmp0fV9un’ ‘~/tmp/scratch/Rtmp0iCNjN’
‘~/tmp/scratch/Rtmp1gPycf’ ‘~/tmp/scratch/Rtmp1n7m2C’
‘~/tmp/scratch/Rtmp263MFM’ ‘~/tmp/scratch/Rtmp2U31A1’
‘~/tmp/scratch/Rtmp2fUIFf’ ‘~/tmp/scratch/Rtmp39HfWw’
‘~/tmp/scratch/Rtmp3oZJiR’ ‘~/tmp/scratch/Rtmp4P7ThB’
‘~/tmp/scratch/Rtmp4bCdd1’ ‘~/tmp/scratch/Rtmp4exxEQ’
‘~/tmp/scratch/Rtmp4xIU2i’ ‘~/tmp/scratch/Rtmp54zqhl’
‘~/tmp/scratch/Rtmp5fQrf8’ ‘~/tmp/scratch/Rtmp5nZ8lU’
‘~/tmp/scratch/Rtmp5oxLTx’ ‘~/tmp/scratch/Rtmp6HJgeb’
‘~/tmp/scratch/Rtmp7r6oFS’ ‘~/tmp/scratch/Rtmp8XbYIY’
‘~/tmp/scratch/Rtmp94Hnyo’ ‘~/tmp/scratch/Rtmp9VlMLR’
‘~/tmp/scratch/Rtmp9tYsbH’ ‘~/tmp/scratch/RtmpAUQf12’
‘~/tmp/scratch/RtmpAgLn8O’ ‘~/tmp/scratch/RtmpAnSNFB’
‘~/tmp/scratch/RtmpAuPRlm’ ‘~/tmp/scratch/RtmpB6OLO5’
‘~/tmp/scratch/RtmpCxRZdn’ ‘~/tmp/scratch/RtmpDFpzhU’
‘~/tmp/scratch/RtmpDg2INF’ ‘~/tmp/scratch/RtmpDrOe6w’
‘~/tmp/scratch/RtmpE6abkP’ ‘~/tmp/scratch/RtmpEEospg’
‘~/tmp/scratch/RtmpERc0ho’ ‘~/tmp/scratch/RtmpF8qduW’
‘~/tmp/scratch/RtmpFmY0Jr’ ‘~/tmp/scratch/RtmpFmsjb5’
‘~/tmp/scratch/RtmpG8E3Xx’ ‘~/tmp/scratch/RtmpGUeb72’
‘~/tmp/scratch/RtmpGUjNe4’ ‘~/tmp/scratch/RtmpGreFIC’
‘~/tmp/scratch/RtmpH8FUij’ ‘~/tmp/scratch/RtmpHMVXep’
‘~/tmp/scratch/RtmpIDRJu7’ ‘~/tmp/scratch/RtmpINcMJG’
‘~/tmp/scratch/RtmpIWNmI7’ ‘~/tmp/scratch/RtmpIcnzXu’
‘~/tmp/scratch/RtmpJ1YewT’ ‘~/tmp/scratch/RtmpJIbmfb’
‘~/tmp/scratch/RtmpJQmuuU’ ‘~/tmp/scratch/RtmpJTTFGf’
‘~/tmp/scratch/RtmpJVLGc3’ ‘~/tmp/scratch/RtmpKcoMD8’
‘~/tmp/scratch/RtmpKlaEIY’ ‘~/tmp/scratch/RtmpLKpzOc’
‘~/tmp/scratch/RtmpLq4ESc’ ‘~/tmp/scratch/RtmpLsx80v’
‘~/tmp/scratch/RtmpM0JPOC’ ‘~/tmp/scratch/RtmpMGsXoB’
‘~/tmp/scratch/RtmpMRMfTw’ ‘~/tmp/scratch/RtmpMh4lAO’
‘~/tmp/scratch/RtmpMyghUn’ ‘~/tmp/scratch/RtmpNTA5lZ’
‘~/tmp/scratch/RtmpOKyFq1’ ‘~/tmp/scratch/RtmpOy8iMb’
‘~/tmp/scratch/RtmpPYjoep’ ‘~/tmp/scratch/RtmpPlDw1f’
‘~/tmp/scratch/RtmpPt2bYd’ ‘~/tmp/scratch/RtmpQ1pdVA’
‘~/tmp/scratch/RtmpQs3cnk’ ‘~/tmp/scratch/RtmpRKobSv’
‘~/tmp/scratch/RtmpSdNRp4’ ‘~/tmp/scratch/RtmpTgnJsj’
‘~/tmp/scratch/RtmpThG14n’ ‘~/tmp/scratch/RtmpUQdBlv’
‘~/tmp/scratch/RtmpUQntVH’ ‘~/tmp/scratch/RtmpUdz6Wo’
‘~/tmp/scratch/RtmpUfQg2E’ ‘~/tmp/scratch/RtmpUu904s’
‘~/tmp/scratch/RtmpVFBOVw’ ‘~/tmp/scratch/RtmpVyec7C’
‘~/tmp/scratch/RtmpXXLN9n’ ‘~/tmp/scratch/RtmpXhhA16’
‘~/tmp/scratch/RtmpXyZPTT’ ‘~/tmp/scratch/RtmpY6yBQx’
‘~/tmp/scratch/RtmpYQUABm’ ‘~/tmp/scratch/RtmpYX1wkY’
‘~/tmp/scratch/RtmpYsScxi’ ‘~/tmp/scratch/RtmpZFpHrd’
‘~/tmp/scratch/RtmpZH98Va’ ‘~/tmp/scratch/RtmpZHfI1E’
‘~/tmp/scratch/RtmpZKJPO6’ ‘~/tmp/scratch/RtmpZMKaKx’
‘~/tmp/scratch/RtmpZd3bDr’ ‘~/tmp/scratch/RtmpZmf3nw’
‘~/tmp/scratch/RtmpZoPbGm’ ‘~/tmp/scratch/RtmpZulkXN’
‘~/tmp/scratch/Rtmpaz83SL’ ‘~/tmp/scratch/Rtmpc2u0tg’
‘~/tmp/scratch/RtmpcmL3QO’ ‘~/tmp/scratch/RtmpdUmHzv’
‘~/tmp/scratch/Rtmpe50Pkh’ ‘~/tmp/scratch/RtmpedmCB7’
‘~/tmp/scratch/RtmpegDxBm’ ‘~/tmp/scratch/Rtmpg2UcgG’
‘~/tmp/scratch/RtmphTKtFi’ ‘~/tmp/scratch/Rtmphis7Iu’
‘~/tmp/scratch/Rtmphl87Bz’ ‘~/tmp/scratch/RtmpiGULR3’
‘~/tmp/scratch/RtmpioBtvj’ ‘~/tmp/scratch/Rtmpizxg3c’
‘~/tmp/scratch/RtmpjWuVWs’ ‘~/tmp/scratch/RtmpkDDZQY’
‘~/tmp/scratch/RtmpkHCLmi’ ‘~/tmp/scratch/RtmpkQvixF’
‘~/tmp/scratch/Rtmpl3mRLU’ ‘~/tmp/scratch/RtmplBKCUU’
‘~/tmp/scratch/RtmpldcsxR’ ‘~/tmp/scratch/RtmpmO8A9c’
‘~/tmp/scratch/RtmpmZsxVo’ ‘~/tmp/scratch/Rtmpn459jm’
‘~/tmp/scratch/RtmpnQKLRd’ ‘~/tmp/scratch/RtmpnRiiBS’
‘~/tmp/scratch/RtmpnXpvHN’ ‘~/tmp/scratch/RtmpnfbYf7’
‘~/tmp/scratch/RtmpoaJ3aK’ ‘~/tmp/scratch/RtmpobeXnX’
‘~/tmp/scratch/RtmpoiXRHz’ ‘~/tmp/scratch/Rtmpoo8e8i’
‘~/tmp/scratch/Rtmpp4tLts’ ‘~/tmp/scratch/RtmppB2jDk’
‘~/tmp/scratch/RtmppI3BV0’ ‘~/tmp/scratch/Rtmpq7TWt3’
‘~/tmp/scratch/RtmpqD5ziN’ ‘~/tmp/scratch/RtmpqMM1v3’
‘~/tmp/scratch/RtmpqP382p’ ‘~/tmp/scratch/RtmprPnzRa’
‘~/tmp/scratch/RtmprSDlOV’ ‘~/tmp/scratch/RtmpsNQnzo’
‘~/tmp/scratch/RtmpsYkP1R’ ‘~/tmp/scratch/RtmpstXTne’
‘~/tmp/scratch/RtmptCgJmx’ ‘~/tmp/scratch/RtmpuORP2W’
‘~/tmp/scratch/RtmpuUtbpU’ ‘~/tmp/scratch/RtmpvW3h97’
‘~/tmp/scratch/RtmpvjBhZL’ ‘~/tmp/scratch/RtmpxBL0fD’
‘~/tmp/scratch/RtmpxLGVH9’ ‘~/tmp/scratch/RtmpxPaX2V’
‘~/tmp/scratch/RtmpxV6Q9I’ ‘~/tmp/scratch/RtmpxpFZqF’
‘~/tmp/scratch/Rtmpy9xvR9’ ‘~/tmp/scratch/RtmpyHfEHe’
‘~/tmp/scratch/xvfb-run.2MxVr0’ ‘~/tmp/scratch/xvfb-run.4gMAHk’
‘~/tmp/scratch/xvfb-run.5eM2cX’ ‘~/tmp/scratch/xvfb-run.5hzOz4’
‘~/tmp/scratch/xvfb-run.6Oee2p’ ‘~/tmp/scratch/xvfb-run.6YQCP2’
‘~/tmp/scratch/xvfb-run.6YnS8v’ ‘~/tmp/scratch/xvfb-run.6ZwFtn’
‘~/tmp/scratch/xvfb-run.6nS0de’ ‘~/tmp/scratch/xvfb-run.7EW3hd’
‘~/tmp/scratch/xvfb-run.8SGnCO’ ‘~/tmp/scratch/xvfb-run.9PRTAp’
‘~/tmp/scratch/xvfb-run.BnF5Rx’ ‘~/tmp/scratch/xvfb-run.CAuuvd’
‘~/tmp/scratch/xvfb-run.CTRbT7’ ‘~/tmp/scratch/xvfb-run.DlHlaV’
‘~/tmp/scratch/xvfb-run.HzdHC7’ ‘~/tmp/scratch/xvfb-run.JAnEZF’
‘~/tmp/scratch/xvfb-run.LlYjd2’ ‘~/tmp/scratch/xvfb-run.MbLleN’
‘~/tmp/scratch/xvfb-run.Ml5DKI’ ‘~/tmp/scratch/xvfb-run.NWqFL8’
‘~/tmp/scratch/xvfb-run.OqasWS’ ‘~/tmp/scratch/xvfb-run.PDNK5V’
‘~/tmp/scratch/xvfb-run.QmrVRu’ ‘~/tmp/scratch/xvfb-run.RO15F8’
‘~/tmp/scratch/xvfb-run.VHqPvL’ ‘~/tmp/scratch/xvfb-run.WIix9h’
‘~/tmp/scratch/xvfb-run.WzGuqb’ ‘~/tmp/scratch/xvfb-run.XK5S61’
‘~/tmp/scratch/xvfb-run.XRDn7c’ ‘~/tmp/scratch/xvfb-run.Xd8Dob’
‘~/tmp/scratch/xvfb-run.bAYg00’ ‘~/tmp/scratch/xvfb-run.bavVuC’
‘~/tmp/scratch/xvfb-run.dBKZAk’ ‘~/tmp/scratch/xvfb-run.edB6tV’
‘~/tmp/scratch/xvfb-run.eelFGs’ ‘~/tmp/scratch/xvfb-run.g2b7rM’
‘~/tmp/scratch/xvfb-run.hw0sxt’ ‘~/tmp/scratch/xvfb-run.i5Nd9q’
‘~/tmp/scratch/xvfb-run.jGekpV’ ‘~/tmp/scratch/xvfb-run.jU6puL’
‘~/tmp/scratch/xvfb-run.jUcNSw’ ‘~/tmp/scratch/xvfb-run.jvgrhh’
‘~/tmp/scratch/xvfb-run.kVKqPq’ ‘~/tmp/scratch/xvfb-run.lzeNpY’
‘~/tmp/scratch/xvfb-run.nOqhbH’ ‘~/tmp/scratch/xvfb-run.nl7kzC’
‘~/tmp/scratch/xvfb-run.np1WNS’ ‘~/tmp/scratch/xvfb-run.qw3lZg’
‘~/tmp/scratch/xvfb-run.rPpqYI’ ‘~/tmp/scratch/xvfb-run.sllB8E’
‘~/tmp/scratch/xvfb-run.tuG9yJ’ ‘~/tmp/scratch/xvfb-run.uDAgiP’
‘~/tmp/scratch/xvfb-run.umuwL0’ ‘~/tmp/scratch/xvfb-run.vi5bfC’
‘~/tmp/scratch/xvfb-run.yGHuZW’ ‘~/tmp/scratch/xvfb-run.yWCcRS’
‘~/tmp/scratch/xvfb-run.zEAN4h’
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.4.0
Check: tests
Result: ERROR
Running ‘test_RadixForest.R’ [3s/2s]
Running ‘test_RadixTree.R’ [10s/8s]
Running ‘test_StarTree.R’ [70s/67s]
Running ‘test_pairwise.R’ [4s/5s]
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: 1785743883
[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