pub fn read_fasta(filename: &str) -> Result<DataFrame, MotifError>Expand description
Reads sequences from a FASTA format file and converts them into a Polars DataFrame.
§Arguments
filename- Path to the FASTA file to read
§Returns
Result<DataFrame>- A DataFrame with two columns:- “label”: The sequence identifiers (without ‘>’ prefix)
- “sequence”: The corresponding DNA/RNA sequences in uppercase
§Errors
- Returns
MotifError::InvalidFileFormatif no sequences are found - Returns
MotifError::DataErrorif DataFrame creation fails - Returns
std::io::Errorfor file reading issues