Entering edit mode
There appears to be a bug in pairwiseAlignment() in which an error is thrown when when a substitution matrix is specified, but all strings are empty. Is this intended?
A minimal reproducible test is as follows:
> pairwiseAlignment(c(""), c(""), substitutionMatrix=nucleotideSubstitutionMatrix())
Error in buildLookupTable(alphabetToCodes[availableLetters], 0:(length(availableLetters) - :
'vals' must be a vector of the length of 'keys'
> traceback()
7: stop("'vals' must be a vector of the length of 'keys'")
6: buildLookupTable(alphabetToCodes[availableLetters], 0:(length(availableLetters) -
1))
5: XStringSet.pairwiseAlignment(pattern = pattern, subject = subject,
type = type, substitutionMatrix = substitutionMatrix, gapOpening = gapOpening,
gapExtension = gapExtension, scoreOnly = scoreOnly)
4: mpi.XStringSet.pairwiseAlignment(pattern, subject, type = type,
substitutionMatrix = substitutionMatrix, gapOpening = gapOpening,
gapExtension = gapExtension, scoreOnly = scoreOnly)
3: .local(pattern, subject, ...)
2: pairwiseAlignment(c(""), c(""), substitutionMatrix = nucleotideSubstitutionMatrix())
1: pairwiseAlignment(c(""), c(""), substitutionMatrix = nucleotideSubstitutionMatrix())
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 LC_MONETARY=English_Australia.1252 LC_NUMERIC=C LC_TIME=English_Australia.1252
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] StructuralVariantAnnotation_0.1 stringr_1.0.0 DECIPHER_1.16.1 RSQLite_1.0.0 DBI_0.3.1
[6] BiocInstaller_1.20.1 profvis_0.1.6 lineprof_0.1.9001 ggplot2_2.1.0 VariantAnnotation_1.16.4
[11] Rsamtools_1.22.0 Biostrings_2.38.4 XVector_0.10.0 SummarizedExperiment_1.0.2 Biobase_2.30.0
[16] GenomicRanges_1.22.4 GenomeInfoDb_1.6.3 IRanges_2.4.8 S4Vectors_0.8.11 BiocGenerics_0.16.1
[21] assertthat_0.1 roxygen2_5.0.1 testthat_0.11.0 devtools_1.10.0
loaded via a namespace (and not attached):
[1] colorspace_1.2-6 BSgenome.Hsapiens.UCSC.hg19_1.4.0 htmltools_0.3 rtracklayer_1.30.3 yaml_2.1.13
[6] GenomicFeatures_1.22.13 XML_3.98-1.4 withr_1.0.1 BiocParallel_1.4.3 lambda.r_1.1.7
[11] plyr_1.8.3 zlibbioc_1.16.0 munsell_0.4.3 gtable_0.2.0 futile.logger_1.4.1
[16] htmlwidgets_0.6 memoise_1.0.0 labeling_0.3 biomaRt_2.26.1 curl_0.9.6
[21] AnnotationDbi_1.32.3 Rcpp_0.12.3 scales_0.4.0 BSgenome_1.38.0 jsonlite_0.9.19
[26] digest_0.6.9 stringi_1.0-1 grid_3.2.2 tools_3.2.2 bitops_1.0-6
[31] magrittr_1.5 RCurl_1.95-4.8 futile.options_1.0.0 crayon_1.3.1 MASS_7.3-45
[36] httr_1.1.0 R6_2.1.2 GenomicAlignments_1.6.3 git2r_0.14.0