Can't open fasta file into phyDat format

92 Views Asked by At

I have been using the R phangorn package to open a fasta file into phyDat format to analyze.

I believe I have set up the file reading incorrectly:

dataFile <- file("primatesAA.meg")

phyData <- read.phyDat(dataFile, format = "fasta", type = "AA")
modelTest(dataFile, tree = NULL, model = "all", G = TRUE, I = TRUE,
      FREQ = FALSE, k = 4, control = pml.control(epsilon = 1e-08, maxit = 10,
                                                 trace = 1), multicore = FALSE, mc.cores 
           = NULL)

I got the following error message.

dataFile <- file("primatesAA.meg") phyData <- read.phyDat(dataFile, format = "fasta", type = "AA") Error in if (ncol(data) == 1) compress <- FALSE : argument is of length zero In addition: Warning message: In read.FASTA(file, type = "AA") : failed to read sequences, returns NULL

Is there a correct way to set this up?

0

There are 0 best solutions below