theislab/mubind

atomic DNA/protein multi-hot encodings

ilibarra opened this issue · 0 comments

A DNA residue can be defined as one of four possible nucleotides, and a protein residue as one out of twenty. Additionally, atomic representations per residue are convenient to encode potentially relevant interactions between atoms that are directly recognized by the binding proteins, or indirectly relevant to guide molecular recognition. For that reason, fixed dimensions of layers have to be updated by a simplified enum https://docs.python.org/3/library/enum.html

Implement in enum.py

  • implement enum DnaResidue that encodes a simplified representation of {A, C, G, T}.
  • implement enum ProteinResidue that encodes a simplified representation of residues.
  • implement enum ProteinAtom that encodes a simplified representation of protein atoms. Use this 40 representation as a starter http://melolab.org/anolea/DD_KB_MFP.html
  • implement enum DnaAtom that updates a simplified, non-redudant. dictionary of atoms for the four most relevant nucleotides https://drv.brc.hu/help/theoretical_background_files/image019.png.
  • Update MultiBind to include variable self.input_enum (or equivalent name). This variable will be an enum representation of DNA {A, C, G, T}, or an arbitrary representation of atom types for a nucleotide. All methods should consider this for encoding purposes. Importantly, mono2rev and reverse complementary function might require check ups.
  • Given a DNA mono input with shape (, width), a torch like function needs to convert it into an enum of shape (num_non_redundant_atom, width).
  • Given a residue input, convert into one-hot encoding using ProteinResidue or ProteinAtom, based on enum option.