problem with phangorn
0
0
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:

 

  1. # First align the sequences
  2. library(DECIPHER)
  3. seqs <- getSequences(st)
  4.  
  5. # This next command will allow propagation of sequence names to the tip labels of the tree
  6. names(seqs) <- seqs
  7. alignment <- AlignSeqs(DNAStringSet(seqs), anchor=NA)
  8.  
  9. # Now create the tree
  10.  
  11. library(phangorn)
  12.  
  13. # Construct the tree
  14. phang.align <- phyDat(as(alignment, "matrix"), type="DNA")
  15. dm <- dist.ml(phang.align)
  16. treeNJ <- NJ(dm) # Tip order will not equal sequence order

 

The result of this chunk, terminating in the error is as follows:

 

  1. 3.
  1. nj(x)
  1. 2.
  1. reorder(nj(x), "postorder")
  1. Loading required package: Biostrings
  2. Loading required package: BiocGenerics
  3. Loading required package: parallel
  4.  
  5. Attaching package: ‘BiocGenerics’
  6.  
  7. The following objects are masked from ‘package:parallel’:
  8.  
  9.     clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
  10.     clusterExport, clusterMap, parApply, parCapply, parLapply,
  11.     parLapplyLB, parRapply, parSapply, parSapplyLB
  12.  
  13. The following object is masked from ‘package:gridExtra’:
  14.  
  15.     combine
  16.  
  17. The following objects are masked from ‘package:stats’:
  18.  
  19.     IQR, mad, sd, var, xtabs
  20.  
  21. The following objects are masked from ‘package:base’:
  22.  
  23.     anyDuplicated, append, as.data.frame, cbind, colMeans,
  24.     colnames, colSums, do.call, duplicated, eval, evalq, Filter,
  25.     Find, get, grep, grepl, intersect, is.unsorted, lapply,
  26.     lengths, Map, mapply, match, mget, order, paste, pmax,
  27.     pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce,
  28.     rowMeans, rownames, rowSums, sapply, setdiff, sort, table,
  29.     tapply, union, unique, unsplit, which, which.max, which.min
  30.  
  31. Loading required package: S4Vectors
  32. Loading required package: stats4
  33.  
  34. Attaching package: ‘S4Vectors’
  35.  
  36. The following object is masked from ‘package:base’:
  37.  
  38.     expand.grid
  39.  
  40. Loading required package: IRanges
  41.  
  42. Attaching package: ‘IRanges’
  43.  
  44. The following object is masked from ‘package:phyloseq’:
  45.  
  46.     distance
  47.  
  48. Loading required package: XVector
  49.  
  50. Attaching package: ‘Biostrings’
  51.  
  52. The following object is masked from ‘package:base’:
  53.  
  54.     strsplit
  55.  
  56. Loading required package: RSQLite
  57. Determining distance matrix based on shared 7-mers:
  58.   |================================================================| 100%
  59.  
  60. Time difference of 3.85 secs
  61.  
  62. Clustering into groups by similarity:
  63.   |================================================================| 100%
  64.  
  65. Time difference of 1.62 secs
  66.  
  67. Aligning Sequences:
  68.   |================================================================| 100%
  69.  
  70. Time difference of 5.07 secs
  71.  
  72. Determining distance matrix based on alignment:
  73.   |================================================================| 100%
  74.  
  75. Time difference of 1.93 secs
  76.  
  77. Reclustering into groups by similarity:
  78.   |================================================================| 100%
  79.  
  80. Time difference of 2.3 secs
  81.  
  82. Realigning Sequences:
  83.   |================================================================| 100%
  84.  
  85. Time difference of 4.21 secs
  86.  
  87. Loading required package: ape
  88.  
  89. Attaching package: ‘ape’
  90.  
  91. The following object is masked from ‘package:Biostrings’:
  92.  
  93.     complement
  94.  
  95. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAKUlEQVR42mNgQAKi65/9Z8AHQApgmKACrAqxKcBpIkHryFJEstsYiAUAKIxac8kmY3AAAAAASUVORK5CYII= Hide Traceback
  96. Error in nj(x) : object 'C_nj' not found
  97.  
  98.  
  1. 1.
  1. NJ(dm)

 

The session.info is as follows:

 

  1. R version 3.4.0 (2017-04-21)
  2. Platform: x86_64-apple-darwin15.6.0 (64-bit)
  3. Running under: macOS Sierra 10.12.5
  4.  
  5. Matrix products: default
  6. BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
  7. LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
  8.  
  9. locale:
  10. [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
  11.  
  12. attached base packages:
  13. [1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods 
  14. [9] base    
  15.  
  16. other attached packages:
  17. [1] phangorn_2.2.0       ape_4.1              DECIPHER_2.4.0     
  18.  [4] RSQLite_2.0          Biostrings_2.44.1    XVector_0.16.0      
  19.  [7] IRanges_2.10.2       S4Vectors_0.14.3     BiocGenerics_0.22.0
  20. [10] gridExtra_2.2.1      RColorBrewer_1.1-2   ggplot2_2.2.1      
  21. [13] phyloseq_1.20.0      dada2_1.4.0          Rcpp_0.12.11       
  22. [16] BiocInstaller_1.26.0
  23.  
  24. loaded via a namespace (and not attached):
  25. [1] lattice_0.20-35            Rsamtools_1.28.0         
  26.  [3] digest_0.6.12              foreach_1.4.3            
  27.  [5] GenomeInfoDb_1.12.2        plyr_1.8.4               
  28.  [7] ShortRead_1.34.0           zlibbioc_1.22.0           
  29.  [9] rlang_0.1.1                lazyeval_0.2.0           
  30. [11] data.table_1.10.4          vegan_2.4-3              
  31. [13] blob_1.1.0                 Matrix_1.2-10            
  32. [15] labeling_0.3               splines_3.4.0            
  33. [17] BiocParallel_1.10.1        stringr_1.2.0            
  34. [19] igraph_1.0.1               RCurl_1.95-4.8           
  35. [21] bit_1.1-12                 munsell_0.4.3            
  36. [23] DelayedArray_0.2.7         compiler_3.4.0           
  37. [25] multtest_2.32.0            mgcv_1.8-17              
  38. [27] biomformat_1.4.0           SummarizedExperiment_1.6.3
  39. [29] tibble_1.3.3               GenomeInfoDbData_0.99.0  
  40. [31] quadprog_1.5-5             codetools_0.2-15         
  41. [33] matrixStats_0.52.2         permute_0.9-4            
  42. [35] GenomicAlignments_1.12.1   MASS_7.3-47              
  43. [37] bitops_1.0-6               grid_3.4.0               
  44. [39] nlme_3.1-131               jsonlite_1.5             
  45. [41] gtable_0.2.0               DBI_0.7                   
  46. [43] magrittr_1.5               scales_0.4.1             
  47. [45] RcppParallel_4.3.20        stringi_1.1.5            
  48. [47] hwriter_1.3.2              reshape2_1.4.2           
  49. [49] latticeExtra_0.6-28        fastmatch_1.1-0          
  50. [51] iterators_1.0.8            tools_3.4.0              
  51. [53] ade4_1.7-6                 bit64_0.9-7              
  52. [55] Biobase_2.36.2             survival_2.41-3          
  53. [57] colorspace_1.3-2           rhdf5_2.20.0             
  54. [59] cluster_2.0.6              GenomicRanges_1.28.3     
  55. [61] memoise_1.1.0              knitr_1.16

 

Can you please advise – what am I doing wrong, how can I fix this?

software error phangorn • 2.0k views
ADD COMMENT

Login before adding your answer.

Traffic: 377 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6