@teselagen/ove 0.5.13 → 0.5.14
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.cjs.js +217 -133
- package/index.es.js +217 -133
- package/index.umd.js +175 -117
- package/package.json +2 -2
- package/src/RowItem/Translations/AASliver.js +12 -11
- package/src/RowItem/Translations/Translation.js +41 -9
package/index.cjs.js
CHANGED
|
@@ -14471,10 +14471,10 @@ var _objectKeysInternal = /* @__PURE__ */ __name(function(object3, names2) {
|
|
|
14471
14471
|
return result;
|
|
14472
14472
|
}, "_objectKeysInternal");
|
|
14473
14473
|
var _enumBugKeys = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
|
|
14474
|
-
var $keys$
|
|
14474
|
+
var $keys$2 = _objectKeysInternal;
|
|
14475
14475
|
var enumBugKeys$1 = _enumBugKeys;
|
|
14476
14476
|
var _objectKeys = Object.keys || /* @__PURE__ */ __name(function keys(O2) {
|
|
14477
|
-
return $keys$
|
|
14477
|
+
return $keys$2(O2, enumBugKeys$1);
|
|
14478
14478
|
}, "keys");
|
|
14479
14479
|
var _objectGops = {};
|
|
14480
14480
|
_objectGops.f = Object.getOwnPropertySymbols;
|
|
@@ -14907,11 +14907,11 @@ var ArrayProto = Array.prototype;
|
|
|
14907
14907
|
var _isArrayIter = /* @__PURE__ */ __name(function(it) {
|
|
14908
14908
|
return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
14909
14909
|
}, "_isArrayIter");
|
|
14910
|
-
var $defineProperty$
|
|
14910
|
+
var $defineProperty$3 = require_objectDp();
|
|
14911
14911
|
var createDesc$2 = _propertyDesc;
|
|
14912
14912
|
var _createProperty = /* @__PURE__ */ __name(function(object3, index2, value) {
|
|
14913
14913
|
if (index2 in object3)
|
|
14914
|
-
$defineProperty$
|
|
14914
|
+
$defineProperty$3.f(object3, index2, createDesc$2(0, value));
|
|
14915
14915
|
else
|
|
14916
14916
|
object3[index2] = value;
|
|
14917
14917
|
}, "_createProperty");
|
|
@@ -15159,13 +15159,21 @@ var _isArray = Array.isArray || /* @__PURE__ */ __name(function isArray(arg) {
|
|
|
15159
15159
|
}, "isArray");
|
|
15160
15160
|
var _objectGopnExt = {};
|
|
15161
15161
|
var _objectGopn = {};
|
|
15162
|
-
var
|
|
15163
|
-
|
|
15164
|
-
|
|
15165
|
-
|
|
15166
|
-
|
|
15162
|
+
var hasRequired_objectGopn;
|
|
15163
|
+
function require_objectGopn() {
|
|
15164
|
+
if (hasRequired_objectGopn)
|
|
15165
|
+
return _objectGopn;
|
|
15166
|
+
hasRequired_objectGopn = 1;
|
|
15167
|
+
var $keys2 = _objectKeysInternal;
|
|
15168
|
+
var hiddenKeys = _enumBugKeys.concat("length", "prototype");
|
|
15169
|
+
_objectGopn.f = Object.getOwnPropertyNames || /* @__PURE__ */ __name(function getOwnPropertyNames4(O2) {
|
|
15170
|
+
return $keys2(O2, hiddenKeys);
|
|
15171
|
+
}, "getOwnPropertyNames");
|
|
15172
|
+
return _objectGopn;
|
|
15173
|
+
}
|
|
15174
|
+
__name(require_objectGopn, "require_objectGopn");
|
|
15167
15175
|
var toIObject$2 = _toIobject;
|
|
15168
|
-
var gOPN$1 =
|
|
15176
|
+
var gOPN$1 = require_objectGopn().f;
|
|
15169
15177
|
var toString$4 = {}.toString;
|
|
15170
15178
|
var windowNames = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
|
|
15171
15179
|
var getWindowNames = /* @__PURE__ */ __name(function(it) {
|
|
@@ -15175,7 +15183,7 @@ var getWindowNames = /* @__PURE__ */ __name(function(it) {
|
|
|
15175
15183
|
return windowNames.slice();
|
|
15176
15184
|
}
|
|
15177
15185
|
}, "getWindowNames");
|
|
15178
|
-
_objectGopnExt.f = /* @__PURE__ */ __name(function
|
|
15186
|
+
_objectGopnExt.f = /* @__PURE__ */ __name(function getOwnPropertyNames(it) {
|
|
15179
15187
|
return windowNames && toString$4.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
|
|
15180
15188
|
}, "getOwnPropertyNames");
|
|
15181
15189
|
var _objectGopd = {};
|
|
@@ -15265,9 +15273,9 @@ var isSymbol$7 = USE_NATIVE && typeof $Symbol.iterator == "symbol" ? function(it
|
|
|
15265
15273
|
} : function(it) {
|
|
15266
15274
|
return it instanceof $Symbol;
|
|
15267
15275
|
};
|
|
15268
|
-
var $defineProperty$
|
|
15276
|
+
var $defineProperty$2 = /* @__PURE__ */ __name(function defineProperty3(it, key, D2) {
|
|
15269
15277
|
if (it === ObjectProto)
|
|
15270
|
-
$defineProperty$
|
|
15278
|
+
$defineProperty$2(OPSymbols, key, D2);
|
|
15271
15279
|
anObject(it);
|
|
15272
15280
|
key = toPrimitive(key, true);
|
|
15273
15281
|
anObject(D2);
|
|
@@ -15292,7 +15300,7 @@ var $defineProperties = /* @__PURE__ */ __name(function defineProperties2(it, P2
|
|
|
15292
15300
|
var l2 = keys5.length;
|
|
15293
15301
|
var key;
|
|
15294
15302
|
while (l2 > i)
|
|
15295
|
-
$defineProperty$
|
|
15303
|
+
$defineProperty$2(it, key = keys5[i++], P2[key]);
|
|
15296
15304
|
return it;
|
|
15297
15305
|
}, "defineProperties");
|
|
15298
15306
|
var $create = /* @__PURE__ */ __name(function create2(it, P2) {
|
|
@@ -15314,7 +15322,7 @@ var $getOwnPropertyDescriptor = /* @__PURE__ */ __name(function getOwnPropertyDe
|
|
|
15314
15322
|
D2.enumerable = true;
|
|
15315
15323
|
return D2;
|
|
15316
15324
|
}, "getOwnPropertyDescriptor");
|
|
15317
|
-
var $getOwnPropertyNames = /* @__PURE__ */ __name(function
|
|
15325
|
+
var $getOwnPropertyNames = /* @__PURE__ */ __name(function getOwnPropertyNames2(it) {
|
|
15318
15326
|
var names2 = gOPN(toIObject(it));
|
|
15319
15327
|
var result = [];
|
|
15320
15328
|
var i = 0;
|
|
@@ -15357,8 +15365,8 @@ if (!USE_NATIVE) {
|
|
|
15357
15365
|
return this._k;
|
|
15358
15366
|
}, "toString"));
|
|
15359
15367
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
15360
|
-
$DP.f = $defineProperty$
|
|
15361
|
-
|
|
15368
|
+
$DP.f = $defineProperty$2;
|
|
15369
|
+
require_objectGopn().f = gOPNExt.f = $getOwnPropertyNames;
|
|
15362
15370
|
require_objectPie().f = $propertyIsEnumerable;
|
|
15363
15371
|
$GOPS.f = $getOwnPropertySymbols;
|
|
15364
15372
|
if (DESCRIPTORS && !_library) {
|
|
@@ -15400,7 +15408,7 @@ $export$2($export$2.S + $export$2.F * !USE_NATIVE, "Object", {
|
|
|
15400
15408
|
// 19.1.2.2 Object.create(O [, Properties])
|
|
15401
15409
|
create: $create,
|
|
15402
15410
|
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
|
|
15403
|
-
defineProperty: $defineProperty$
|
|
15411
|
+
defineProperty: $defineProperty$2,
|
|
15404
15412
|
// 19.1.2.3 Object.defineProperties(O, Properties)
|
|
15405
15413
|
defineProperties: $defineProperties,
|
|
15406
15414
|
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
|
|
@@ -37285,16 +37293,25 @@ var getIntrinsic = /* @__PURE__ */ __name(function GetIntrinsic(name2, allowMiss
|
|
|
37285
37293
|
return value;
|
|
37286
37294
|
}, "GetIntrinsic");
|
|
37287
37295
|
var callBind$3 = { exports: {} };
|
|
37288
|
-
var
|
|
37289
|
-
var
|
|
37290
|
-
|
|
37291
|
-
|
|
37292
|
-
|
|
37293
|
-
|
|
37294
|
-
|
|
37296
|
+
var esDefineProperty;
|
|
37297
|
+
var hasRequiredEsDefineProperty;
|
|
37298
|
+
function requireEsDefineProperty() {
|
|
37299
|
+
if (hasRequiredEsDefineProperty)
|
|
37300
|
+
return esDefineProperty;
|
|
37301
|
+
hasRequiredEsDefineProperty = 1;
|
|
37302
|
+
var GetIntrinsic3 = getIntrinsic;
|
|
37303
|
+
var $defineProperty2 = GetIntrinsic3("%Object.defineProperty%", true) || false;
|
|
37304
|
+
if ($defineProperty2) {
|
|
37305
|
+
try {
|
|
37306
|
+
$defineProperty2({}, "a", { value: 1 });
|
|
37307
|
+
} catch (e2) {
|
|
37308
|
+
$defineProperty2 = false;
|
|
37309
|
+
}
|
|
37295
37310
|
}
|
|
37311
|
+
esDefineProperty = $defineProperty2;
|
|
37312
|
+
return esDefineProperty;
|
|
37296
37313
|
}
|
|
37297
|
-
|
|
37314
|
+
__name(requireEsDefineProperty, "requireEsDefineProperty");
|
|
37298
37315
|
var GetIntrinsic$3 = getIntrinsic;
|
|
37299
37316
|
var $gOPD$1 = GetIntrinsic$3("%Object.getOwnPropertyDescriptor%", true);
|
|
37300
37317
|
if ($gOPD$1) {
|
|
@@ -37305,7 +37322,7 @@ if ($gOPD$1) {
|
|
|
37305
37322
|
}
|
|
37306
37323
|
}
|
|
37307
37324
|
var gopd$1 = $gOPD$1;
|
|
37308
|
-
var $defineProperty$1 =
|
|
37325
|
+
var $defineProperty$1 = requireEsDefineProperty();
|
|
37309
37326
|
var $SyntaxError = syntax;
|
|
37310
37327
|
var $TypeError$4 = type$1;
|
|
37311
37328
|
var gopd = gopd$1;
|
|
@@ -37346,7 +37363,7 @@ var defineDataProperty$1 = /* @__PURE__ */ __name(function defineDataProperty(ob
|
|
|
37346
37363
|
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
37347
37364
|
}
|
|
37348
37365
|
}, "defineDataProperty");
|
|
37349
|
-
var $defineProperty =
|
|
37366
|
+
var $defineProperty = requireEsDefineProperty();
|
|
37350
37367
|
var hasPropertyDescriptors = /* @__PURE__ */ __name(function hasPropertyDescriptors2() {
|
|
37351
37368
|
return !!$defineProperty;
|
|
37352
37369
|
}, "hasPropertyDescriptors");
|
|
@@ -37415,7 +37432,7 @@ var setFunctionLength = /* @__PURE__ */ __name(function setFunctionLength2(fn4,
|
|
|
37415
37432
|
var $apply = GetIntrinsic3("%Function.prototype.apply%");
|
|
37416
37433
|
var $call = GetIntrinsic3("%Function.prototype.call%");
|
|
37417
37434
|
var $reflectApply = GetIntrinsic3("%Reflect.apply%", true) || bind3.call($call, $apply);
|
|
37418
|
-
var $defineProperty2 =
|
|
37435
|
+
var $defineProperty2 = requireEsDefineProperty();
|
|
37419
37436
|
var $max = GetIntrinsic3("%Math.max%");
|
|
37420
37437
|
module2.exports = /* @__PURE__ */ __name(function callBind2(originalFunction) {
|
|
37421
37438
|
if (typeof originalFunction !== "function") {
|
|
@@ -49882,7 +49899,7 @@ var KNOWN_STATICS = {
|
|
|
49882
49899
|
arity: true
|
|
49883
49900
|
};
|
|
49884
49901
|
var defineProperty$3 = Object.defineProperty;
|
|
49885
|
-
var
|
|
49902
|
+
var getOwnPropertyNames3 = Object.getOwnPropertyNames;
|
|
49886
49903
|
var getOwnPropertySymbols3 = Object.getOwnPropertySymbols;
|
|
49887
49904
|
var getOwnPropertyDescriptor3 = Object.getOwnPropertyDescriptor;
|
|
49888
49905
|
var getPrototypeOf = Object.getPrototypeOf;
|
|
@@ -49895,7 +49912,7 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
|
49895
49912
|
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
49896
49913
|
}
|
|
49897
49914
|
}
|
|
49898
|
-
var keys5 =
|
|
49915
|
+
var keys5 = getOwnPropertyNames3(sourceComponent);
|
|
49899
49916
|
if (getOwnPropertySymbols3) {
|
|
49900
49917
|
keys5 = keys5.concat(getOwnPropertySymbols3(sourceComponent));
|
|
49901
49918
|
}
|
|
@@ -78892,123 +78909,167 @@ function getAminoAcidFromSequenceTriplet(sequenceString) {
|
|
|
78892
78909
|
return proteinAlphabet[letter.toUpperCase()];
|
|
78893
78910
|
}
|
|
78894
78911
|
__name(getAminoAcidFromSequenceTriplet, "getAminoAcidFromSequenceTriplet");
|
|
78895
|
-
function
|
|
78912
|
+
function getNextTriplet(index2, sequenceString, exonRange) {
|
|
78913
|
+
let triplet = "";
|
|
78914
|
+
let internalIndex;
|
|
78915
|
+
const codonPositions = [];
|
|
78916
|
+
const isBaseInExon = /* @__PURE__ */ __name((baseIndex) => exonRange.some(
|
|
78917
|
+
(r2) => isPositionWithinRange(baseIndex, r2, sequenceString.length, true, false)
|
|
78918
|
+
), "isBaseInExon");
|
|
78919
|
+
for (internalIndex = index2; internalIndex < sequenceString.length; internalIndex++) {
|
|
78920
|
+
if (triplet.length === 3) {
|
|
78921
|
+
break;
|
|
78922
|
+
}
|
|
78923
|
+
if (isBaseInExon(internalIndex)) {
|
|
78924
|
+
triplet += sequenceString[internalIndex];
|
|
78925
|
+
codonPositions.push(internalIndex);
|
|
78926
|
+
}
|
|
78927
|
+
}
|
|
78928
|
+
return { triplet, basesRead: internalIndex - index2, codonPositions };
|
|
78929
|
+
}
|
|
78930
|
+
__name(getNextTriplet, "getNextTriplet");
|
|
78931
|
+
function getTranslatedSequenceProperties(originalSequenceString, forward, optionalSubrangeRange, isProteinSequence) {
|
|
78896
78932
|
const originalSequenceStringLength = isProteinSequence ? originalSequenceString.length * 3 : originalSequenceString.length;
|
|
78897
78933
|
let sequenceString = originalSequenceString;
|
|
78898
|
-
|
|
78934
|
+
const translationRange = { start: 0, end: originalSequenceStringLength - 1 };
|
|
78899
78935
|
if (optionalSubrangeRange) {
|
|
78900
78936
|
sequenceString = getSequenceWithinRange(
|
|
78901
78937
|
optionalSubrangeRange,
|
|
78902
78938
|
originalSequenceString
|
|
78903
78939
|
);
|
|
78904
|
-
|
|
78940
|
+
translationRange.start = optionalSubrangeRange.start;
|
|
78941
|
+
translationRange.end = optionalSubrangeRange.end;
|
|
78905
78942
|
}
|
|
78906
78943
|
const sequenceStringLength = isProteinSequence ? sequenceString.length * 3 : sequenceString.length;
|
|
78907
|
-
|
|
78908
|
-
|
|
78909
|
-
|
|
78910
|
-
|
|
78911
|
-
|
|
78912
|
-
|
|
78913
|
-
|
|
78914
|
-
|
|
78915
|
-
{
|
|
78916
|
-
start: 0,
|
|
78917
|
-
end: revCompGapLength - 1
|
|
78918
|
-
},
|
|
78919
|
-
startOffset,
|
|
78944
|
+
if (!isProteinSequence && !forward) {
|
|
78945
|
+
sequenceString = getReverseComplementSequenceString(sequenceString);
|
|
78946
|
+
}
|
|
78947
|
+
const absoluteExonRange = !isProteinSequence && optionalSubrangeRange && optionalSubrangeRange.locations ? optionalSubrangeRange.locations : [translationRange];
|
|
78948
|
+
const exonRange = absoluteExonRange.map((range2) => {
|
|
78949
|
+
let outputRange = translateRange(
|
|
78950
|
+
range2,
|
|
78951
|
+
-translationRange.start,
|
|
78920
78952
|
originalSequenceStringLength
|
|
78921
78953
|
);
|
|
78922
|
-
if (
|
|
78923
|
-
|
|
78924
|
-
|
|
78925
|
-
|
|
78926
|
-
|
|
78927
|
-
|
|
78928
|
-
aminoAcidIndex,
|
|
78929
|
-
sequenceIndex: codonRange.start + i,
|
|
78930
|
-
codonRange,
|
|
78931
|
-
fullCodon: false
|
|
78932
|
-
});
|
|
78933
|
-
}
|
|
78934
|
-
aminoAcidIndex--;
|
|
78954
|
+
if (!forward) {
|
|
78955
|
+
outputRange = flipRelativeRange(
|
|
78956
|
+
outputRange,
|
|
78957
|
+
{ start: 0, end: sequenceStringLength - 1 },
|
|
78958
|
+
sequenceStringLength
|
|
78959
|
+
);
|
|
78935
78960
|
}
|
|
78961
|
+
return outputRange;
|
|
78962
|
+
});
|
|
78963
|
+
return {
|
|
78964
|
+
sequenceString,
|
|
78965
|
+
translationRange,
|
|
78966
|
+
sequenceStringLength,
|
|
78967
|
+
originalSequenceStringLength,
|
|
78968
|
+
exonRange
|
|
78969
|
+
};
|
|
78970
|
+
}
|
|
78971
|
+
__name(getTranslatedSequenceProperties, "getTranslatedSequenceProperties");
|
|
78972
|
+
function positionInCdsToPositionInMainSequence(index2, forward, translationRange, mainSequenceLength) {
|
|
78973
|
+
let outputRange = translateRange(
|
|
78974
|
+
{ start: index2, end: index2 },
|
|
78975
|
+
translationRange.start,
|
|
78976
|
+
mainSequenceLength
|
|
78977
|
+
);
|
|
78978
|
+
if (!forward) {
|
|
78979
|
+
outputRange = flipRelativeRange(
|
|
78980
|
+
outputRange,
|
|
78981
|
+
translationRange,
|
|
78982
|
+
mainSequenceLength
|
|
78983
|
+
);
|
|
78936
78984
|
}
|
|
78937
|
-
|
|
78985
|
+
return outputRange.start;
|
|
78986
|
+
}
|
|
78987
|
+
__name(positionInCdsToPositionInMainSequence, "positionInCdsToPositionInMainSequence");
|
|
78988
|
+
function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optionalSubrangeRange, isProteinSequence) {
|
|
78989
|
+
const {
|
|
78990
|
+
sequenceString,
|
|
78991
|
+
translationRange,
|
|
78992
|
+
sequenceStringLength,
|
|
78993
|
+
originalSequenceStringLength,
|
|
78994
|
+
exonRange
|
|
78995
|
+
} = getTranslatedSequenceProperties(
|
|
78996
|
+
originalSequenceString,
|
|
78997
|
+
forward,
|
|
78998
|
+
optionalSubrangeRange,
|
|
78999
|
+
isProteinSequence
|
|
79000
|
+
);
|
|
79001
|
+
const aminoAcidDataForEachBaseOfDNA = [];
|
|
79002
|
+
for (let index2 = 0; index2 < sequenceStringLength; index2 += 3) {
|
|
78938
79003
|
let aminoAcid;
|
|
79004
|
+
const aminoAcidIndex = index2 / 3;
|
|
79005
|
+
let codonPositionsInCDS;
|
|
79006
|
+
let basesRead;
|
|
78939
79007
|
if (isProteinSequence) {
|
|
78940
|
-
|
|
79008
|
+
codonPositionsInCDS = [0, 1, 2].map((i) => index2 + i);
|
|
79009
|
+
basesRead = 3;
|
|
79010
|
+
aminoAcid = proteinAlphabet[sequenceString[index2 / 3].toUpperCase()];
|
|
78941
79011
|
} else {
|
|
78942
|
-
|
|
78943
|
-
|
|
78944
|
-
|
|
78945
|
-
|
|
78946
|
-
|
|
78947
|
-
|
|
78948
|
-
|
|
78949
|
-
|
|
78950
|
-
|
|
78951
|
-
|
|
78952
|
-
|
|
78953
|
-
|
|
78954
|
-
|
|
79012
|
+
const {
|
|
79013
|
+
triplet,
|
|
79014
|
+
basesRead: _basesRead,
|
|
79015
|
+
codonPositions
|
|
79016
|
+
} = getNextTriplet(index2, sequenceString, exonRange);
|
|
79017
|
+
basesRead = _basesRead;
|
|
79018
|
+
codonPositionsInCDS = codonPositions;
|
|
79019
|
+
aminoAcid = triplet.length === 3 ? getAminoAcidFromSequenceTriplet(triplet) : getAminoAcidFromSequenceTriplet("xxx");
|
|
79020
|
+
}
|
|
79021
|
+
const absoluteCodonPositions = codonPositionsInCDS.map(
|
|
79022
|
+
(i) => positionInCdsToPositionInMainSequence(
|
|
79023
|
+
i,
|
|
79024
|
+
forward,
|
|
79025
|
+
translationRange,
|
|
79026
|
+
originalSequenceStringLength
|
|
79027
|
+
)
|
|
78955
79028
|
);
|
|
78956
|
-
|
|
78957
|
-
|
|
78958
|
-
|
|
78959
|
-
|
|
78960
|
-
|
|
78961
|
-
|
|
78962
|
-
|
|
78963
|
-
|
|
78964
|
-
|
|
78965
|
-
|
|
78966
|
-
|
|
78967
|
-
|
|
78968
|
-
|
|
78969
|
-
|
|
78970
|
-
|
|
78971
|
-
|
|
78972
|
-
|
|
78973
|
-
|
|
78974
|
-
|
|
78975
|
-
|
|
78976
|
-
|
|
78977
|
-
|
|
78978
|
-
|
|
78979
|
-
|
|
78980
|
-
|
|
78981
|
-
|
|
78982
|
-
|
|
78983
|
-
|
|
78984
|
-
|
|
78985
|
-
|
|
78986
|
-
|
|
79029
|
+
const codonRange = forward ? {
|
|
79030
|
+
start: absoluteCodonPositions[0],
|
|
79031
|
+
end: absoluteCodonPositions[codonPositionsInCDS.length - 1]
|
|
79032
|
+
} : {
|
|
79033
|
+
start: absoluteCodonPositions[codonPositionsInCDS.length - 1],
|
|
79034
|
+
end: absoluteCodonPositions[0]
|
|
79035
|
+
};
|
|
79036
|
+
let positionInCodon = 0;
|
|
79037
|
+
for (let i = 0; i < basesRead; i++) {
|
|
79038
|
+
const posInCds = i + index2;
|
|
79039
|
+
if (codonPositionsInCDS.includes(posInCds)) {
|
|
79040
|
+
aminoAcidDataForEachBaseOfDNA.push({
|
|
79041
|
+
aminoAcid,
|
|
79042
|
+
positionInCodon,
|
|
79043
|
+
aminoAcidIndex,
|
|
79044
|
+
sequenceIndex: absoluteCodonPositions[i],
|
|
79045
|
+
codonRange,
|
|
79046
|
+
fullCodon: codonPositionsInCDS.length === 3
|
|
79047
|
+
});
|
|
79048
|
+
positionInCodon++;
|
|
79049
|
+
} else {
|
|
79050
|
+
aminoAcidDataForEachBaseOfDNA.push({
|
|
79051
|
+
aminoAcid: null,
|
|
79052
|
+
positionInCodon: null,
|
|
79053
|
+
aminoAcidIndex: null,
|
|
79054
|
+
sequenceIndex: positionInCdsToPositionInMainSequence(
|
|
79055
|
+
posInCds,
|
|
79056
|
+
forward,
|
|
79057
|
+
translationRange,
|
|
79058
|
+
originalSequenceStringLength
|
|
79059
|
+
),
|
|
79060
|
+
codonRange: null,
|
|
79061
|
+
fullCodon: null
|
|
79062
|
+
});
|
|
79063
|
+
}
|
|
78987
79064
|
}
|
|
78988
|
-
|
|
78989
|
-
const lengthOfEndBpsNotCoveredByAminoAcids = sequenceStringLength - aminoAcidDataForEachBaseOfDNA.length;
|
|
78990
|
-
codonRange = translateRange(
|
|
78991
|
-
{
|
|
78992
|
-
start: sequenceStringLength - lengthOfEndBpsNotCoveredByAminoAcids,
|
|
78993
|
-
end: sequenceStringLength - 1
|
|
78994
|
-
},
|
|
78995
|
-
startOffset,
|
|
78996
|
-
originalSequenceStringLength
|
|
78997
|
-
);
|
|
78998
|
-
for (let j = 0; j < lengthOfEndBpsNotCoveredByAminoAcids; j++) {
|
|
78999
|
-
aminoAcidDataForEachBaseOfDNA.push({
|
|
79000
|
-
aminoAcid: getAminoAcidFromSequenceTriplet("xxx"),
|
|
79001
|
-
//fake xxx triplet returns the gap amino acid
|
|
79002
|
-
positionInCodon: j,
|
|
79003
|
-
aminoAcidIndex,
|
|
79004
|
-
sequenceIndex: codonRange.start + j,
|
|
79005
|
-
fullCodon: false,
|
|
79006
|
-
codonRange
|
|
79007
|
-
});
|
|
79065
|
+
index2 += basesRead - codonPositionsInCDS.length;
|
|
79008
79066
|
}
|
|
79009
79067
|
if (sequenceStringLength !== aminoAcidDataForEachBaseOfDNA.length) {
|
|
79010
79068
|
throw new Error("something went wrong!");
|
|
79011
79069
|
}
|
|
79070
|
+
if (!forward) {
|
|
79071
|
+
aminoAcidDataForEachBaseOfDNA.reverse();
|
|
79072
|
+
}
|
|
79012
79073
|
return aminoAcidDataForEachBaseOfDNA;
|
|
79013
79074
|
}
|
|
79014
79075
|
__name(getAminoAcidDataForEachBaseOfDna, "getAminoAcidDataForEachBaseOfDna");
|
|
@@ -118622,7 +118683,7 @@ function AASliver(props) {
|
|
|
118622
118683
|
fill: color2 || "gray"
|
|
118623
118684
|
}
|
|
118624
118685
|
)),
|
|
118625
|
-
!isFiller && /* @__PURE__ */ React$2.createElement(
|
|
118686
|
+
(!isFiller || isTruncatedEnd && isTruncatedStart) && /* @__PURE__ */ React$2.createElement(
|
|
118626
118687
|
"text",
|
|
118627
118688
|
{
|
|
118628
118689
|
fontSize: 25,
|
|
@@ -118699,18 +118760,39 @@ const _Translation = class _Translation extends React$2.Component {
|
|
|
118699
118760
|
subrangeStartRelativeToAnnotationStart,
|
|
118700
118761
|
aminoAcids
|
|
118701
118762
|
);
|
|
118763
|
+
let prevAaSliver;
|
|
118764
|
+
let nextAaSliver = aminoAcidsForSubrange[1];
|
|
118765
|
+
const lastIndex = aminoAcidsForSubrange.length - 1;
|
|
118702
118766
|
const translationSVG = aminoAcidsForSubrange.map(
|
|
118703
118767
|
function(aminoAcidSliver, index2) {
|
|
118704
|
-
|
|
118705
|
-
|
|
118706
|
-
|
|
118768
|
+
if (aminoAcidSliver.positionInCodon === null) {
|
|
118769
|
+
prevAaSliver = aminoAcidSliver;
|
|
118770
|
+
nextAaSliver = aminoAcidsForSubrange[index2 + 2];
|
|
118771
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
118772
|
+
"rect",
|
|
118773
|
+
{
|
|
118774
|
+
x: index2 * charWidth2,
|
|
118775
|
+
y: height2 / 2 - height2 / 16,
|
|
118776
|
+
width: charWidth2,
|
|
118777
|
+
height: height2 / 8,
|
|
118778
|
+
fill: "grey",
|
|
118779
|
+
stroke: "black",
|
|
118780
|
+
strokeWidth: 1
|
|
118781
|
+
}
|
|
118782
|
+
);
|
|
118783
|
+
}
|
|
118784
|
+
const isEndFiller = (index2 === 0 || (prevAaSliver == null ? void 0 : prevAaSliver.positionInCodon) === null) && aminoAcidSliver.positionInCodon === (annotation.forward ? 2 : 0);
|
|
118785
|
+
const isStartFiller = (index2 === lastIndex || (nextAaSliver == null ? void 0 : nextAaSliver.positionInCodon) === null) && aminoAcidSliver.positionInCodon === (annotation.forward ? 0 : 2);
|
|
118786
|
+
let isTruncatedEnd = (index2 === 0 || (prevAaSliver == null ? void 0 : prevAaSliver.positionInCodon) === null) && aminoAcidSliver.positionInCodon === 1;
|
|
118787
|
+
let isTruncatedStart = (index2 === lastIndex || (nextAaSliver == null ? void 0 : nextAaSliver.positionInCodon) === null) && aminoAcidSliver.positionInCodon === 1;
|
|
118707
118788
|
if (!annotation.forward) {
|
|
118708
118789
|
const holder = isTruncatedEnd;
|
|
118709
118790
|
isTruncatedEnd = isTruncatedStart;
|
|
118710
118791
|
isTruncatedStart = holder;
|
|
118711
118792
|
}
|
|
118712
|
-
const isStartFiller = index2 === aminoAcidsForSubrange.length - 1 && aminoAcidSliver.positionInCodon === (annotation.forward ? 0 : 2);
|
|
118713
118793
|
if (aminoAcidSliver.positionInCodon !== 1 && !isStartFiller && !isEndFiller) {
|
|
118794
|
+
prevAaSliver = aminoAcidSliver;
|
|
118795
|
+
nextAaSliver = aminoAcidsForSubrange[index2 + 2];
|
|
118714
118796
|
return null;
|
|
118715
118797
|
}
|
|
118716
118798
|
const { gapsInside, gapsBefore } = getGaps(aminoAcidSliver.codonRange);
|
|
@@ -118727,10 +118809,12 @@ const _Translation = class _Translation extends React$2.Component {
|
|
|
118727
118809
|
} else {
|
|
118728
118810
|
color2 = aminoAcid.color;
|
|
118729
118811
|
}
|
|
118812
|
+
prevAaSliver = aminoAcidSliver;
|
|
118813
|
+
nextAaSliver = aminoAcidsForSubrange[index2 + 2];
|
|
118730
118814
|
return /* @__PURE__ */ React$2.createElement(
|
|
118731
118815
|
AASliver$1,
|
|
118732
118816
|
{
|
|
118733
|
-
isFiller: isEndFiller || isStartFiller,
|
|
118817
|
+
isFiller: isEndFiller || isStartFiller || isTruncatedEnd && isTruncatedStart,
|
|
118734
118818
|
isTruncatedEnd,
|
|
118735
118819
|
isTruncatedStart,
|
|
118736
118820
|
onClick: function(event) {
|
|
@@ -120963,7 +121047,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
120963
121047
|
}
|
|
120964
121048
|
__name(showFileDialog, "showFileDialog");
|
|
120965
121049
|
const name = "@teselagen/ove";
|
|
120966
|
-
const version = "0.5.
|
|
121050
|
+
const version = "0.5.13";
|
|
120967
121051
|
const main = "./src/index.js";
|
|
120968
121052
|
const type = "module";
|
|
120969
121053
|
const exports$1 = {
|