@teselagen/ove 0.3.50 → 0.3.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.umd.js CHANGED
@@ -45118,7 +45118,15 @@ ${latestSubscriptionCallbackError.current.stack}
45118
45118
  var _objectGops = {};
45119
45119
  _objectGops.f = Object.getOwnPropertySymbols;
45120
45120
  var _objectPie = {};
45121
- _objectPie.f = {}.propertyIsEnumerable;
45121
+ var hasRequired_objectPie;
45122
+ function require_objectPie() {
45123
+ if (hasRequired_objectPie)
45124
+ return _objectPie;
45125
+ hasRequired_objectPie = 1;
45126
+ _objectPie.f = {}.propertyIsEnumerable;
45127
+ return _objectPie;
45128
+ }
45129
+ __name(require_objectPie, "require_objectPie");
45122
45130
  var defined$1 = _defined;
45123
45131
  var _toObject = /* @__PURE__ */ __name(function(it) {
45124
45132
  return Object(defined$1(it));
@@ -45132,7 +45140,7 @@ ${latestSubscriptionCallbackError.current.stack}
45132
45140
  var DESCRIPTORS2 = _descriptors;
45133
45141
  var getKeys2 = _objectKeys;
45134
45142
  var gOPS2 = _objectGops;
45135
- var pIE2 = _objectPie;
45143
+ var pIE2 = require_objectPie();
45136
45144
  var toObject2 = _toObject;
45137
45145
  var IObject2 = require_iobject();
45138
45146
  var $assign = Object.assign;
@@ -45769,7 +45777,7 @@ ${latestSubscriptionCallbackError.current.stack}
45769
45777
  }, "_wksDefine");
45770
45778
  var getKeys = _objectKeys;
45771
45779
  var gOPS$1 = _objectGops;
45772
- var pIE$1 = _objectPie;
45780
+ var pIE$1 = require_objectPie();
45773
45781
  var _enumKeys = /* @__PURE__ */ __name(function(it) {
45774
45782
  var result = getKeys(it);
45775
45783
  var getSymbols2 = gOPS$1.f;
@@ -45810,7 +45818,7 @@ ${latestSubscriptionCallbackError.current.stack}
45810
45818
  return windowNames && toString$3.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
45811
45819
  }, "getOwnPropertyNames");
45812
45820
  var _objectGopd = {};
45813
- var pIE = _objectPie;
45821
+ var pIE = require_objectPie();
45814
45822
  var createDesc$1 = _propertyDesc;
45815
45823
  var toIObject$1 = _toIobject;
45816
45824
  var toPrimitive$1 = _toPrimitive$1;
@@ -45990,7 +45998,7 @@ ${latestSubscriptionCallbackError.current.stack}
45990
45998
  $GOPD.f = $getOwnPropertyDescriptor;
45991
45999
  $DP.f = $defineProperty;
45992
46000
  _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
45993
- _objectPie.f = $propertyIsEnumerable;
46001
+ require_objectPie().f = $propertyIsEnumerable;
45994
46002
  $GOPS.f = $getOwnPropertySymbols;
45995
46003
  if (DESCRIPTORS && !_library) {
45996
46004
  redefine(ObjectProto, "propertyIsEnumerable", $propertyIsEnumerable);
@@ -114744,7 +114752,9 @@ ${latestSubscriptionCallbackError.current.stack}
114744
114752
  }
114745
114753
  __name(arrayRotate, "arrayRotate");
114746
114754
  function rotateSequenceDataToPosition(sequenceData2, caretPosition2, options) {
114747
- const newSequenceData = tidyUpSequenceData(sequenceData2, options);
114755
+ const newSequenceData = tidyUpSequenceData(sequenceData2, __spreadValues({
114756
+ doNotRemoveInvalidChars: true
114757
+ }, options));
114748
114758
  newSequenceData.sequence = rotateBpsToPosition(
114749
114759
  newSequenceData.sequence,
114750
114760
  caretPosition2
@@ -114781,7 +114791,7 @@ ${latestSubscriptionCallbackError.current.stack}
114781
114791
  __name(adjustAnnotationsToInsert, "adjustAnnotationsToInsert");
114782
114792
  function insertSequenceDataAtPositionOrRange(_sequenceDataToInsert, _existingSequenceData, caretPositionOrRange, options = {}) {
114783
114793
  const { maintainOriginSplit } = options;
114784
- let existingSequenceData = tidyUpSequenceData(_existingSequenceData, options);
114794
+ let existingSequenceData = tidyUpSequenceData(_existingSequenceData, __spreadValues({ doNotRemoveInvalidChars: true }, options));
114785
114795
  const sequenceDataToInsert = tidyUpSequenceData(
114786
114796
  _sequenceDataToInsert,
114787
114797
  options
@@ -114799,6 +114809,7 @@ ${latestSubscriptionCallbackError.current.stack}
114799
114809
  return acc[type] = [];
114800
114810
  }, {})), {
114801
114811
  sequence: "",
114812
+ doNotRemoveInvalidChars: true,
114802
114813
  proteinSequence: "",
114803
114814
  chromatogramData: void 0
114804
114815
  }),
