@teselagen/bio-parsers 0.1.18 → 0.1.20
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.d.ts +1 -0
- package/index.js +13 -4
- package/index.mjs +14 -5
- package/index.umd.js +13 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -11,5 +11,6 @@ export { default as jsonToBed } from "./jsonToBed";
|
|
|
11
11
|
export { default as cleanUpTeselagenJsonForExport } from "./utils/cleanUpTeselagenJsonForExport";
|
|
12
12
|
export { default as parseUracilFeatures } from "./utils/parseUracilFeatures";
|
|
13
13
|
export { default as jsonToJsonString } from "./jsonToJsonString";
|
|
14
|
+
export { default as validateSequenceArray } from "./utils/validateSequenceArray";
|
|
14
15
|
export { default as ab1ToJson, convertBasePosTraceToPerBpTrace } from "./ab1ToJson";
|
|
15
16
|
export { default as searchWholeObjByName, searchWholeObjByNameSimple, searchWholeObjByNameSimpleArray } from "./utils/searchWholeObjByName";
|
package/index.js
CHANGED
|
@@ -31051,7 +31051,7 @@ function parseGeneiousJson(geneiousJson) {
|
|
|
31051
31051
|
searchWholeObjByNameSimpleArray("annotation", geneiousJsonInner),
|
|
31052
31052
|
function(feature) {
|
|
31053
31053
|
if (feature) {
|
|
31054
|
-
const name2 = searchWholeObjByNameSimple("description", feature);
|
|
31054
|
+
const name2 = (searchWholeObjByNameSimple("description", feature) || "").substring(0, 255);
|
|
31055
31055
|
const intervals = searchWholeObjByNameSimpleArray("interval", feature);
|
|
31056
31056
|
const type = searchWholeObjByNameSimple("type", feature);
|
|
31057
31057
|
const firstInterval = intervals[0];
|
|
@@ -31662,9 +31662,17 @@ function anyToJson(fileContentStringOrFileObj, options) {
|
|
|
31662
31662
|
return snapgeneToJson(fileContentStringOrFileObj, options);
|
|
31663
31663
|
} else if (/^(geneious)$/.test(ext)) {
|
|
31664
31664
|
const a = yield getUint8ArrayFromFile(fileContentStringOrFileObj);
|
|
31665
|
-
|
|
31666
|
-
|
|
31667
|
-
|
|
31665
|
+
let d;
|
|
31666
|
+
try {
|
|
31667
|
+
d = new TextDecoder().decode(a, { stream: false });
|
|
31668
|
+
if (!d.includes("<geneious")) {
|
|
31669
|
+
throw new Error("not geneious");
|
|
31670
|
+
}
|
|
31671
|
+
} catch (e) {
|
|
31672
|
+
const b = unzipSync(a);
|
|
31673
|
+
const c = Object.values(b)[0];
|
|
31674
|
+
d = new TextDecoder().decode(c, { stream: false });
|
|
31675
|
+
}
|
|
31668
31676
|
return geneiousXmlToJson(d, options);
|
|
31669
31677
|
} else {
|
|
31670
31678
|
fileContentString = yield getUtf8StringFromFile(
|
|
@@ -33645,3 +33653,4 @@ exports.searchWholeObjByName = searchWholeObjByName;
|
|
|
33645
33653
|
exports.searchWholeObjByNameSimple = searchWholeObjByNameSimple;
|
|
33646
33654
|
exports.searchWholeObjByNameSimpleArray = searchWholeObjByNameSimpleArray;
|
|
33647
33655
|
exports.snapgeneToJson = snapgeneToJson;
|
|
33656
|
+
exports.validateSequenceArray = validateSequenceArray;
|
package/index.mjs
CHANGED
|
@@ -31049,7 +31049,7 @@ function parseGeneiousJson(geneiousJson) {
|
|
|
31049
31049
|
searchWholeObjByNameSimpleArray("annotation", geneiousJsonInner),
|
|
31050
31050
|
function(feature) {
|
|
31051
31051
|
if (feature) {
|
|
31052
|
-
const name2 = searchWholeObjByNameSimple("description", feature);
|
|
31052
|
+
const name2 = (searchWholeObjByNameSimple("description", feature) || "").substring(0, 255);
|
|
31053
31053
|
const intervals = searchWholeObjByNameSimpleArray("interval", feature);
|
|
31054
31054
|
const type = searchWholeObjByNameSimple("type", feature);
|
|
31055
31055
|
const firstInterval = intervals[0];
|
|
@@ -31660,9 +31660,17 @@ function anyToJson(fileContentStringOrFileObj, options) {
|
|
|
31660
31660
|
return snapgeneToJson(fileContentStringOrFileObj, options);
|
|
31661
31661
|
} else if (/^(geneious)$/.test(ext)) {
|
|
31662
31662
|
const a = yield getUint8ArrayFromFile(fileContentStringOrFileObj);
|
|
31663
|
-
|
|
31664
|
-
|
|
31665
|
-
|
|
31663
|
+
let d;
|
|
31664
|
+
try {
|
|
31665
|
+
d = new TextDecoder().decode(a, { stream: false });
|
|
31666
|
+
if (!d.includes("<geneious")) {
|
|
31667
|
+
throw new Error("not geneious");
|
|
31668
|
+
}
|
|
31669
|
+
} catch (e) {
|
|
31670
|
+
const b = unzipSync(a);
|
|
31671
|
+
const c = Object.values(b)[0];
|
|
31672
|
+
d = new TextDecoder().decode(c, { stream: false });
|
|
31673
|
+
}
|
|
31666
31674
|
return geneiousXmlToJson(d, options);
|
|
31667
31675
|
} else {
|
|
31668
31676
|
fileContentString = yield getUtf8StringFromFile(
|
|
@@ -33643,5 +33651,6 @@ export {
|
|
|
33643
33651
|
searchWholeObjByName,
|
|
33644
33652
|
searchWholeObjByNameSimple,
|
|
33645
33653
|
searchWholeObjByNameSimpleArray,
|
|
33646
|
-
snapgeneToJson
|
|
33654
|
+
snapgeneToJson,
|
|
33655
|
+
validateSequenceArray
|
|
33647
33656
|
};
|
package/index.umd.js
CHANGED
|
@@ -31053,7 +31053,7 @@ ${seq.sequence}
|
|
|
31053
31053
|
searchWholeObjByNameSimpleArray("annotation", geneiousJsonInner),
|
|
31054
31054
|
function(feature) {
|
|
31055
31055
|
if (feature) {
|
|
31056
|
-
const name3 = searchWholeObjByNameSimple("description", feature);
|
|
31056
|
+
const name3 = (searchWholeObjByNameSimple("description", feature) || "").substring(0, 255);
|
|
31057
31057
|
const intervals = searchWholeObjByNameSimpleArray("interval", feature);
|
|
31058
31058
|
const type = searchWholeObjByNameSimple("type", feature);
|
|
31059
31059
|
const firstInterval = intervals[0];
|
|
@@ -31664,9 +31664,17 @@ ${seq.sequence}
|
|
|
31664
31664
|
return snapgeneToJson(fileContentStringOrFileObj, options);
|
|
31665
31665
|
} else if (/^(geneious)$/.test(ext)) {
|
|
31666
31666
|
const a = yield getUint8ArrayFromFile(fileContentStringOrFileObj);
|
|
31667
|
-
|
|
31668
|
-
|
|
31669
|
-
|
|
31667
|
+
let d;
|
|
31668
|
+
try {
|
|
31669
|
+
d = new TextDecoder().decode(a, { stream: false });
|
|
31670
|
+
if (!d.includes("<geneious")) {
|
|
31671
|
+
throw new Error("not geneious");
|
|
31672
|
+
}
|
|
31673
|
+
} catch (e) {
|
|
31674
|
+
const b = unzipSync(a);
|
|
31675
|
+
const c = Object.values(b)[0];
|
|
31676
|
+
d = new TextDecoder().decode(c, { stream: false });
|
|
31677
|
+
}
|
|
31670
31678
|
return geneiousXmlToJson(d, options);
|
|
31671
31679
|
} else {
|
|
31672
31680
|
fileContentString = yield getUtf8StringFromFile(
|
|
@@ -33647,5 +33655,6 @@ ${seq.sequence}
|
|
|
33647
33655
|
exports2.searchWholeObjByNameSimple = searchWholeObjByNameSimple;
|
|
33648
33656
|
exports2.searchWholeObjByNameSimpleArray = searchWholeObjByNameSimpleArray;
|
|
33649
33657
|
exports2.snapgeneToJson = snapgeneToJson;
|
|
33658
|
+
exports2.validateSequenceArray = validateSequenceArray;
|
|
33650
33659
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
33651
33660
|
});
|