grelu.io.fasta
grelu.io.fasta contains functions related to reading and writing FASTA files.
A description of the FASTA format is here: https://arep.med.harvard.edu/seqanal/fasta.html
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.