msa-parsers 1.0.5 → 1.0.6

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.
Files changed (58) hide show
  1. package/README.md +89 -0
  2. package/dist/gff/gffToInterPro.d.ts +1 -1
  3. package/dist/gff/index.d.ts +3 -3
  4. package/dist/gff/index.js +3 -3
  5. package/dist/gff/index.js.map +1 -1
  6. package/dist/gff/interProToGFF.d.ts +1 -1
  7. package/dist/gff/parseGFF.d.ts +1 -1
  8. package/dist/index.d.ts +5 -5
  9. package/dist/index.js +4 -4
  10. package/dist/index.js.map +1 -1
  11. package/dist/msa/A3mMSA.d.ts +1 -1
  12. package/dist/msa/ClustalMSA.d.ts +1 -1
  13. package/dist/msa/EmfMSA.d.ts +1 -1
  14. package/dist/msa/FastaMSA.d.ts +1 -1
  15. package/dist/msa/StockholmMSA.d.ts +3 -3
  16. package/dist/msa/StockholmMSA.js +4 -4
  17. package/dist/msa/StockholmMSA.js.map +1 -1
  18. package/dist/msa/index.d.ts +11 -11
  19. package/dist/msa/index.js +11 -11
  20. package/dist/msa/index.js.map +1 -1
  21. package/dist/util.d.ts +1 -1
  22. package/package.json +12 -3
  23. package/src/gff/gffToInterPro.test.ts +2 -2
  24. package/src/gff/gffToInterPro.ts +1 -1
  25. package/src/gff/index.ts +3 -3
  26. package/src/gff/interProToGFF.test.ts +2 -2
  27. package/src/gff/interProToGFF.ts +1 -1
  28. package/src/gff/parseGFF.test.ts +1 -1
  29. package/src/gff/parseGFF.ts +1 -1
  30. package/src/index.ts +5 -5
  31. package/src/msa/A3mMSA.test.ts +1 -1
  32. package/src/msa/A3mMSA.ts +1 -1
  33. package/src/msa/ClustalMSA.ts +1 -1
  34. package/src/msa/EmfMSA.ts +1 -1
  35. package/src/msa/FastaMSA.ts +1 -1
  36. package/src/msa/StockholmMSA.ts +6 -6
  37. package/src/msa/index.test.ts +4 -4
  38. package/src/msa/index.ts +11 -11
  39. package/src/msa/stockholmParser.test.ts +1 -1
  40. package/src/util.ts +1 -1
  41. package/dist/gff/gffToInterPro.test.d.ts +0 -1
  42. package/dist/gff/gffToInterPro.test.js +0 -181
  43. package/dist/gff/gffToInterPro.test.js.map +0 -1
  44. package/dist/gff/interProToGFF.test.d.ts +0 -1
  45. package/dist/gff/interProToGFF.test.js +0 -189
  46. package/dist/gff/interProToGFF.test.js.map +0 -1
  47. package/dist/gff/parseGFF.test.d.ts +0 -1
  48. package/dist/gff/parseGFF.test.js +0 -92
  49. package/dist/gff/parseGFF.test.js.map +0 -1
  50. package/dist/msa/A3mMSA.test.d.ts +0 -1
  51. package/dist/msa/A3mMSA.test.js +0 -155
  52. package/dist/msa/A3mMSA.test.js.map +0 -1
  53. package/dist/msa/index.test.d.ts +0 -1
  54. package/dist/msa/index.test.js +0 -60
  55. package/dist/msa/index.test.js.map +0 -1
  56. package/dist/msa/stockholmParser.test.d.ts +0 -1
  57. package/dist/msa/stockholmParser.test.js +0 -111
  58. package/dist/msa/stockholmParser.test.js.map +0 -1
