Hi Jarrett,
This has been working for me using the package ‘apex':
x <- read.multiFASTA(files) # creates a multiDNA object
genes <- x@dna[] # creates a list with your loci.
I hope this helps.
Best
Gustavo
Em qui., 12 de mar. de 2020 às 11:18, Jarrett Phillips <
phillipsjarre...@gmail.com>
Hi Jarrett,
read.FASTA() always returns a list. So you may do something (quite general)
like:
fls <- dir(pattern = "\\.fas$|\\.fasta$", ignore.case = TRUE) # add more file
extensions if needed
X <- lapply(fls, read.FASTA)
seqlen <- lengths(X)
if (length(unique(seqlen)) == 1) X <- as.matrix(X)
ay, March 12, 2020 10:26 AM
To: Jarrett Phillips ; r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] Iterating though multiple FASTA files via
rbind.DNAbin
Dear Jarrett.
I haven't checked to see if this works, but "DNAbin" objects can either
be a matrix (the default if all the sequence