{"action":"opened","issue":{"url":"https://api.github.com/repos/Bioconductor/Biostrings/issues/14","repository_url":"https://api.github.com/repos/Bioconductor/Biostrings","labels_url":"https://api.github.com/repos/Bioconductor/Biostrings/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/Bioconductor/Biostrings/issues/14/comments","events_url":"https://api.github.com/repos/Bioconductor/Biostrings/issues/14/events","html_url":"https://github.com/Bioconductor/Biostrings/issues/14","id":330683421,"node_id":"MDU6SXNzdWUzMzA2ODM0MjE=","number":14,"title":"alignedSubject/Pattern takes a long time to run","user":{"login":"LTLA","id":8166669,"node_id":"MDQ6VXNlcjgxNjY2Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/8166669?v=4","gravatar_id":"","url":"https://api.github.com/users/LTLA","html_url":"https://github.com/LTLA","followers_url":"https://api.github.com/users/LTLA/followers","following_url":"https://api.github.com/users/LTLA/following{/other_user}","gists_url":"https://api.github.com/users/LTLA/gists{/gist_id}","starred_url":"https://api.github.com/users/LTLA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LTLA/subscriptions","organizations_url":"https://api.github.com/users/LTLA/orgs","repos_url":"https://api.github.com/users/LTLA/repos","events_url":"https://api.github.com/users/LTLA/events{/privacy}","received_events_url":"https://api.github.com/users/LTLA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-08T14:35:16Z","updated_at":"2018-06-08T14:35:16Z","closed_at":null,"author_association":"NONE","body":"It seems that `alignedSubject` and `alignedPattern` take an unexpectedly long time to run:\r\n\r\n```r\r\nlibrary(Biostrings)\r\nsystem.time(aln <- pairwiseAlignment(subject=DNAString(c(\"AAACGATCAGCTACGAACACT\")), \r\n      DNAStringSet(rep(\"AACGAGGGCCACCTAGGAAGAAT\", 1000))))\r\n##   user  system elapsed \r\n##  0.208   0.008   0.219 \r\nsystem.time(X <- alignedPattern(aln))\r\n##   user  system elapsed \r\n## 16.622   0.008  16.783 \r\nsystem.time(Y <- alignedSubject(aln))\r\n##   user  system elapsed \r\n## 15.862   0.008  16.011 \r\n```\r\n\r\nAlmost 100 times slower than the alignment itself, which I would have expected to be the most computationally intensive part of the process! This is a shame as we've been using the full alignment strings for large-scale processing of Nanopore data. I assume that the slowness is because the addition of `-`s to the end of the aligned sequence is done in a `lapply` loop in `get_aligned_pattern`.\r\n\r\n```\r\nR version 3.5.0 Patched (2018-04-30 r74679)\r\nPlatform: x86_64-pc-linux-gnu (64-bit)\r\nRunning under: Ubuntu 16.04.4 LTS\r\n\r\nMatrix products: default\r\nBLAS: /home/cri.camres.org/lun01/Software/R/R-3-5-branch/lib/libRblas.so\r\nLAPACK: /home/cri.camres.org/lun01/Software/R/R-3-5-branch/lib/libRlapack.so\r\n\r\nlocale:\r\n [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              \r\n [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    \r\n [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   \r\n [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 \r\n [9] LC_ADDRESS=C               LC_TELEPHONE=C            \r\n[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       \r\n\r\nattached base packages:\r\n[1] stats4    parallel  stats     graphics  grDevices utils     datasets \r\n[8] methods   base     \r\n\r\nother attached packages:\r\n[1] Biostrings_2.49.0   XVector_0.21.1      IRanges_2.15.13    \r\n[4] S4Vectors_0.19.11   BiocGenerics_0.27.0\r\n\r\nloaded via a namespace (and not attached):\r\n[1] zlibbioc_1.27.0 compiler_3.5.0 \r\n```\r\n"}}
{"actor":{"display_login":"LTLA"}}