Running ‘test-01-cipher.R’ [4s/5s]
  Running ‘test-02-seqclus.R’ [4s/6s]
  Running ‘test-04-sg.R’ [5s/7s]
  Running ‘test-05-words.R’ [4s/5s]
Running the tests in ‘tests/test-01-cipher.R’ failed.
Complete output:
  > library(SVAlignR)
  > 
  > motif <- "0-50-74-0-50-74-25-26-35"
  > alfa <- Cipher(motif)
  > alfa
  An object of class "Cipher"
  Slot "forward":
    0  25  26  35  50  74 
  "A" "B" "C" "D" "E" "F" 
  
  Slot "reverse":
     A    B    C    D    E    F    -    ? 
   "0" "25" "26" "35" "50" "74"  ":"  "?" 
  
  Slot "bytes":
  [1] 1
  
  > 
  > en <-encode(alfa, motif)
  > en
  [1] "AEFAEFBCD"
  > 
  > de <- decode(alfa, en)
  > de
  [1] "0-50-74-0-50-74-25-26-35"
  > de == motif
  [1] TRUE
  > 
  > ## bad Cipher inputs
  > try( Cipher(13) )
  Error in strsplit(sampleText, split) : non-character argument
  > try( Cipher(motif, extras = 13) )
  Error in Cipher(motif, extras = 13) : 
    All elements of 'extras' must have names.
  
  > try( Cipher(motif, extras = c(z = "zero", 13)) )
  Error in Cipher(motif, extras = c(z = "zero", 13)) : 
    All elements of 'extras' must have names.
  
  > try( Cipher(motif, extras = c(A = "zero")) )
  Error in Cipher(motif, extras = c(A = "zero")) : 
    Names of 'extras' cannot include symbols in 'sampleText'.
  
  > try( Cipher(motif, extras = c("x" = 26)) )
  Error in Cipher(motif, extras = c(x = 26)) : 
    Values of 'extras' cannot match letter in the 'forward' cipher.
  
  > 
  > odd <- c(motif, "0-0-50-74-61")
  > try( encode(alfa, odd) )
  Error in .xlate(text, cipher@forward, "\\-", "", 1) : 
    Text includes unknown characters: 61
  > try( encode(odd, alfa) )
  Error in strsplit(txt, split) : non-character argument
  > 
  > ## Longer alphabets
  > nchar(IT <- intToUtf8(L <- c(38:44, 46:57, 59:62, 64:126)))
  [1] 86
  > ## omit hyphen, colon, and question
  > JT <- paste(strsplit(IT, "|")[[1]], collapse = "-")
  > gamma <- Cipher(JT)
  Warning message:
  In Cipher(JT) :*** buffer overflow detected ***: terminated
  Aborted
Running the tests in ‘tests/test-02-seqclus.R’ failed.
Complete output:
  > library(SVAlignR)
  > data(longreads)
  > N <- 32
  > sequences <- longreads$connection[1:N]
  > 
  > # specify Levenshtein (should get two warnings)
  > sc1 <- SequenceCluster(sequences, method = "levenshtein", NC = 4)
  Warning messages:
  1: In SequenceCluster(sequences, method = "levenshtein", NC = 4) :
    Adding names to input sequences.
  2: In SequenceCluster(sequences, method = "levenshtein", NC = 4) :
    Removing 6 duplicated sequences.
  
  > plot(sc1@hc)
  > 
  > # after assigning names, should get one warning
  > names(sequences) <- rownames(longreads)[1:N]
  > sc1 <- SequenceCluster(sequences, method = "levenshtein", NC = 4)
  Warning message:
  In SequenceCluster(sequences, method = "levenshtein", NC = 4) :*** buffer overflow detected ***: terminated
  Aborted
