Skip to content

Module: Alphabets

Hannes Hauswedell edited this page Feb 1, 2017 · 10 revisions

Possible Layout

alph/alphabet.hpp               // Alphabet concept
alph/alphabet_container.hpp     // generic alphabet traits for basic_string adaption and string->ostream adapters

alph/nucl/dna4.hpp                    // dna alphabet definition; alias from dna4 to dna
alph/nucl/dna4_container.hpp          // dna traits specialization; aliases for string and vector; literal

alph/nucl/dna5.hpp                   // plus N
alph/nucl/dna5_container.hpp

alph/nucl/dna16.hpp                  // full IUPAC code
alph/nucl/dna16_container.hpp

alph/nucl/conversion.hpp             // code for converting between differenct nucl alphabets and containers
alph/nucl/conversion_container.hpp   // code for converting containers; view implementation


alph/aminoacid/aa27.hpp                    // amino acid (27 letter code)
alph/aminoacid/aa27_container.hpp

alph/aminoacid/murphy10.hpp                // murphy reduction (10 letter code)
alph/aminoacid/murphy10_container.hpp

alph/aminoacid/conversion.hpp             // code for converting between differenct amino acid alphabets and containers
alph/aminoacid/conversion_container.hpp   // code for converting containers; view implementations

alph/translation.hpp            // code for translating nucl -> amino acid

General Questions

  • should the default be dna4 or dna16?
  • should we have extra alphabets for RNA?
  • if we don't, should we rename dna to nucl?

Layout questions

Should we create subfolders, e.g.

alph/...
alph/nucl/...
alph/aminoacid/...

Should we use abbreviations or spell out, i.e. alphabet/nucleotide/?

Code questions

  • do we want to support only general containers (e.g. std::vector) or also std::basic_string?
  • the latter seems intuitive, but we won't be able to do it 100%, because of null terminator requirements...
  • for our alphabets, do want to allow
    • no conversion from char
    • explicit conversion from char
    • implicit conversion from char
  • likewise:
    • no conversion to char
    • explicit conversion to char
    • implicit conversion to char
  • (my tendency checked)

Prototype implementation

Clone this wiki locally