Synbiota / GENtle2

GENtle2 - Web-Based DNA Editor for Synthetic Biology
https://synbiota.com
100 stars 37 forks source link

sequenceModel instantiation should validate stickyEnds (and sequence) if present #247

Open AJamesPhillips opened 9 years ago

AJamesPhillips commented 9 years ago

If a new sequence is made:

var attributes = {
  sequence: 'AT',
  stickyEnds: {
    start: {
      sequence: 'GG',
      offset: 1,
      size: 1,
    }
  }
};
new SequenceModel(attributes);

... then the attributes are invalid, and the sequenceModel should fail to instantiate. Either the sequence should be GGAT given the stickyEnd start sequence of GG, or the stickyEnd sequence should be AT.