3.2 Private API
The elements described in this section are not part of the public interface. They are used internally. However, for anyone wishing to extend (harebrained scheme) these procedures are documented in this section. This interface is also considered unstable until release v1.0.
3.2.1 (harebrained bio private types)
This library contains the record types at the top of the hierarchy. They are imported into all other libraries.
record-type
<bio> : bio? = (define-record-type <bio> bio bio?)
The top of the hierarchy of record types. It does not contain any fields and is used to identify all records that are part of (harebrained bio). The constructor is not exported from the library.
record-type
<named> : named?
= (define-record-type <named> (parent <bio>) (fields (immutable name name)))
<named> is a record type for all objects that naturally have a name. These are many in bioinformatics, e.g. genes, genomes and features. The constructor is not exported from the library. The name of any instance of <name> can be extracted with the name accessor function.
3.2.2 (harebrained bio read private utilities)
This file contains some utilities functions that are useful when reading and parsing text file formats.
procedure
(char->symbol c) → symbol?
c : char?
Convert a character read via read-char to a symbol, hopefully somewhate efficiently by explicitely matching known biological characters.
procedure
(choose-alphabet l) → (or/c dna rna protein bioseq)
l : (listof symbol?)
Procedure that returns the correct constructor for a bioseq given a list of symbols. It will infer whether l represents a DNA alphabet, RNA alphabet or amino acid alphabet.