Development

This section describes how to extend the MIToS API.

MSA

Extending eachmsa

To make eachmsa work with another MSAFormat:

  • Define MIToS.MSA.support_eachmsa(::Type{MyFormat}) = true to declare support.
  • Implement hasnextmsa to check for another alignment, leaving its beginning available to read.
  • Implement parse_file to read one alignment at a time, accepting the requested output type and reading options.

Both reading methods receive the same buffered input and should leave it open. See hasnextmsa for using a header pattern, handling unexpected input, and putting a line back for the next alignment. read_file also uses this interface to warn when more alignments follow the first one.