read.alignment function in
seqinr package and helps match names in tree and sequence
alignment. Either provide the file path to an alignment file and its format
or an alignment object from the return of
function. If both the file path and alignment object are given, the
function will use the sequence in the alignment file.
phylo object. This commonly can be from tree
parsing function in
ggtree. All the
tip.label should be found in the sequence alignment. The tree is
supposed to be fully resolved (bifurcated) and will be resolved by
The file path to the multiple sequence alignment file.
The format of the multiple sequence alignment file. The
internal uses the
package to parse the sequence alignment. The default is "fasta" and it also
accepts "clustal", "phylip", "mase", "msf".
alignment object. This commonly can be from
sequence parsing function in the
seqinr package. Sequence
names in the alignment should include all
tip.label in the tree
The type of the sequence in the alignment file. The default is "AA" for amino acid. The other options are "DNA" and "RNA".
Since 1.5.12, the function returns a
phyMSAmatched object to
avoid S3 methods used on
phylo (better encapsulation).