@@ -122829,7 +122840,7 @@ ${latestSubscriptionCallbackError.current.stack}
122829
122840
  if (!range2)
122830
122841
  return seqData;
122831
122842
  const { exclude = {}, excludePartial = {} } = options;
122832
- const seqDataToUse = tidyUpSequenceData(seqData, options);
122843
+ const seqDataToUse = tidyUpSequenceData(seqData, __spreadValues({ doNotRemoveInvalidChars: true }, options));
122833
122844
  annotationTypes.forEach((type) => {
122834
122845
  delete seqDataToUse[`filtered${lodashExports.startCase(type)}`];
122835
122846
  });
@@ -122880,9 +122891,9 @@ ${latestSubscriptionCallbackError.current.stack}
122880
122891
  }
122881
122892
  });
122882
122893
  });
122883
- return tidyUpSequenceData(toRet, options);
122894
+ return tidyUpSequenceData(toRet, __spreadValues({ doNotRemoveInvalidChars: true }, options));
122884
122895
  }
122885
- return tidyUpSequenceData(seqDataToReturn, options);
122896
+ return tidyUpSequenceData(seqDataToReturn, __spreadValues({ doNotRemoveInvalidChars: true }, options));
122886
122897
  }
122887
122898
  __name(getSequenceDataBetweenRange, "getSequenceDataBetweenRange");
122888
122899
  function getAnnotationsBetweenRange(annotationsToBeAdjusted, range2, maxLength, shouldExcludePartial) {
@@ -122929,7 +122940,7 @@ ${latestSubscriptionCallbackError.current.stack}
122929
122940
  const newSeqObj = Object.assign({}, seqObj, {
122930
122941
  sequence: getComplementSequenceString(seqObj.sequence, seqObj.isRna)
122931
122942
  });
122932
- return tidyUpSequenceData(newSeqObj, options);
122943
+ return tidyUpSequenceData(newSeqObj, __spreadValues({ doNotRemoveInvalidChars: true }, options));
122933
122944
  }
122934
122945
  __name(getComplementSequenceAndAnnotations, "getComplementSequenceAndAnnotations");
122935
122946
  function getCutsiteType(restrictionEnzyme) {
@@ -122977,7 +122988,7 @@ ${latestSubscriptionCallbackError.current.stack}
122977
122988
  function getReverseComplementSequenceAndAnnoations(pSeqObj, options = {}) {
122978
122989
  const seqObj = tidyUpSequenceData(
122979
122990
  getSequenceDataBetweenRange(pSeqObj, options.range),
122980
- options
122991
+ __spreadValues({ doNotRemoveInvalidChars: true }, options)
122981
122992
  );
122982
122993
  const newSeqObj = Object.assign(
122983
122994
  {},
@@ -122997,7 +123008,9 @@ ${latestSubscriptionCallbackError.current.stack}
122997
123008
  return acc;
122998
123009
  }, {})
122999
123010
  );
123000
- return tidyUpSequenceData(newSeqObj, options);
123011
+ return tidyUpSequenceData(newSeqObj, __spreadValues({
123012
+ doNotRemoveInvalidChars: true
123013
+ }, options));
123001
123014
  }
123002
123015
  __name(getReverseComplementSequenceAndAnnoations, "getReverseComplementSequenceAndAnnoations");
123003
123016
  function guessIfSequenceIsDnaAndNotProtein(seq, options = {}) {
@@ -123943,6 +123956,30 @@ ${latestSubscriptionCallbackError.current.stack}
123943
123956
  return parsingResultArray;
123944
123957
  }
123945
123958
  __name(flattenSequenceArray, "flattenSequenceArray");