package/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # msa-parsers
2
+
3
+ A TypeScript library for parsing multiple sequence alignment (MSA) files and
4
+ related formats.
5
+
6
+ Part of [react-msaview](../) (JBrowseMSA).
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install msa-parsers
12
+ # or
13
+ yarn add msa-parsers
14
+ ```
15
+
16
+ ## Supported formats
17
+
18
+ ### MSA formats
19
+
20
+ - **Stockholm** - Stockholm format (used by Pfam, Rfam)
21
+ - **FASTA** - Aligned FASTA format
22
+ - **Clustal** - ClustalW/ClustalX format
23
+ - **A3M** - A3M format (used by HHsuite)
24
+ - **EMF** - Ensembl Multi Format
25
+
26
+ ### Other formats
27
+
28
+ - **Newick** - Phylogenetic tree format
29
+ - **GFF** - General Feature Format (with InterProScan conversion utilities)
30
+
31
+ ## Usage
32
+
33
+ ### Parsing MSA files
34
+
35
+ The `parseMSA` function auto-detects the format:
36
+
37
+ ```typescript
38
+ import { parseMSA } from 'msa-parsers'
39
+
40
+ const msa = parseMSA(fileContents)
41
+
42
+ // Get sequence names
43
+ const names = msa.getNames()
44
+
45
+ // Get a specific row
46
+ const sequence = msa.getRow('sequence_name')
47
+
48
+ // Get alignment width
49
+ const width = msa.getWidth()
50
+
51
+ // Get phylogenetic tree (if available)
52
+ const tree = msa.getTree()
53
+ ```
54
+
55
+ ### Using specific parsers
56
+
57
+ ```typescript
58
+ import { FastaMSA, StockholmMSA, ClustalMSA } from 'msa-parsers'
59
+
60
+ const fasta = new FastaMSA(fastaContents)
61
+ const stockholm = new StockholmMSA(stockholmContents)
62
+ const clustal = new ClustalMSA(clustalContents)
63
+ ```
64
+
65
+ ### Parsing Newick trees
66
+
67
+ ```typescript
68
+ import { parseNewick, generateNodeIds } from 'msa-parsers'
69
+
70
+ const tree = parseNewick('(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);')
71
+ const treeWithIds = generateNodeIds(tree)
72
+ ```
73
+
74
+ ### GFF and InterProScan utilities
75
+
76
+ ```typescript
77
+ import { parseGFF, gffToInterProResults, interProToGFF } from 'msa-parsers'
78
+
79
+ // Parse GFF file
80
+ const records = parseGFF(gffContents)
81
+
82
+ // Convert between GFF and InterProScan formats
83
+ const interProResults = gffToInterProResults(records)
84
+ const gffString = interProToGFF(interProResults, seqId)
85
+ ```
86
+
87
+ ## License
88
+
89
+ MIT
@@ -1,4 +1,4 @@
1
- import type { GFFRecord, InterProScanResponse, InterProScanResults } from '../types';
1
+ import type { GFFRecord, InterProScanResponse, InterProScanResults } from '../types.ts';
2
2
  /**
3
3
  * Convert GFF records to InterProScan format
4
4
  *
@@ -1,3 +1,3 @@
1
- export { parseGFF } from './parseGFF';
2
- export { gffToInterProResponse, gffToInterProResults } from './gffToInterPro';
3
- export { interProResponseToGFF, interProToGFF } from './interProToGFF';
1
+ export { parseGFF } from './parseGFF.ts';
2
+ export { gffToInterProResponse, gffToInterProResults } from './gffToInterPro.ts';
3
+ export { interProResponseToGFF, interProToGFF } from './interProToGFF.ts';
package/dist/gff/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { parseGFF } from './parseGFF';
2
- export { gffToInterProResponse, gffToInterProResults } from './gffToInterPro';
3
- export { interProResponseToGFF, interProToGFF } from './interProToGFF';
1
+ export { parseGFF } from "./parseGFF.js";
2
+ export { gffToInterProResponse, gffToInterProResults } from "./gffToInterPro.js";
3
+ export { interProResponseToGFF, interProToGFF } from "./interProToGFF.js";
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gff/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gff/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAChF,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { InterProScanResults } from '../types';
1
+ import type { InterProScanResults } from '../types.ts';
2
2
  /**
3
3
  * Convert InterProScan results to GFF3 format
4
4
  */
@@ -1,2 +1,2 @@
1
- import type { GFFRecord } from '../types';
1
+ import type { GFFRecord } from '../types.ts';
2
2
  export declare function parseGFF(str?: string): GFFRecord[];
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './types';
2
- export { generateNodeIds } from './util';
3
- export { A3mMSA, ClustalMSA, EmfMSA, FastaMSA, StockholmMSA, getUngappedSequence, parseEmfTree, parseMSA, parseNewick, stockholmSniff, } from './msa';
4
- export type { MSAParserType } from './msa';
5
- export { gffToInterProResponse, gffToInterProResults, interProResponseToGFF, interProToGFF, parseGFF, } from './gff';
1
+ export * from './types.ts';
2
+ export { generateNodeIds } from './util.ts';
3
+ export { A3mMSA, ClustalMSA, EmfMSA, FastaMSA, StockholmMSA, getUngappedSequence, parseEmfTree, parseMSA, parseNewick, stockholmSniff, } from './msa/index.ts';
4
+ export type { MSAParserType } from './msa/index.ts';
5
+ export { gffToInterProResponse, gffToInterProResults, interProResponseToGFF, interProToGFF, parseGFF, } from './gff/index.ts';
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  // Types
2
- export * from './types';
2
+ export * from "./types.js";
3
3
  // Utilities
4
- export { generateNodeIds } from './util';
4
+ export { generateNodeIds } from "./util.js";
5
5
  // MSA parsers
6
- export { A3mMSA, ClustalMSA, EmfMSA, FastaMSA, StockholmMSA, getUngappedSequence, parseEmfTree, parseMSA, parseNewick, stockholmSniff, } from './msa';
6
+ export { A3mMSA, ClustalMSA, EmfMSA, FastaMSA, StockholmMSA, getUngappedSequence, parseEmfTree, parseMSA, parseNewick, stockholmSniff, } from "./msa/index.js";
7
7
  // GFF parsing
8
- export { gffToInterProResponse, gffToInterProResults, interProResponseToGFF, interProToGFF, parseGFF, } from './gff';
8
+ export { gffToInterProResponse, gffToInterProResults, interProResponseToGFF, interProToGFF, parseGFF, } from "./gff/index.js";
9
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,SAAS,CAAA;AAEvB,YAAY;AACZ,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAExC,cAAc;AACd,OAAO,EACL,MAAM,EACN,UAAU,EACV,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,cAAc,GACf,MAAM,OAAO,CAAA;AAGd,cAAc;AACd,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,QAAQ,GACT,MAAM,OAAO,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,YAAY,CAAA;AAE1B,YAAY;AACZ,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,cAAc;AACd,OAAO,EACL,MAAM,EACN,UAAU,EACV,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,cAAc,GACf,MAAM,gBAAgB,CAAA;AAGvB,cAAc;AACd,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,QAAQ,GACT,MAAM,gBAAgB,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { NodeWithIds } from '../types';
1
+ import type { NodeWithIds } from '../types.ts';
2
2
  export default class A3mMSA {
3
3
  private MSA;
4
4
  private orderedNames;
@@ -1,4 +1,4 @@
1
- import type { NodeWithIds } from '../types';
1
+ import type { NodeWithIds } from '../types.ts';
2
2
  export default class ClustalMSA {
3
3
  private MSA;
4
4
  constructor(text: string);
@@ -1,4 +1,4 @@
1
- import type { NodeWithIds } from '../types';
1
+ import type { NodeWithIds } from '../types.ts';
2
2
  export default class EmfMSA {
3
3
  private MSA;
4
4
  constructor(text: string);
@@ -1,4 +1,4 @@
1
- import type { NodeWithIds } from '../types';
1
+ import type { NodeWithIds } from '../types.ts';
2
2
  export default class FastaMSA {
3
3
  private MSA;
4
4
  constructor(text: string);
@@ -1,5 +1,5 @@
1
- import type { NodeWithIds } from '../types';
2
- import type { StockholmData } from './stockholmParser';
1
+ import type { NodeWithIds } from '../types.ts';
2
+ import type { StockholmData } from './stockholmParser.ts';
3
3
  export default class StockholmMSA {
4
4
  private data;
5
5
  private MSA;
@@ -51,4 +51,4 @@ export default class StockholmMSA {
51
51
  };
52
52
  })[];
53
53
  }
54
- export { sniff as stockholmSniff } from './stockholmParser';
54
+ export { sniff as stockholmSniff } from './stockholmParser.ts';
@@ -1,6 +1,6 @@
1
- import parseNewick from './parseNewick';
2
- import { parseAll } from './stockholmParser';
3
- import { generateNodeIds } from '../util';
1
+ import parseNewick from "./parseNewick.js";
2
+ import { parseAll } from "./stockholmParser.js";
3
+ import { generateNodeIds } from "../util.js";
4
4
  export default class StockholmMSA {
5
5
  data;
6
6
  MSA;
@@ -109,5 +109,5 @@ export default class StockholmMSA {
109
109
  ];
110
110
  }
111
111
  }
112
- export { sniff as stockholmSniff } from './stockholmParser';
112
+ export { sniff as stockholmSniff } from "./stockholmParser.js";
113
113
  //# sourceMappingURL=StockholmMSA.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StockholmMSA.js","sourceRoot":"","sources":["../../src/msa/StockholmMSA.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAKzC,MAAM,CAAC,OAAO,OAAO,YAAY;IACvB,IAAI,CAAiB;IACrB,GAAG,CAAe;IAE1B,YAAY,IAAY,EAAE,gBAAwB;QAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;QAC1B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAA;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,gBAAgB,CAAE,CAAA;IACnC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,GAAG,CAAA;IACjB,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAA;IACrC,CAAC;IAED,QAAQ;QACN,MAAM,IAAI,GAAG,MAAM,CAAC,IAA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AAC,CAAC,CAAC,CAAA;QAChC,OAAO,IAAI;YACT,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACpC,CAAC,CAAC;gBACE,EAAE,EAAE,MAAM;gBACV,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACrC,EAAE,EAAE,IAAI;oBACR,QAAQ,EAAE,EAAE;oBACZ,IAAI;iBACL,CAAC,CAAC;aACJ,CAAA;IACP,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAA;IAC7B,CAAC;IAED,IAAI,2BAA2B;QAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAA;IAC5B,CAAC;IAED,IAAI,MAAM;QACR,OAAO;YACL;gBACE,EAAE,EAAE,cAAc;gBAClB,IAAI,EAAE,oBAAoB;gBAC1B,IAAI,EAAE,IAAI,CAAC,YAAY;gBACvB,iBAAiB,EAAE,EAAE;aACtB;YACD;gBACE,EAAE,EAAE,iBAAiB;gBACrB,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,IAAI,CAAC,2BAA2B;gBACtC,iBAAiB,EAAE;oBACjB,GAAG,EAAE,MAAM;oBACX,GAAG,EAAE,WAAW;iBACjB;aACF;SACF,CAAA;IACH,CAAC;CACF;AAED,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
@@ -1,18 +1,18 @@
1
- import A3mMSA from './A3mMSA';
2
- import ClustalMSA from './ClustalMSA';
3
- import EmfMSA from './EmfMSA';
4
- import FastaMSA from './FastaMSA';
5
- import StockholmMSA from './StockholmMSA';
1
+ import A3mMSA from './A3mMSA.ts';
2
+ import ClustalMSA from './ClustalMSA.ts';
3
+ import EmfMSA from './EmfMSA.ts';
4
+ import FastaMSA from './FastaMSA.ts';
5
+ import StockholmMSA from './StockholmMSA.ts';
6
6
  export { parseEmfTree } from 'emf-js';
7
- export { default as parseNewick } from './parseNewick';
7
+ export { default as parseNewick } from './parseNewick.ts';
8
8
  export type MSAParserType = StockholmMSA | A3mMSA | FastaMSA | EmfMSA | ClustalMSA;
9
9
  export declare function parseMSA(text: string, currentAlignment?: number): MSAParserType;
10
10
  /**
11
11
  * Get ungapped sequence from an aligned row
12
12
  */
13
13
  export declare function getUngappedSequence(alignedSeq: string): string;
14
- export { default as A3mMSA } from './A3mMSA';
15
- export { default as ClustalMSA } from './ClustalMSA';
16
- export { default as EmfMSA } from './EmfMSA';
17
- export { default as FastaMSA } from './FastaMSA';
18
- export { default as StockholmMSA, stockholmSniff } from './StockholmMSA';
14
+ export { default as A3mMSA } from './A3mMSA.ts';
15
+ export { default as ClustalMSA } from './ClustalMSA.ts';
16
+ export { default as EmfMSA } from './EmfMSA.ts';
17
+ export { default as FastaMSA } from './FastaMSA.ts';
18
+ export { default as StockholmMSA, stockholmSniff } from './StockholmMSA.ts';
package/dist/msa/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import A3mMSA from './A3mMSA';
2
- import ClustalMSA from './ClustalMSA';
3
- import EmfMSA from './EmfMSA';
4
- import FastaMSA from './FastaMSA';
5
- import StockholmMSA, { stockholmSniff } from './StockholmMSA';
1
+ import A3mMSA from "./A3mMSA.js";
2
+ import ClustalMSA from "./ClustalMSA.js";
3
+ import EmfMSA from "./EmfMSA.js";
4
+ import FastaMSA from "./FastaMSA.js";
5
+ import StockholmMSA, { stockholmSniff } from "./StockholmMSA.js";
6
6
  export { parseEmfTree } from 'emf-js';
7
- export { default as parseNewick } from './parseNewick';
7
+ export { default as parseNewick } from "./parseNewick.js";
8
8
  export function parseMSA(text, currentAlignment = 0) {
9
9
  if (stockholmSniff(text)) {
10
10
  return new StockholmMSA(text, currentAlignment);
@@ -26,9 +26,9 @@ export function parseMSA(text, currentAlignment = 0) {
26
26
  export function getUngappedSequence(alignedSeq) {
27
27
  return alignedSeq.replaceAll(/[.-]/g, '');
28
28
  }
29
- export { default as A3mMSA } from './A3mMSA';
30
- export { default as ClustalMSA } from './ClustalMSA';
31
- export { default as EmfMSA } from './EmfMSA';
32
- export { default as FastaMSA } from './FastaMSA';
33
- export { default as StockholmMSA, stockholmSniff } from './StockholmMSA';
29
+ export { default as A3mMSA } from "./A3mMSA.js";
30
+ export { default as ClustalMSA } from "./ClustalMSA.js";
31
+ export { default as EmfMSA } from "./EmfMSA.js";
32
+ export { default as FastaMSA } from "./FastaMSA.js";
33
+ export { default as StockholmMSA, stockholmSniff } from "./StockholmMSA.js";
34
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/msa/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,YAAY,EAAE,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AAStD,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,gBAAgB,GAAG,CAAC;IACzD,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;IACjD,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACvB,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;IACD,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,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,CAAA;IACjD,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACvB,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;IACD,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IACD,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;IACD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAkB;IACpD,OAAO,UAAU,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;AAC3C,CAAC;AAED,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA"}
package/dist/util.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import type { Node, NodeWithIds } from './types';
1
+ import type { Node, NodeWithIds } from './types.ts';
2
2
  export declare function generateNodeIds(tree: Node, parent?: string, depth?: number): NodeWithIds;
package/package.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "name": "msa-parsers",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "license": "MIT",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "default": "./dist/index.js"
10
+ }
11
+ },
7
12
  "types": "dist/index.d.ts",
8
13
  "files": [
9
14
  "dist",
@@ -21,5 +26,9 @@
21
26
  },
22
27
  "publishConfig": {
23
28
  "access": "public"
29
+ },
30
+ "devDependencies": {
31
+ "typescript": "^5.9.3",
32
+ "vitest": "^4.0.18"
24
33
  }
25
34
  }
@@ -1,8 +1,8 @@
1
1
  import { describe, expect, test } from 'vitest'
2
2
 
3
- import { gffToInterProResponse, gffToInterProResults } from './gffToInterPro'
3
+ import { gffToInterProResponse, gffToInterProResults } from './gffToInterPro.ts'
4
4
 
5
- import type { GFFRecord } from '../types'
5
+ import type { GFFRecord } from '../types.ts'
6
6
 
7
7
  describe('gffToInterProResults', () => {
8
8
  test('converts empty array', () => {
@@ -2,7 +2,7 @@ import type {
2
2
  GFFRecord,
3
3
  InterProScanResponse,
4
4
  InterProScanResults,
5
- } from '../types'
5
+ } from '../types.ts'
6
6
 
7
7
  /**
8
8
  * Convert GFF records to InterProScan format
package/src/gff/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { parseGFF } from './parseGFF'
2
- export { gffToInterProResponse, gffToInterProResults } from './gffToInterPro'
3
- export { interProResponseToGFF, interProToGFF } from './interProToGFF'
1
+ export { parseGFF } from './parseGFF.ts'
2
+ export { gffToInterProResponse, gffToInterProResults } from './gffToInterPro.ts'
3
+ export { interProResponseToGFF, interProToGFF } from './interProToGFF.ts'
@@ -1,8 +1,8 @@
1
1
  import { describe, expect, test } from 'vitest'
2
2
 
3
- import { interProResponseToGFF, interProToGFF } from './interProToGFF'
3
+ import { interProResponseToGFF, interProToGFF } from './interProToGFF.ts'
4
4
 
5
- import type { InterProScanResults } from '../types'
5
+ import type { InterProScanResults } from '../types.ts'
6
6
 
7
7
  describe('interProToGFF', () => {
8
8
  test('converts empty results', () => {
@@ -1,4 +1,4 @@
1
- import type { InterProScanResults } from '../types'
1
+ import type { InterProScanResults } from '../types.ts'
2
2
 
3
3
  /**
4
4
  * Convert InterProScan results to GFF3 format
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from 'vitest'
2
2
 
3
- import { parseGFF } from './parseGFF'
3
+ import { parseGFF } from './parseGFF.ts'
4
4
 
5
5
  describe('parseGFF', () => {
6
6
  test('parses empty string', () => {
@@ -1,4 +1,4 @@
1
- import type { GFFRecord } from '../types'
1
+ import type { GFFRecord } from '../types.ts'
2
2
 
3
3
  function parseAttributes(col9?: string): Record<string, string | undefined> {
4
4
  if (!col9) {
package/src/index.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  // Types
2
- export * from './types'
2
+ export * from './types.ts'
3
3
 
4
4
  // Utilities
5
- export { generateNodeIds } from './util'
5
+ export { generateNodeIds } from './util.ts'
6
6
 
7
7
  // MSA parsers
8
8
  export {
@@ -16,8 +16,8 @@ export {
16
16
  parseMSA,
17
17
  parseNewick,
18
18
  stockholmSniff,
19
- } from './msa'
20
- export type { MSAParserType } from './msa'
19
+ } from './msa/index.ts'
20
+ export type { MSAParserType } from './msa/index.ts'
21
21
 
22
22
  // GFF parsing
23
23
  export {
@@ -26,4 +26,4 @@ export {
26
26
  interProResponseToGFF,
27
27
  interProToGFF,
28
28
  parseGFF,
29
- } from './gff'
29
+ } from './gff/index.ts'
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from 'vitest'
2
2
 
3
- import A3mMSA from './A3mMSA'
3
+ import A3mMSA from './A3mMSA.ts'
4
4
 
5
5
  describe('A3mMSA', () => {
6
6
  describe('sniff', () => {
package/src/msa/A3mMSA.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { NodeWithIds } from '../types'
1
+ import type { NodeWithIds } from '../types.ts'
2
2
 
3
3
  /**
4
4
  * A3M Format Parser
@@ -1,6 +1,6 @@
1
1
  import { parse } from 'clustal-js'
2
2
 
3
- import type { NodeWithIds } from '../types'
3
+ import type { NodeWithIds } from '../types.ts'
4
4
 
5
5
  export default class ClustalMSA {
6
6
  private MSA: ReturnType<typeof parse>
package/src/msa/EmfMSA.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { parseEmfAln } from 'emf-js'
2
2
 
3
- import type { NodeWithIds } from '../types'
3
+ import type { NodeWithIds } from '../types.ts'
4
4
 
5
5
  export default class EmfMSA {
6
6
  private MSA: ReturnType<typeof parseEmfAln>
@@ -1,4 +1,4 @@
1
- import type { NodeWithIds } from '../types'
1
+ import type { NodeWithIds } from '../types.ts'
2
2
 
3
3
  export default class FastaMSA {
4
4
  private MSA: { seqdata: Record<string, string> }
@@ -1,9 +1,9 @@
1
- import parseNewick from './parseNewick'
2
- import { parseAll } from './stockholmParser'
3
- import { generateNodeIds } from '../util'
1
+ import parseNewick from './parseNewick.ts'
2
+ import { parseAll } from './stockholmParser.ts'
3
+ import { generateNodeIds } from '../util.ts'
4
4
 
5
- import type { NodeWithIds } from '../types'
6
- import type { StockholmData } from './stockholmParser'
5
+ import type { NodeWithIds } from '../types.ts'
6
+ import type { StockholmData } from './stockholmParser.ts'
7
7
 
8
8
  export default class StockholmMSA {
9
9
  private data: StockholmData[]
@@ -138,4 +138,4 @@ export default class StockholmMSA {
138
138
  }
139
139
  }
140
140
 
141
- export { sniff as stockholmSniff } from './stockholmParser'
141
+ export { sniff as stockholmSniff } from './stockholmParser.ts'
@@ -1,9 +1,9 @@
1
1
  import { describe, expect, test } from 'vitest'
2
2
 
3
- import A3mMSA from './A3mMSA'
4
- import ClustalMSA from './ClustalMSA'
5
- import FastaMSA from './FastaMSA'
6
- import { getUngappedSequence, parseMSA } from './index'
3
+ import A3mMSA from './A3mMSA.ts'
4
+ import ClustalMSA from './ClustalMSA.ts'
5
+ import FastaMSA from './FastaMSA.ts'
6
+ import { getUngappedSequence, parseMSA } from './index.ts'
7
7
 
8
8
  describe('parseMSA', () => {
9
9
  test('parses FASTA format', () => {
package/src/msa/index.ts CHANGED
@@ -1,11 +1,11 @@
1
- import A3mMSA from './A3mMSA'
2
- import ClustalMSA from './ClustalMSA'
3
- import EmfMSA from './EmfMSA'
4
- import FastaMSA from './FastaMSA'
5
- import StockholmMSA, { stockholmSniff } from './StockholmMSA'
1
+ import A3mMSA from './A3mMSA.ts'
2
+ import ClustalMSA from './ClustalMSA.ts'
3
+ import EmfMSA from './EmfMSA.ts'
4
+ import FastaMSA from './FastaMSA.ts'
5
+ import StockholmMSA, { stockholmSniff } from './StockholmMSA.ts'
6
6
 
7
7
  export { parseEmfTree } from 'emf-js'
8
- export { default as parseNewick } from './parseNewick'
8
+ export { default as parseNewick } from './parseNewick.ts'
9
9
 
10
10
  export type MSAParserType =
11
11
  | StockholmMSA
@@ -37,8 +37,8 @@ export function getUngappedSequence(alignedSeq: string): string {
37
37
  return alignedSeq.replaceAll(/[.-]/g, '')
38
38
  }
39
39
 
40
- export { default as A3mMSA } from './A3mMSA'
41
- export { default as ClustalMSA } from './ClustalMSA'
42
- export { default as EmfMSA } from './EmfMSA'
43
- export { default as FastaMSA } from './FastaMSA'
44
- export { default as StockholmMSA, stockholmSniff } from './StockholmMSA'
40
+ export { default as A3mMSA } from './A3mMSA.ts'
41
+ export { default as ClustalMSA } from './ClustalMSA.ts'
42
+ export { default as EmfMSA } from './EmfMSA.ts'
43
+ export { default as FastaMSA } from './FastaMSA.ts'
44
+ export { default as StockholmMSA, stockholmSniff } from './StockholmMSA.ts'
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from 'vitest'
2
2
 
3
- import { parse, parseAll, sniff } from './stockholmParser'
3
+ import { parse, parseAll, sniff } from './stockholmParser.ts'
4
4
 
5
5
  describe('stockholmParser', () => {
6
6
  describe('sniff', () => {
package/src/util.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Node, NodeWithIds } from './types'
1
+ import type { Node, NodeWithIds } from './types.ts'
2
2
 
3
3
  export function generateNodeIds(
4
4
  tree: Node,
@@ -1 +0,0 @@
1
- export {};