How to use the ve-sequence-utils.getComplementSequenceAndAnnotations function in ve-sequence-utils

To help you get started, we’ve selected a few ve-sequence-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TeselaGen / openVectorEditor / src / withEditorProps / index.js View on Github external
handleComplementSequence: props => () => {
      const { sequenceData, updateSequenceData } = props;
      updateSequenceData(getComplementSequenceAndAnnotations(sequenceData));
      window.toastr.success("Complemented Sequence Successfully");
    },
    /* eslint-enable no-unused-vars */
github TeselaGen / openVectorEditor / src / withEditorProps / index.js View on Github external
handleComplementSelection: props => () => {
      const {
        sequenceData,
        updateSequenceData,
        selectionLayer,
        wrappedInsertSequenceDataAtPositionOrRange
      } = props;
      if (!(selectionLayer.start > -1)) {
        return; //return early
      }
      const comp = getComplementSequenceAndAnnotations(sequenceData, {
        range: selectionLayer
      });
      const [newSeqData] = wrappedInsertSequenceDataAtPositionOrRange(
        comp,
        sequenceData,
        selectionLayer,
        {
          maintainOriginSplit: true
        }
      );
      updateSequenceData(newSeqData);
    },