How to use the ve-sequence-utils.getReverseComplementSequenceAndAnnotations 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
handleReverseComplementSelection: props => () => {
      const {
        sequenceData,
        updateSequenceData,
        wrappedInsertSequenceDataAtPositionOrRange,
        selectionLayer
      } = props;
      if (!(selectionLayer.start > -1)) {
        return; //return early
      }
      const reversedSeqData = getReverseComplementSequenceAndAnnotations(
        sequenceData,
        {
          range: selectionLayer
        }
      );
      const [newSeqData] = wrappedInsertSequenceDataAtPositionOrRange(
        reversedSeqData,
        sequenceData,
        selectionLayer,
        {
          maintainOriginSplit: true
        }
      );
      updateSequenceData(newSeqData);
    },
github TeselaGen / openVectorEditor / src / withEditorInteractions / index.js View on Github external
selectedSeqData => ({
                    sequence: getAminoAcidStringFromSequenceString(
                      getReverseComplementSequenceAndAnnotations(
                        selectedSeqData
                      ).sequence
                    )
                  }),
                  className
github TeselaGen / openVectorEditor / src / redux / utils / addDashesForMatchStartAndEndForTracks / index.js View on Github external
function addDashesForMatchStartAndEnd(
  { alignmentData, sequenceData: _sequenceData },
  template,
  isTemplate
) {
  let sequenceData =_sequenceData
  const {
    sequenceData: sequenceDataTemplate,
    alignmentData: alignmentDataTemplate
  } = template;
  let { matchStart = 0, matchEnd = 0, strand } = alignmentData;
  if (strand === -1) {
     sequenceData=  getReverseComplementSequenceAndAnnotations(sequenceData)
     const oldMatchEnd = matchEnd
     matchEnd = matchStart
     matchStart = oldMatchEnd
  }
  const {
    matchStart: matchStartTemplate = 0,
    matchEnd: matchEndTemplate = 0
  } = alignmentDataTemplate;
  let newAlignmentData;
  if (isTemplate) {
    newAlignmentData = {
      ...alignmentData,
      sequence:
        sequenceDataTemplate.sequence.slice(0, matchStartTemplate) +
        alignmentData.sequence +
        sequenceDataTemplate.sequence.slice(matchEndTemplate + 1)
github TeselaGen / openVectorEditor / src / withEditorProps / index.js View on Github external
handleReverseComplementSequence: props => () => {
      const { sequenceData, updateSequenceData } = props;
      updateSequenceData(
        getReverseComplementSequenceAndAnnotations(sequenceData)
      );
      window.toastr.success("Reverse Complemented Sequence Successfully");
    },