readFasta2Matrix: Read a FASTA file and returns a matrix

View source: R/readFasta2Matrix.R

readFasta2MatrixR Documentation

Read a FASTA file and returns a matrix

Description

Reads a FASTA file of any type and returns a matrix with the species as rows and the sequence positions as columns.

Usage

readFasta2Matrix(file)

Arguments

file

the FASTA file to be read.

Details

Each site of the FASTA file is transformed into a "character" in the matrix. The function only works for sequences of the same length (i.e., alignments).

Value

a matrix with the sequence trait

Author(s)

Daniel Caetano


Caetanods/sequence-trait documentation built on Nov. 25, 2022, 4:32 p.m.