Entering edit mode
vhertzb
•
0
@vhertzb-13331
Last seen 7.5 years ago
I am trying to run phangorn and I am running into a problem with the NJ command.
The R “chunk” that terminates in the NJ call is as follows:
- # First align the sequences
- library(DECIPHER)
- seqs <- getSequences(st)
- # This next command will allow propagation of sequence names to the tip labels of the tree
- names(seqs) <- seqs
- alignment <- AlignSeqs(DNAStringSet(seqs), anchor=NA)
- # Now create the tree
- library(phangorn)
- # Construct the tree
- phang.align <- phyDat(as(alignment, "matrix"), type="DNA")
- dm <- dist.ml(phang.align)
- treeNJ <- NJ(dm) # Tip order will not equal sequence order
The result of this chunk, terminating in the error is as follows:
|
|
|
|
- Loading required package: Biostrings
- Loading required package: BiocGenerics
- Loading required package: parallel
- Attaching package: ‘BiocGenerics’
- The following objects are masked from ‘package:parallel’:
- clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
- clusterExport, clusterMap, parApply, parCapply, parLapply,
- parLapplyLB, parRapply, parSapply, parSapplyLB
- The following object is masked from ‘package:gridExtra’:
- combine
- The following objects are masked from ‘package:stats’:
- IQR, mad, sd, var, xtabs
- The following objects are masked from ‘package:base’:
- anyDuplicated, append, as.data.frame, cbind, colMeans,
- colnames, colSums, do.call, duplicated, eval, evalq, Filter,
- Find, get, grep, grepl, intersect, is.unsorted, lapply,
- lengths, Map, mapply, match, mget, order, paste, pmax,
- pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce,
- rowMeans, rownames, rowSums, sapply, setdiff, sort, table,
- tapply, union, unique, unsplit, which, which.max, which.min
- Loading required package: S4Vectors
- Loading required package: stats4
- Attaching package: ‘S4Vectors’
- The following object is masked from ‘package:base’:
- expand.grid
- Loading required package: IRanges
- Attaching package: ‘IRanges’
- The following object is masked from ‘package:phyloseq’:
- distance
- Loading required package: XVector
- Attaching package: ‘Biostrings’
- The following object is masked from ‘package:base’:
- strsplit
- Loading required package: RSQLite
- Determining distance matrix based on shared 7-mers:
- |================================================================| 100%
- Time difference of 3.85 secs
- Clustering into groups by similarity:
- |================================================================| 100%
- Time difference of 1.62 secs
- Aligning Sequences:
- |================================================================| 100%
- Time difference of 5.07 secs
- Determining distance matrix based on alignment:
- |================================================================| 100%
- Time difference of 1.93 secs
- Reclustering into groups by similarity:
- |================================================================| 100%
- Time difference of 2.3 secs
- Realigning Sequences:
- |================================================================| 100%
- Time difference of 4.21 secs
- Loading required package: ape
- Attaching package: ‘ape’
- The following object is masked from ‘package:Biostrings’:
- complement
- Hide Traceback
- Error in nj(x) : object 'C_nj' not found
|
|
The session.info is as follows:
- R version 3.4.0 (2017-04-21)
- Platform: x86_64-apple-darwin15.6.0 (64-bit)
- Running under: macOS Sierra 10.12.5
- Matrix products: default
- BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
- LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
- locale:
- [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
- attached base packages:
- [1] stats4 parallel stats graphics grDevices utils datasets methods
- [9] base
- other attached packages:
- [1] phangorn_2.2.0 ape_4.1 DECIPHER_2.4.0
- [4] RSQLite_2.0 Biostrings_2.44.1 XVector_0.16.0
- [7] IRanges_2.10.2 S4Vectors_0.14.3 BiocGenerics_0.22.0
- [10] gridExtra_2.2.1 RColorBrewer_1.1-2 ggplot2_2.2.1
- [13] phyloseq_1.20.0 dada2_1.4.0 Rcpp_0.12.11
- [16] BiocInstaller_1.26.0
- loaded via a namespace (and not attached):
- [1] lattice_0.20-35 Rsamtools_1.28.0
- [3] digest_0.6.12 foreach_1.4.3
- [5] GenomeInfoDb_1.12.2 plyr_1.8.4
- [7] ShortRead_1.34.0 zlibbioc_1.22.0
- [9] rlang_0.1.1 lazyeval_0.2.0
- [11] data.table_1.10.4 vegan_2.4-3
- [13] blob_1.1.0 Matrix_1.2-10
- [15] labeling_0.3 splines_3.4.0
- [17] BiocParallel_1.10.1 stringr_1.2.0
- [19] igraph_1.0.1 RCurl_1.95-4.8
- [21] bit_1.1-12 munsell_0.4.3
- [23] DelayedArray_0.2.7 compiler_3.4.0
- [25] multtest_2.32.0 mgcv_1.8-17
- [27] biomformat_1.4.0 SummarizedExperiment_1.6.3
- [29] tibble_1.3.3 GenomeInfoDbData_0.99.0
- [31] quadprog_1.5-5 codetools_0.2-15
- [33] matrixStats_0.52.2 permute_0.9-4
- [35] GenomicAlignments_1.12.1 MASS_7.3-47
- [37] bitops_1.0-6 grid_3.4.0
- [39] nlme_3.1-131 jsonlite_1.5
- [41] gtable_0.2.0 DBI_0.7
- [43] magrittr_1.5 scales_0.4.1
- [45] RcppParallel_4.3.20 stringi_1.1.5
- [47] hwriter_1.3.2 reshape2_1.4.2
- [49] latticeExtra_0.6-28 fastmatch_1.1-0
- [51] iterators_1.0.8 tools_3.4.0
- [53] ade4_1.7-6 bit64_0.9-7
- [55] Biobase_2.36.2 survival_2.41-3
- [57] colorspace_1.3-2 rhdf5_2.20.0
- [59] cluster_2.0.6 GenomicRanges_1.28.3
- [61] memoise_1.1.0 knitr_1.16
Can you please advise – what am I doing wrong, how can I fix this?