How to use the ve-sequence-utils.getSequenceDataBetweenRange 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 / commands / index.js View on Github external
handler: props => {
      props.onCreateNewFromSubsequence(
        getSequenceDataBetweenRange(props.sequenceData, props.selectionLayer),
        props
      );
    }
    // hotkey: "mod+x"
github TeselaGen / openVectorEditor / src / AlignmentView / index.js View on Github external
text: () => {
                            const { selectionLayer } =
                              this.props.store.getState().VectorEditor
                                .__allEditorsOptions.alignments[
                                this.props.id
                              ] || {};
                            const seqDataToCopy = getSequenceDataBetweenRange(
                              alignmentData,
                              selectionLayer
                            ).sequence;
                            const seqDataToCopyAsFasta = `>${name}\r\n${seqDataToCopy}\r\n`;
                            return seqDataToCopyAsFasta;
                          }
                        }
github TeselaGen / openVectorEditor / src / withEditorInteractions / index.js View on Github external
text: () => {
            const { selectionLayer, editorName, store } = this.props;
            const { sequenceData, copyOptions } = store.getState().VectorEditor[
              editorName
            ];
            const selectedSeqData = getSequenceDataBetweenRange(
              sequenceData,
              selectionLayer,
              {
                excludePartial: {
                  features: !copyOptions.partialFeatures,
                  parts: !copyOptions.partialParts
                },
                exclude: {
                  features: !copyOptions.features,
                  parts: !copyOptions.parts
                }
              }
            );
            const sequenceDataToCopy = transformFunc(
              selectedSeqData,
              sequenceData
github TeselaGen / openVectorEditor / src / utils / editorUtils.js View on Github external
const GCContent = (numDecimalDigits = 0) =>
      calculatePercentGC(
        getSequenceDataBetweenRange(sequenceData, selectionLayer).sequence
      ).toFixed(numDecimalDigits);
    const seqLen = divideBy3(length, isProtein);
github TeselaGen / openVectorEditor / src / AlignmentView / index.js View on Github external
alignmentTracks.forEach(track => {
      const seqDataToCopy = getSequenceDataBetweenRange(
        track.alignmentData,
        selectionLayer
      ).sequence;
      seqDataOfAllTracksToCopy.push(
        `>${track.alignmentData.name}\r\n${seqDataToCopy}\r\n`
      );
    });
    return seqDataOfAllTracksToCopy.join("");
github TeselaGen / openVectorEditor / src / withEditorInteractions / index.js View on Github external
handleCutOrCopy = isCut => e => {
      const {
        onCopy = () => {},
        sequenceData,
        selectionLayer,
        copyOptions
      } = this.props;
      const onCut = this.props.onCut || this.props.onCopy || (() => {});

      const seqData = tidyUpSequenceData(
        this.sequenceDataToCopy ||
          getSequenceDataBetweenRange(sequenceData, selectionLayer, {
            excludePartial: {
              features: !copyOptions.partialFeatures,
              parts: !copyOptions.partialParts
            },
            exclude: {
              features: !copyOptions.features,
              parts: !copyOptions.parts
            }
          }),
        { annotationsAsObjects: true }
      );
      if (!seqData.sequence.length)
        return window.toastr.warning(
          `No Sequence Selected To ${isCut ? "Cut" : "Copy"}`
        );