Running the tests in ‘tests/test-05-words.R’ failed.
Complete output:
  > library(SVAlignR)
  > 
  > ## single byte
  > data(longreads)
  > raw <- longreads$connection
  > alfa <- Cipher(raw)
  > coded <- encode(alfa, raw)
  > makeWords(coded, 3)
  
  AAA AAD AAE AAb ADA ADY AEA AFK AKH AKN ALN APR AbB AbU Abd Abg Abm Abo Abq Afq 
   55  14   1  26  18   1   1   4   1  13   4   6   3  11   1   1   1   1  95   1 
  Ahq Ajq Alq Anq Ass BrA Bss DAA DAD DAb EAA FKN GAb IAb KNM KNq LNq MNq NMN NqA 
    1   2   1   2   1   1   1   9   2   5   1   3   1   2   6  11   3   4   6  11 
  Nqk Nss OqP PRA PRc QqP RAA RAC RAP RAb RAf RAn Rcq STA TAb Tsb UVA UaA VAD WAA 
   20   1   3  54   6   1   2   2   1  38   2   2   6   4   4   1   1   1   1   1 
  aAA aAZ bBr bBs bUV bUa bdq bgA bmA bpb bqA bqG bqP bqS bqb bqe bqk cqP dqP eqP 
   12   1   1   1   1   1   2   1   1   1  71   1  15   8   5   8   4   6   3  10 
  fqP gAb hqA iQq jqA jqk kqA kqk lqA mAb nqP pbq qAA qAF qAK qAL qAP qAb qAj qAl 
    1   1   1   1   1   1  21   6   1   1   2   1  19   3  23   3   3  44   6   1 
  qAs qGA qPR qST qbq qeq qkq qks rAA sAb sAs sFK sNq sNs sTs sbq ssA ssF ssN sss 
    1   1  51   6   8   9  29   1   1   1   1   1   1   1   1   1   1   1   2   1 
  > countWords(coded, 3)
  
  AAA AAD AAE AAb ADA ADY AEA AFK AKH AKN ALN APR AbB AbU Abd Abg Abm Abo Abq Afq 
   55  14   1  26  18   1   1   4   1  13   4   6   3  11   1   1   1   1  95   1 
  Ahq Ajq Alq Anq Ass BrA Bss DAA DAD DAb EAA FKN GAb IAb KNM KNq LNq MNq NMN NqA 
    1   2   1   2   1   1   1   9   2   5   1   3   1   2   6  11   3   4   6  11 
  Nqk Nss OqP PRA PRc QqP RAA RAC RAP RAb RAf RAn Rcq STA TAb Tsb UVA UaA VAD WAA 
   20   1   3  54   6   1   2   2   1  38   2   2   6   4   4   1   1   1   1   1 
  aAA aAZ bBr bBs bUV bUa bdq bgA bmA bpb bqA bqG bqP bqS bqb bqe bqk cqP dqP eqP 
   12   1   1   1   1   1   2   1   1   1  71   1  15   8   5   8   4   6   3  10 
  fqP gAb hqA iQq jqA jqk kqA kqk lqA mAb nqP pbq qAA qAF qAK qAL qAP qAb qAj qAl 
    1   1   1   1   1   1  21   6   1   1   2   1  19   3  23   3   3  44   6   1 
  qAs qGA qPR qST qbq qeq qkq qks rAA sAb sAs sFK sNq sNs sTs sbq ssA ssF ssN sss 
    1   1  51   6   8   9  29   1   1   1   1   1   1   1   1   1   1   1   2   1 
  > countWords(coded, 3, alfa)
     0-0-0   0-0-14   0-0-15   0-0-50   0-14-0  0-14-45   0-15-0  0-17-25 
        55       14        1       26       18        1        1        4 
   0-25-23  0-25-28  0-26-28  0-32-34  0-50-12  0-50-37  0-50-52  0-50-57 
         1       13        4        6        3       11        1        1 
   0-50-65  0-50-70  0-50-74  0-56-74  0-58-74  0-60-74  0-63-74  0-66-74 
         1        1       95        1        1        2        1        2 
     0-x-x  12-75-0   12-x-x   14-0-0  14-0-14  14-0-50   15-0-0 17-25-28 
         1        1        1        9        2        5        1        3 
   19-0-50  24-0-50 25-28-27 25-28-74 26-28-74 27-28-74 28-27-28  28-74-0 
         1        2        6       11        3        4        6       11 
  28-74-61   28-x-x 31-74-32  32-34-0 32-34-51 33-74-32   34-0-0  34-0-13 
        20        1        3       54        6        1        2        2 
   34-0-32  34-0-50  34-0-56  34-0-66 34-51-74  35-36-0  36-0-50  36-x-50 
         1       38        2        2        6        4        4        1 
   37-38-0  37-48-0  38-0-14   40-0-0   48-0-0  48-0-46 50-12-75  50-12-x 
         1        1        1        1       12        1        1        1 
  50-37-38 50-37-48 50-52-74  50-57-0  50-65-0 50-71-50  50-74-0 50-74-19 
         1        1        2        1        1        1       71        1 
  50-74-32 50-74-35 50-74-50 50-74-54 50-74-61 51-74-32 52-74-32 54-74-32 
        15        8        5        8        4        6        3       10 
  56-74-32  57-0-50  58-74-0  6-33-74  60-74-0 60-74-61  61-74-0 61-74-61 
         1        1        1        1        1        1       21        6 
   63-74-0  65-0-50 66-74-32 71-50-74   74-0-0  74-0-17  74-0-25  74-0-26 
         1        1        2        1       19        3       23        3 
   74-0-32  74-0-50  74-0-60  74-0-63   74-0-x  74-19-0 74-32-34 74-35-36 
         3       44        6        1        1        1       51        6 
  74-50-74 74-54-74 74-61-74  74-61-x   75-0-0   x-0-50    x-0-x  x-17-25 
         8        9       29        1        1        1        1        1 
   x-28-74   x-28-x   x-36-x  x-50-74    x-x-0   x-x-17   x-x-28    x-x-x 
         1        1        1        1        1        1        2        1 
  > 
  > IT <- intToUtf8(L <- c(38:44, 46:57, 59:62, 64:126)) ## omit hyphen, colon, and question
  > JT <- paste(strsplit(IT, "|")[[1]], collapse = "-")
  > beta <- Cipher(JT)
  Warning message:
  In Cipher(JT) :*** buffer overflow detected ***: terminated
  Aborted