grelu.io.fasta#

Functions related to reading and writing FASTA files

Functions#

check_fasta(→ bool)

Check if the given file path has a valid FASTA extension and exists.

read_fasta(→ List[str])

Read sequences from a FASTA or gzipped FASTA file.

Module Contents#

grelu.io.fasta.check_fasta(fasta_file: str) bool[source]#

Check if the given file path has a valid FASTA extension and exists.

Parameters:

fasta_file – Path to the file to check.

Returns:

True if the file path has a valid FASTA extension and exists, False otherwise.

grelu.io.fasta.read_fasta(fasta_file: str) List[str][source]#

Read sequences from a FASTA or gzipped FASTA file.

Parameters:

fasta_file – Path to the FASTA or gzipped FASTA file.

Returns:

A list of DNA sequences as strings.