From 52855df8b30034448a05be7529e1cc4c8edc5229 Mon Sep 17 00:00:00 2001 From: David Mayer Date: Thu, 19 Sep 2024 10:23:47 -0600 Subject: [PATCH] fixes #16 - read.aa is no longer exported but can be replaced with read.phyDat - this is in accordance with the latest released version of phangorn --- NAMESPACE | 2 +- R/tree.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 99b342bd..16cf0813 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -210,7 +210,7 @@ importFrom(phangorn,plotBS) importFrom(phangorn,pml) importFrom(phangorn,pml.control) importFrom(phangorn,pratchet) -importFrom(phangorn,read.aa) +importFrom(phangorn,read.phyDat) importFrom(phangorn,upgma) importFrom(plotly,plot_ly) importFrom(purrr,as_vector) diff --git a/R/tree.R b/R/tree.R index 87337236..01e9ead5 100755 --- a/R/tree.R +++ b/R/tree.R @@ -116,7 +116,7 @@ generate_trees <- function(aln_path = here("data/alns/")) { #' @param out_file #' #' @importFrom ape write.tree -#' @importFrom phangorn bootstrap.pml dist.ml NJ modelTest phyDat plotBS pml pml.control pratchet optim.parsimony optim.pml read.aa upgma +#' @importFrom phangorn bootstrap.pml dist.ml NJ modelTest phyDat plotBS pml pml.control pratchet optim.parsimony optim.pml read.phyDat upgma #' @importFrom seqinr dist.alignment read.alignment #' @importFrom stats logLik #' @@ -156,7 +156,7 @@ generate_fa2tre <- function(fa_file = "data/alns/pspa_snf7.fa", ########################### ## Alignment file formats and conversion # read in sequence data, convert to phyDat - prot_fa <- read.aa(fa_file, format = "fasta") + prot_fa <- read.phyDat(fa_file, format = "fasta", type = "AA") prot_phyDat <- phyDat(prot_fa, type = "AA", levels = NULL) prot10 <- subset(prot_phyDat, 1:10) prot10_phyDat <- phyDat(prot10, type = "AA", levels = NULL)