123959
+ function parseFeatureLocation(locStr, isProtein2, inclusive1BasedStart, inclusive1BasedEnd) {
123960
+ locStr = locStr.trim();
123961
+ const locArr = [];
123962
+ locStr.replace(/(\d+)/g, function(string2, match2) {
123963
+ locArr.push(match2);
123964
+ });
123965
+ const locArray = [];
123966
+ for (let i2 = 0; i2 < locArr.length; i2 += 2) {
123967
+ const start2 = parseInt(locArr[i2], 10) - (inclusive1BasedStart ? 0 : 1);
123968
+ let end2 = parseInt(locArr[i2 + 1], 10) - (inclusive1BasedEnd ? 0 : 1);
123969
+ if (isNaN(end2)) {
123970
+ end2 = start2;
123971
+ }
123972
+ const location2 = {
123973
+ start: start2,
123974
+ end: end2
123975
+ };
123976
+ locArray.push(
123977
+ isProtein2 ? convertAACaretPositionOrRangeToDna(location2) : location2
123978
+ );
123979
+ }
123980
+ return locArray;
123981
+ }
123982
+ __name(parseFeatureLocation, "parseFeatureLocation");
123946
123983
  function genbankToJson(string2, options = {}) {
123947
123984
  const {
123948
123985
  inclusive1BasedStart,
@@ -124267,7 +124304,15 @@ ${latestSubscriptionCallbackError.current.stack}
124267
124304
  }
124268
124305
  if (isFeatureLineRunon(line, featureLocationIndentation)) {
124269
124306
  if (lastLineWasLocation) {
124270
- parseFeatureLocation(line.trim(), options);
124307
+ const feat = getCurrentFeature();
124308
+ feat.locations = feat.locations.concat(
124309
+ parseFeatureLocation(
124310
+ line.trim(),
124311
+ options.isProtein,
124312
+ inclusive1BasedStart,
124313
+ inclusive1BasedEnd
124314
+ )
124315
+ );
124271
124316
  lastLineWasLocation = true;
124272
124317
  } else {
124273
124318
  if (currentFeatureNote) {
@@ -124293,7 +124338,14 @@ ${latestSubscriptionCallbackError.current.stack}
124293
124338
  const feat = getCurrentFeature();
124294
124339
  feat.type = key2;
124295
124340
  feat.strand = strand;
124296
- parseFeatureLocation(val2, options);
124341
+ feat.locations = feat.locations.concat(
124342
+ parseFeatureLocation(
124343
+ val2,
124344
+ options.isProtein,
124345
+ inclusive1BasedStart,
124346
+ inclusive1BasedEnd
124347
+ )
124348
+ );
124297
124349
  lastLineWasLocation = true;
124298
124350
  }
124299
124351
  }
@@ -124316,29 +124368,6 @@ ${latestSubscriptionCallbackError.current.stack}
124316
124368
  return qual;
124317
124369
  }
124318
124370
  __name(isNote, "isNote");
124319
- function parseFeatureLocation(locStr, options2) {
124320
- locStr = locStr.trim();
124321
- const locArr = [];
124322
- locStr.replace(/(\d+)/g, function(string22, match2) {
124323
- locArr.push(match2);
124324
- });
124325
- for (let i2 = 0; i2 < locArr.length; i2 += 2) {
124326
- const start2 = parseInt(locArr[i2], 10) - (inclusive1BasedStart ? 0 : 1);
124327
- let end2 = parseInt(locArr[i2 + 1], 10) - (inclusive1BasedEnd ? 0 : 1);
124328
- if (isNaN(end2)) {
124329
- end2 = start2;
124330
- }
124331
- const location2 = {
124332
- start: start2,
124333
- end: end2
124334
- };
124335
- const feat = getCurrentFeature();
124336
- feat.locations.push(
124337
- options2.isProtein ? convertAACaretPositionOrRangeToDna(location2) : location2
124338
- );
124339
- }
124340
- }
124341
- __name(parseFeatureLocation, "parseFeatureLocation");
124342
124371
  function parseFeatureNote(line) {
124343
124372
  let newLine;
124344
124373
  newLine = line.trimLeft();
@@ -136592,7 +136621,9 @@ ${seq.sequence}
136592
136621
  if (track2.isUnmapped) {
136593
136622
  return track2;
136594
136623
  }
136595
- const sequenceData2 = tidyUpSequenceData(track2.sequenceData);
136624
+ const sequenceData2 = tidyUpSequenceData(track2.sequenceData, {
136625
+ doNotRemoveInvalidChars: true
136626
+ });
136596
136627
  const matchHighlightRanges = getRangeMatchesBetweenTemplateAndNonTemplate(
136597
136628
  alignmentTracks[0].alignmentData.sequence,
136598
136629
  track2.alignmentData.sequence
@@ -136652,7 +136683,9 @@ ${seq.sequence}
136652
136683
  const templateSeq = payloadToUse.pairwiseAlignments[0][0];
136653
136684
  const pairwiseOverviewAlignmentTracks = [
136654
136685
  __spreadProps(__spreadValues({}, templateSeq), {
136655
- sequenceData: tidyUpSequenceData(templateSeq.sequenceData),
136686
+ sequenceData: tidyUpSequenceData(templateSeq.sequenceData, {
136687
+ doNotRemoveInvalidChars: true
136688
+ }),
136656
136689
  alignmentData: { sequence: templateSeq.sequenceData.sequence }
136657
136690
  //remove the gaps from the template sequence
136658
136691
  })
@@ -136681,7 +136714,9 @@ ${seq.sequence}
136681
136714
  }));
136682
136715
  }
