@teselagen/bio-parsers 0.1.24 → 0.1.26

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.js CHANGED
@@ -41937,7 +41937,13 @@ async function snapgeneToJson(fileObj, options = {}) {
41937
41937
  data.sequence = await read(size, "utf8");
41938
41938
  } else if (ord(next_byte) === 10) {
41939
41939
  // # READ THE FEATURES
41940
- const strand_dict = { 0: ".", 1: "+", 2: "-", 3: "=" };
41940
+ const strand_dict = {
41941
+ // [strand, arrowheadType]
41942
+ 0: [1, "NONE"], // non-directional feature (in that case, the attribute is generally absent altogether)
41943
+ 1: [1, "TOP"], // forward strand
41944
+ 2: [-1, "BOTTOM"], // reverse strand
41945
+ 3: [1, "BOTH"], // bi-directional feature
41946
+ };
41941
41947
  const xml = await read(block_size, "utf8");
41942
41948
  const b = new fxp.XMLParser({
41943
41949
  ignoreAttributes: false,
@@ -41972,7 +41978,8 @@ async function snapgeneToJson(fileObj, options = {}) {
41972
41978
  name,
41973
41979
  type,
41974
41980
  ...(locations?.length > 1 && { locations }),
41975
- strand: strand_dict[directionality],
41981
+ strand: directionality ? strand_dict[directionality][0] : 1,
41982
+ arrowheadType: directionality ? strand_dict[directionality][1] : "NONE",
41976
41983
  start: maxStart,
41977
41984
  end: maxEnd,
41978
41985
  // color,
package/index.mjs CHANGED
@@ -41933,7 +41933,13 @@ async function snapgeneToJson(fileObj, options = {}) {
41933
41933
  data.sequence = await read(size, "utf8");
41934
41934
  } else if (ord(next_byte) === 10) {
41935
41935
  // # READ THE FEATURES
41936
- const strand_dict = { 0: ".", 1: "+", 2: "-", 3: "=" };
41936
+ const strand_dict = {
41937
+ // [strand, arrowheadType]
41938
+ 0: [1, "NONE"], // non-directional feature (in that case, the attribute is generally absent altogether)
41939
+ 1: [1, "TOP"], // forward strand
41940
+ 2: [-1, "BOTTOM"], // reverse strand
41941
+ 3: [1, "BOTH"], // bi-directional feature
41942
+ };
41937
41943
  const xml = await read(block_size, "utf8");
41938
41944
  const b = new fxp.XMLParser({
41939
41945
  ignoreAttributes: false,
@@ -41968,7 +41974,8 @@ async function snapgeneToJson(fileObj, options = {}) {
41968
41974
  name,
41969
41975
  type,
41970
41976
  ...(locations?.length > 1 && { locations }),
41971
- strand: strand_dict[directionality],
41977
+ strand: directionality ? strand_dict[directionality][0] : 1,
41978
+ arrowheadType: directionality ? strand_dict[directionality][1] : "NONE",
41972
41979
  start: maxStart,
41973
41980
  end: maxEnd,
41974
41981
  // color,
package/index.umd.js CHANGED
@@ -41939,7 +41939,13 @@
41939
41939
  data.sequence = await read(size, "utf8");
41940
41940
  } else if (ord(next_byte) === 10) {
41941
41941
  // # READ THE FEATURES
41942
- const strand_dict = { 0: ".", 1: "+", 2: "-", 3: "=" };
41942
+ const strand_dict = {
41943
+ // [strand, arrowheadType]
41944
+ 0: [1, "NONE"], // non-directional feature (in that case, the attribute is generally absent altogether)
41945
+ 1: [1, "TOP"], // forward strand
41946
+ 2: [-1, "BOTTOM"], // reverse strand
41947
+ 3: [1, "BOTH"], // bi-directional feature
41948
+ };
41943
41949
  const xml = await read(block_size, "utf8");
41944
41950
  const b = new fxp.XMLParser({
41945
41951
  ignoreAttributes: false,
@@ -41974,7 +41980,8 @@
41974
41980
  name,
41975
41981
  type,
41976
41982
  ...(locations?.length > 1 && { locations }),
41977
- strand: strand_dict[directionality],
41983
+ strand: directionality ? strand_dict[directionality][0] : 1,
41984
+ arrowheadType: directionality ? strand_dict[directionality][1] : "NONE",
41978
41985
  start: maxStart,
41979
41986
  end: maxEnd,
41980
41987
  // color,
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@teselagen/bio-parsers",
3
- "version": "0.1.24",
4
- "type": "module",
3
+ "version": "0.1.26",
4
+ "type": "commonjs",
5
5
  "dependencies": {
6
- "@teselagen/sequence-utils": "0.1.19",
7
- "@teselagen/range-utils": "0.1.18",
6
+ "@teselagen/sequence-utils": "0.1.21",
7
+ "@teselagen/range-utils": "0.1.20",
8
8
  "@gmod/gff": "^1.2.1",
9
9
  "bson-objectid": "2.0.4",
10
10
  "buffer": "^6.0.3",