Entering edit mode
jdydu
•
0
@jdydu-10635
Last seen 8.7 years ago
I ran the following example from page 6 of the PairwiseAlignment documentation (https://bioconductor.org/packages/release/bioc/vignettes/Biostrings/inst/doc/PairwiseAlignments.pdf):
> submat <- matrix(-1, nrow = 26, ncol = 26, dimnames = list(letters, letters))
> diag(submat) <- 0
> psa2 <- pairwiseAlignment(pattern = c("succeed", "precede"), subject = "supersede", substitutionMatrix = submat, gapOpening = 0, gapExtension = 1)
> score(psa2)
Error in UseMethod("score") :
no applicable method for 'score' applied to an object of class "c('PairwiseAlignmentsSingleSubject', 'PairwiseAlignments')"
> traceback()
1: score(psa2)
The expected output according to the manual is:
> score(psa2) [1] -5 -5
> sessionInfo() R version 3.2.2 (2015-08-14) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8 x64 (build 9200) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base other attached packages: [1] seqinr_3.1-3 ade4_1.7-4 ggplot2_2.1.0 Biostrings_2.38.4 [5] XVector_0.10.0 IRanges_2.4.8 S4Vectors_0.8.11 BiocGenerics_0.16.1 loaded via a namespace (and not attached): [1] Rcpp_0.12.4 grid_3.2.2 plyr_1.8.3 gtable_0.2.0 scales_0.4.0 [6] zlibbioc_1.16.0 labeling_0.3 tools_3.2.2 munsell_0.4.3 colorspace_1.2-6
I've just downloaded this package using:
source("https://bioconductor.org/biocLite.R") biocLite("Biostrings")
Thank you!