136683
136716
  const alignedSeqMinusInserts = __spreadProps(__spreadValues({}, alignedSeq), {
136684
- sequenceData: __spreadProps(__spreadValues({}, tidyUpSequenceData(alignedSeq.sequenceData)), {
136717
+ sequenceData: __spreadProps(__spreadValues({}, tidyUpSequenceData(alignedSeq.sequenceData, {
136718
+ doNotRemoveInvalidChars: true
136719
+ })), {
136685
136720
  sequence: template.sequenceData.sequence
136686
136721
  }),
136687
136722
  additionalSelectionLayers,
@@ -140039,7 +140074,7 @@ ${seq.sequence}
140039
140074
  }
140040
140075
  const promiseOrVal = (!readOnly2 || alwaysAllowSave || opts2.isSaveAs) && saveHandler && saveHandler(
140041
140076
  opts2,
140042
- tidyUpSequenceData(sequenceData2, { annotationsAsObjects: true }),
140077
+ tidyUpSequenceData(sequenceData2, { doNotRemoveInvalidChars: true, annotationsAsObjects: true }),
140043
140078
  props,
140044
140079
  updateLastSavedIdToCurrent
140045
140080
  );
@@ -140639,7 +140674,7 @@ ${seq.sequence}
140639
140674
  return JSON.stringify(
140640
140675
  lodashExports.omit(
140641
140676
  cleanUpTeselagenJsonForExport(
140642
- tidyUpSequenceData(incomingJson, { annotationsAsObjects: false })
140677
+ tidyUpSequenceData(incomingJson, { doNotRemoveInvalidChars: true, annotationsAsObjects: false })
140643
140678
  ),
140644
140679
  [
140645
140680
  "sequenceFragments",
@@ -155101,7 +155136,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155101
155136
  }
155102
155137
  __name(showFileDialog, "showFileDialog");
155103
155138
  const name = "@teselagen/ove";
155104
- const version = "0.3.49";
155139
+ const version = "0.3.50";
155105
155140
  const main = "./src/index.js";
155106
155141
  const exports$1 = {
155107
155142
  ".": {
@@ -158231,7 +158266,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
158231
158266
  }
158232
158267
  }
158233
158268
  ),
158234
- { annotationsAsObjects: true }
158269
+ { doNotRemoveInvalidChars: true, annotationsAsObjects: true }
158235
158270
  );
158236
158271
  if (!(this.sequenceDataToCopy || {}).textToCopy && !seqData.sequence.length)
158237
158272
  return window.toastr.warning(
@@ -158247,7 +158282,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
158247
158282
  this.handleDnaDelete(false);
158248
158283
  onCut(
158249
158284
  e2,
158250
- tidyUpSequenceData(seqData, { annotationsAsObjects: true }),
158285
+ tidyUpSequenceData(seqData, { doNotRemoveInvalidChars: true, annotationsAsObjects: true }),
158251
158286
  this.props
158252
158287
  );
158253
158288
  document.body.removeEventListener("cut", this.handleCut);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.3.50",
3
+ "version": "0.3.51",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -13,12 +13,12 @@
13
13
  "node": "16.20.2"
14
14
  },
15
15
  "dependencies": {
16
- "@teselagen/sequence-utils": "0.3.11",
16
+ "@teselagen/sequence-utils": "0.3.12",
17
17
  "@teselagen/range-utils": "0.3.7",
18
18
  "@teselagen/ui": "0.3.38",
19
19
  "@teselagen/file-utils": "0.3.9",
20
20
  "@teselagen/bounce-loader": "0.3.11",
21
- "@teselagen/bio-parsers": "0.4.3",
21
+ "@teselagen/bio-parsers": "0.4.5",
22
22
  "@blueprintjs/core": "3.52.0",
23
23
  "@blueprintjs/datetime": "3.23.19",
24
24
  "@blueprintjs/icons": "3.33.0",
@@ -79,7 +79,9 @@ function addHighlightedDifferences(alignmentTracks) {
79
79
  if (track.isUnmapped) {
80
80
  return track;
81
81
  }
82
- const sequenceData = tidyUpSequenceData(track.sequenceData);
82
+ const sequenceData = tidyUpSequenceData(track.sequenceData, {
83
+ doNotRemoveInvalidChars: true
84
+ });
83
85
  const matchHighlightRanges = getRangeMatchesBetweenTemplateAndNonTemplate(
84
86
  alignmentTracks[0].alignmentData.sequence,
85
87
  track.alignmentData.sequence
@@ -179,7 +181,9 @@ export default (state = {}, { payload = {}, type }) => {
179
181
  {
180
182
  //add the template seq as the first track in the Pairwise Alignment Overview
181
183
  ...templateSeq,
182
- sequenceData: tidyUpSequenceData(templateSeq.sequenceData),
184
+ sequenceData: tidyUpSequenceData(templateSeq.sequenceData, {
185
+ doNotRemoveInvalidChars: true
186
+ }),
183
187
  alignmentData: { sequence: templateSeq.sequenceData.sequence } //remove the gaps from the template sequence
184
188
  }
185
189
  ]; // start with just the template seq in there!
@@ -213,7 +217,9 @@ export default (state = {}, { payload = {}, type }) => {
213
217
  const alignedSeqMinusInserts = {
214
218
  ...alignedSeq,
215
219
  sequenceData: {
216
- ...tidyUpSequenceData(alignedSeq.sequenceData),
220
+ ...tidyUpSequenceData(alignedSeq.sequenceData, {
221
+ doNotRemoveInvalidChars: true
222
+ }),
217
223
  sequence: template.sequenceData.sequence
218
224
  },
219
225
  additionalSelectionLayers,
@@ -283,7 +283,7 @@ function VectorInteractionHOC(Component /* options */) {
283
283
  }
284
284
  }
285
285
  ),
286
- { annotationsAsObjects: true }
286
+ { doNotRemoveInvalidChars: true, annotationsAsObjects: true }
287
287
  );
288
288
 
289
289
  if (
@@ -314,7 +314,7 @@ function VectorInteractionHOC(Component /* options */) {
314
314
  this.handleDnaDelete(false);
315
315
  onCut(
316
316
  e,
317
- tidyUpSequenceData(seqData, { annotationsAsObjects: true }),
317
+ tidyUpSequenceData(seqData, { doNotRemoveInvalidChars: true,annotationsAsObjects: true }),
318
318
  this.props
319
319
  );
320
320
  document.body.removeEventListener("cut", this.handleCut);
@@ -160,7 +160,7 @@ export const handleSave =
160
160
  saveHandler &&
161
161
  saveHandler(
162
162
  opts,
163
- tidyUpSequenceData(sequenceData, { annotationsAsObjects: true }),
163
+ tidyUpSequenceData(sequenceData, { doNotRemoveInvalidChars: true,annotationsAsObjects: true }),
164
164
  props,
165
165
  updateLastSavedIdToCurrent
166
166
  );
@@ -869,7 +869,7 @@ function jsonToJson(incomingJson) {
869
869
  return JSON.stringify(
870
870
  omit(
871
871
  cleanUpTeselagenJsonForExport(
872
- tidyUpSequenceData(incomingJson, { annotationsAsObjects: false })
872
+ tidyUpSequenceData(incomingJson, { doNotRemoveInvalidChars: true,annotationsAsObjects: false })
873
873
  ),
874
874
  [
875
875
  "sequenceFragments",