@sjcrh/proteinpaint-shared 2.180.0 → 2.180.1

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/src/bulk.snv.js CHANGED
@@ -4,12 +4,12 @@
4
4
  //
5
5
  ///////////////////////////////
6
6
 
7
- import * as common from './common.js'
8
- import * as bulk from './bulk.js'
7
+ import * as common from "./common.js"
8
+ import * as bulk from "./bulk.js"
9
9
 
10
10
  export function parseheader(line, flag) {
11
- const header = line.toLowerCase().split('\t')
12
- if (header.length <= 1) return 'invalid file header for snv/indel'
11
+ const header = line.toLowerCase().split("\t")
12
+ if (header.length <= 1) return "invalid file header for snv/indel"
13
13
  const htry = (...args) => {
14
14
  for (const s of args) {
15
15
  const i = header.indexOf(s)
@@ -17,98 +17,127 @@ export function parseheader(line, flag) {
17
17
  }
18
18
  return -1
19
19
  }
20
- let i = htry('annovar_gene', 'annovar_sj_gene', 'gene', 'genename', 'gene_symbol', 'hugo_symbol')
21
- if (i == -1) return 'gene missing from header'
22
- header[i] = 'gene'
23
- i = htry('annovar_aachange', 'amino_acid_change', 'annovar_sj_aachange', 'aachange', 'protein_change', 'variant')
24
- if (i == -1) return 'amino_acid_change missing from header'
25
- header[i] = 'mname'
26
- i = htry('annovar_class', 'class', 'mclass', 'variant_class', 'variant_classification', 'annovar_sj_class')
27
- if (i == -1) return 'variant_class missing from header'
28
- header[i] = 'class'
29
- i = htry('chromosome', 'chr')
30
- if (i == -1) return 'chromosome missing from header'
31
- header[i] = 'chr'
32
- i = htry('wu_hg19_pos', 'start', 'start_position', 'chr_position', 'position')
33
- if (i == -1) return 'start missing from header'
34
- header[i] = 'pos'
20
+ let i = htry(
21
+ "annovar_gene",
22
+ "annovar_sj_gene",
23
+ "gene",
24
+ "genename",
25
+ "gene_symbol",
26
+ "hugo_symbol"
27
+ )
28
+ if (i == -1) return "gene missing from header"
29
+ header[i] = "gene"
30
+ i = htry(
31
+ "annovar_aachange",
32
+ "amino_acid_change",
33
+ "annovar_sj_aachange",
34
+ "aachange",
35
+ "protein_change",
36
+ "variant"
37
+ )
38
+ if (i == -1) return "amino_acid_change missing from header"
39
+ header[i] = "mname"
40
+ i = htry(
41
+ "annovar_class",
42
+ "class",
43
+ "mclass",
44
+ "variant_class",
45
+ "variant_classification",
46
+ "annovar_sj_class"
47
+ )
48
+ if (i == -1) return "variant_class missing from header"
49
+ header[i] = "class"
50
+ i = htry("chromosome", "chr")
51
+ if (i == -1) return "chromosome missing from header"
52
+ header[i] = "chr"
53
+ i = htry("wu_hg19_pos", "start", "start_position", "chr_position", "position")
54
+ if (i == -1) return "start missing from header"
55
+ header[i] = "pos"
35
56
  i = htry(
36
- 'annovar_isoform',
37
- 'mrna_accession',
38
- 'mrna accession',
39
- 'refseq_mrna_id',
40
- 'annovar_sj_filter_isoform',
41
- 'refseq',
42
- 'isoform'
57
+ "annovar_isoform",
58
+ "mrna_accession",
59
+ "mrna accession",
60
+ "refseq_mrna_id",
61
+ "annovar_sj_filter_isoform",
62
+ "refseq",
63
+ "isoform"
43
64
  )
44
- if (i == -1) return 'isoform missing from header'
45
- header[i] = 'isoform'
65
+ if (i == -1) return "isoform missing from header"
66
+ header[i] = "isoform"
46
67
 
47
68
  // optional
48
- i = htry('sample', 'sample_name', 'tumor_sample_barcode')
49
- if (i != -1) header[i] = 'sample'
50
- i = htry('patient', 'donor', 'target_case_id')
51
- if (i != -1) header[i] = 'patient'
52
- i = htry('quantitative_measurements')
53
- if (i != -1) header[i] = 'qmset'
69
+ i = htry("sample", "sample_name", "tumor_sample_barcode")
70
+ if (i != -1) header[i] = "sample"
71
+ i = htry("patient", "donor", "target_case_id")
72
+ if (i != -1) header[i] = "patient"
73
+ i = htry("quantitative_measurements")
74
+ if (i != -1) header[i] = "qmset"
54
75
  // dna maf tumor
55
- i = htry('mutant_reads_in_case', 'mutant_in_tumor', 'tumor_readcount_alt')
56
- if (i != -1) header[i] = 'maf_tumor_v1'
57
- i = htry('total_reads_in_case', 'total_in_tumor', 'tumor_readcount_total')
58
- if (i != -1) header[i] = 'maf_tumor_v2'
76
+ i = htry("mutant_reads_in_case", "mutant_in_tumor", "tumor_readcount_alt")
77
+ if (i != -1) header[i] = "maf_tumor_v1"
78
+ i = htry("total_reads_in_case", "total_in_tumor", "tumor_readcount_total")
79
+ if (i != -1) header[i] = "maf_tumor_v2"
59
80
  // dna maf normal
60
- i = htry('mutant_reads_in_control', 'mutant_in_normal', 'normal_readcount_alt')
61
- if (i != -1) header[i] = 'maf_normal_v1'
62
- i = htry('total_reads_in_control', 'total_in_normal', 'normal_readcount_total')
63
- if (i != -1) header[i] = 'maf_normal_v2'
81
+ i = htry(
82
+ "mutant_reads_in_control",
83
+ "mutant_in_normal",
84
+ "normal_readcount_alt"
85
+ )
86
+ if (i != -1) header[i] = "maf_normal_v1"
87
+ i = htry(
88
+ "total_reads_in_control",
89
+ "total_in_normal",
90
+ "normal_readcount_total"
91
+ )
92
+ if (i != -1) header[i] = "maf_normal_v2"
64
93
  // rna maf
65
94
  // cdna
66
- i = htry('cdna_change')
67
- if (i != -1) header[i] = 'cdna_change'
68
- i = htry('sampletype', 'sample type', 'sample_type')
69
- if (i != -1) header[i] = 'sampletype'
70
- i = htry('origin')
71
- if (i != -1) header[i] = 'origin'
72
- i = htry('cancer', 'disease', 'diagnosis')
73
- if (i != -1) header[i] = 'disease'
95
+ i = htry("cdna_change")
96
+ if (i != -1) header[i] = "cdna_change"
97
+ i = htry("sampletype", "sample type", "sample_type")
98
+ if (i != -1) header[i] = "sampletype"
99
+ i = htry("origin")
100
+ if (i != -1) header[i] = "origin"
101
+ i = htry("cancer", "disease", "diagnosis")
102
+ if (i != -1) header[i] = "disease"
74
103
  flag.snv.header = header
75
104
  flag.snv.loaded = true
76
105
  return false
77
106
  }
78
107
 
79
108
  export function parseline(linei, line, flag) {
80
- if (line == '' || line[0] == '#') return
81
- const lst = line.split('\t')
109
+ if (line == "" || line[0] == "#") return
110
+ const lst = line.split("\t")
82
111
  const m = {}
83
112
  for (let j = 0; j < flag.snv.header.length; j++) {
84
113
  if (lst[j] == undefined) break
85
114
  m[flag.snv.header[j]] = lst[j]
86
115
  }
87
116
  if (!m.gene) {
88
- flag.snv.badlines.push([linei, 'missing gene', lst])
117
+ flag.snv.badlines.push([linei, "missing gene", lst])
89
118
  return
90
119
  }
91
- if (m.gene.toUpperCase() == 'UNKNOWN') {
92
- flag.snv.badlines.push([linei, 'gene name is UNKNOWN', lst])
120
+ if (m.gene.toUpperCase() == "UNKNOWN") {
121
+ flag.snv.badlines.push([linei, "gene name is UNKNOWN", lst])
93
122
  return
94
123
  }
95
124
  if (!m.isoform) {
96
- flag.snv.badlines.push([linei, 'missing isoform', lst])
125
+ flag.snv.badlines.push([linei, "missing isoform", lst])
97
126
  return
98
127
  }
99
128
  if (!m.mname) {
100
129
  m.mname = m.cdna_change
101
130
  if (!m.mname) {
102
- flag.snv.badlines.push([linei, 'missing amino acid change', lst])
131
+ flag.snv.badlines.push([linei, "missing amino acid change", lst])
103
132
  return
104
133
  }
105
134
  } else {
106
- if (m.mname.indexOf('p.') == 0) {
107
- m.mname = m.mname.replace(/^p\./, '')
135
+ if (m.mname.indexOf("p.") == 0) {
136
+ m.mname = m.mname.replace(/^p\./, "")
108
137
  }
109
138
  }
110
139
  if (!m.class) {
111
- flag.snv.badlines.push([linei, 'missing mutation class', lst])
140
+ flag.snv.badlines.push([linei, "missing mutation class", lst])
112
141
  return
113
142
  }
114
143
  let _c = flag.mclasslabel2key[m.class.toUpperCase()]
@@ -119,7 +148,7 @@ export function parseline(linei, line, flag) {
119
148
  if (_c) {
120
149
  m.class = _c
121
150
  } else {
122
- flag.snv.badlines.push([linei, 'wrong mutation class: ' + m.class, lst])
151
+ flag.snv.badlines.push([linei, "wrong mutation class: " + m.class, lst])
123
152
  return
124
153
  }
125
154
  }
@@ -127,31 +156,35 @@ export function parseline(linei, line, flag) {
127
156
  return
128
157
  }
129
158
  if (!m.chr) {
130
- flag.snv.badlines.push([linei, 'missing chromosome', lst])
159
+ flag.snv.badlines.push([linei, "missing chromosome", lst])
131
160
  return
132
161
  }
133
- if (m.chr.toLowerCase().indexOf('chr') != 0) {
134
- m.chr = 'chr' + m.chr
162
+ if (m.chr.toLowerCase().indexOf("chr") != 0) {
163
+ m.chr = "chr" + m.chr
135
164
  }
136
165
  if (!m.pos) {
137
- flag.snv.badlines.push([linei, 'missing chromosome position', lst])
166
+ flag.snv.badlines.push([linei, "missing chromosome position", lst])
138
167
  return
139
168
  }
140
169
  const v = Number.parseInt(m.pos)
141
170
  if (Number.isNaN(v)) {
142
- flag.snv.badlines.push([linei, 'invalid chromosome position', lst])
171
+ flag.snv.badlines.push([linei, "invalid chromosome position", lst])
143
172
  return
144
173
  }
145
174
  m.pos = v - 1
146
175
 
147
176
  if (m.maf_tumor_v2 != undefined && m.maf_tumor_v1 != undefined) {
148
- if (m.maf_tumor_v2 == '') {
177
+ if (m.maf_tumor_v2 == "") {
149
178
  // no value, do not parse
150
179
  } else {
151
180
  let v1 = Number.parseInt(m.maf_tumor_v1),
152
181
  v2 = Number.parseInt(m.maf_tumor_v2)
153
182
  if (Number.isNaN(v1) || Number.isNaN(v2)) {
154
- flag.snv.badlines.push([linei, 'invalid maf_tumor mutant and/or total read count', lst])
183
+ flag.snv.badlines.push([
184
+ linei,
185
+ "invalid maf_tumor mutant and/or total read count",
186
+ lst,
187
+ ])
155
188
  return
156
189
  }
157
190
  m.maf_tumor = { f: v1 / v2, v1: v1, v2: v2 }
@@ -161,13 +194,17 @@ export function parseline(linei, line, flag) {
161
194
  }
162
195
 
163
196
  if (m.maf_normal_v1 != undefined && m.maf_normal_v2 != undefined) {
164
- if (m.maf_normal_v2 == '') {
197
+ if (m.maf_normal_v2 == "") {
165
198
  // no value
166
199
  } else {
167
200
  let v1 = Number.parseInt(m.maf_normal_v1),
168
201
  v2 = Number.parseInt(m.maf_normal_v2)
169
202
  if (Number.isNaN(v1) || Number.isNaN(v2)) {
170
- flag.snv.badlines.push([linei, 'invalid maf_normal mutant and/or total read count', lst])
203
+ flag.snv.badlines.push([
204
+ linei,
205
+ "invalid maf_normal mutant and/or total read count",
206
+ lst,
207
+ ])
171
208
  return
172
209
  }
173
210
  m.maf_normal = { f: v1 / v2, v1: v1, v2: v2 }
@@ -220,9 +257,9 @@ export function parseline(linei, line, flag) {
220
257
  */
221
258
  flag.good++
222
259
  // FIXME hard-coded M and S
223
- if (m.class == 'M') {
260
+ if (m.class == "M") {
224
261
  flag.snv.missense++
225
- } else if (m.class == 'S') {
262
+ } else if (m.class == "S") {
226
263
  flag.snv.silent++
227
264
  }
228
265
  const n = flag.geneToUpper ? m.gene.toUpperCase() : m.gene
package/src/bulk.sv.js CHANGED
@@ -1,5 +1,5 @@
1
- import * as bulk from './bulk.js'
2
- import * as common from './common.js'
1
+ import * as bulk from "./bulk.js"
2
+ import * as common from "./common.js"
3
3
 
4
4
  /////////////////////////////////
5
5
  //
@@ -11,8 +11,8 @@ import * as common from './common.js'
11
11
  // must tell if the data is fusion or sv
12
12
 
13
13
  export function parseheader(line, flag, issv) {
14
- const header = line.toLowerCase().split('\t')
15
- if (header.length <= 1) return 'invalid file header for fusions'
14
+ const header = line.toLowerCase().split("\t")
15
+ if (header.length <= 1) return "invalid file header for fusions"
16
16
  const htry = (...lst) => {
17
17
  for (const a of lst) {
18
18
  const j = header.indexOf(a)
@@ -20,47 +20,47 @@ export function parseheader(line, flag, issv) {
20
20
  }
21
21
  return -1
22
22
  }
23
- let i = htry('gene_a', 'gene1', 'genea')
24
- if (i == -1) return 'gene_a missing from header'
25
- header[i] = 'gene1'
26
- i = htry('gene_b', 'gene2', 'geneb')
27
- if (i == -1) return 'gene_b missing from header'
28
- header[i] = 'gene2'
29
- i = htry('chr_a', 'chr1', 'chra')
30
- if (i == -1) return 'chr_a missing from header'
31
- header[i] = 'chr1'
32
- i = htry('chr_b', 'chr2', 'chrb')
33
- if (i == -1) return 'chr_b missing from header'
34
- header[i] = 'chr2'
35
- i = htry('pos_a', 'position_a', 'position1', 'posa')
36
- if (i == -1) return 'pos_a missing from header'
37
- header[i] = 'position1'
38
- i = htry('pos_b', 'position_b', 'position2', 'posb')
39
- if (i == -1) return 'pos_b missing from header'
40
- header[i] = 'position2'
41
- i = htry('isoform_a', 'refseq_a', 'refseq1', 'isoform1', 'sv_refseqa')
42
- if (i == -1) return 'isoform_a missing from header'
43
- header[i] = 'isoform1'
44
- i = htry('isoform_b', 'refseq_b', 'refseq2', 'isoform2', 'sv_refseqb')
45
- if (i == -1) return 'isoform_b missing from header'
46
- header[i] = 'isoform2'
47
- i = htry('strand_a', 'orta')
48
- if (i == -1) return 'strand_a missing from header'
49
- header[i] = 'strand1'
50
- i = htry('strand_b', 'ortb')
51
- if (i == -1) return 'strand_b missing from header'
52
- header[i] = 'strand2'
23
+ let i = htry("gene_a", "gene1", "genea")
24
+ if (i == -1) return "gene_a missing from header"
25
+ header[i] = "gene1"
26
+ i = htry("gene_b", "gene2", "geneb")
27
+ if (i == -1) return "gene_b missing from header"
28
+ header[i] = "gene2"
29
+ i = htry("chr_a", "chr1", "chra")
30
+ if (i == -1) return "chr_a missing from header"
31
+ header[i] = "chr1"
32
+ i = htry("chr_b", "chr2", "chrb")
33
+ if (i == -1) return "chr_b missing from header"
34
+ header[i] = "chr2"
35
+ i = htry("pos_a", "position_a", "position1", "posa")
36
+ if (i == -1) return "pos_a missing from header"
37
+ header[i] = "position1"
38
+ i = htry("pos_b", "position_b", "position2", "posb")
39
+ if (i == -1) return "pos_b missing from header"
40
+ header[i] = "position2"
41
+ i = htry("isoform_a", "refseq_a", "refseq1", "isoform1", "sv_refseqa")
42
+ if (i == -1) return "isoform_a missing from header"
43
+ header[i] = "isoform1"
44
+ i = htry("isoform_b", "refseq_b", "refseq2", "isoform2", "sv_refseqb")
45
+ if (i == -1) return "isoform_b missing from header"
46
+ header[i] = "isoform2"
47
+ i = htry("strand_a", "orta")
48
+ if (i == -1) return "strand_a missing from header"
49
+ header[i] = "strand1"
50
+ i = htry("strand_b", "ortb")
51
+ if (i == -1) return "strand_b missing from header"
52
+ header[i] = "strand2"
53
53
  // optional
54
- i = htry('sample', 'sample_name', 'tumor_sample_barcode')
55
- if (i != -1) header[i] = 'sample'
56
- i = htry('patient', 'donor', 'target_case_id')
57
- if (i != -1) header[i] = 'patient'
58
- i = htry('sampletype', 'sample type', 'sample_type')
59
- if (i != -1) header[i] = 'sampletype'
60
- i = htry('disease')
61
- if (i != -1) header[i] = 'disease'
62
- i = htry('origin')
63
- if (i != -1) header[i] = 'origin'
54
+ i = htry("sample", "sample_name", "tumor_sample_barcode")
55
+ if (i != -1) header[i] = "sample"
56
+ i = htry("patient", "donor", "target_case_id")
57
+ if (i != -1) header[i] = "patient"
58
+ i = htry("sampletype", "sample type", "sample_type")
59
+ if (i != -1) header[i] = "sampletype"
60
+ i = htry("disease")
61
+ if (i != -1) header[i] = "disease"
62
+ i = htry("origin")
63
+ if (i != -1) header[i] = "origin"
64
64
  if (issv) {
65
65
  flag.sv.loaded = true
66
66
  flag.sv.header = header
@@ -72,8 +72,8 @@ export function parseheader(line, flag, issv) {
72
72
  }
73
73
 
74
74
  export function parseline(i, line, flag, issv) {
75
- if (line == '' || line[0] == '#') return
76
- const lst = line.split('\t')
75
+ if (line == "" || line[0] == "#") return
76
+ const lst = line.split("\t")
77
77
  const m = {}
78
78
  const header = issv ? flag.sv.header : flag.fusion.header
79
79
  const badlines = issv ? flag.sv.badlines : flag.fusion.badlines
@@ -82,56 +82,56 @@ export function parseline(i, line, flag, issv) {
82
82
  m[header[j]] = lst[j]
83
83
  }
84
84
  if (!m.chr1) {
85
- badlines.push([i, 'missing chr1', lst])
85
+ badlines.push([i, "missing chr1", lst])
86
86
  return
87
87
  }
88
- if (m.chr1.toLowerCase().indexOf('chr') != 0) {
89
- m.chr1 = 'chr' + m.chr1
88
+ if (m.chr1.toLowerCase().indexOf("chr") != 0) {
89
+ m.chr1 = "chr" + m.chr1
90
90
  }
91
91
  if (!m.chr2) {
92
- badlines.push([i, 'missing chr2', lst])
92
+ badlines.push([i, "missing chr2", lst])
93
93
  return
94
94
  }
95
- if (m.chr2.toLowerCase().indexOf('chr') != 0) {
96
- m.chr2 = 'chr' + m.chr2
95
+ if (m.chr2.toLowerCase().indexOf("chr") != 0) {
96
+ m.chr2 = "chr" + m.chr2
97
97
  }
98
98
  let v = m.position1
99
99
  if (!v) {
100
- badlines.push([i, 'missing position1', lst])
100
+ badlines.push([i, "missing position1", lst])
101
101
  return
102
102
  }
103
103
  let v2 = Number.parseInt(v)
104
104
  if (Number.isNaN(v2) || v2 <= 0) {
105
- badlines.push([i, 'invalid value for position1', lst])
105
+ badlines.push([i, "invalid value for position1", lst])
106
106
  return
107
107
  }
108
108
  m.position1 = v2
109
109
  v = m.position2
110
110
  if (!v) {
111
- badlines.push([i, 'missing position2', lst])
111
+ badlines.push([i, "missing position2", lst])
112
112
  return
113
113
  }
114
114
  v2 = Number.parseInt(v)
115
115
  if (Number.isNaN(v2) || v2 <= 0) {
116
- badlines.push([i, 'invalid value for position2', lst])
116
+ badlines.push([i, "invalid value for position2", lst])
117
117
  return
118
118
  }
119
119
  m.position2 = v2
120
120
  if (bulk.parsesample(m, flag, i, lst, badlines)) {
121
121
  return
122
122
  }
123
- if (m.isoform1 && m.isoform1.indexOf(',') != -1) {
124
- const lst2 = m.isoform1.split(',')
123
+ if (m.isoform1 && m.isoform1.indexOf(",") != -1) {
124
+ const lst2 = m.isoform1.split(",")
125
125
  m.isoform1 = undefined
126
126
  for (const t of lst2) {
127
- if (t != '') m.isoform1 = t
127
+ if (t != "") m.isoform1 = t
128
128
  }
129
129
  }
130
- if (m.isoform2 && m.isoform2.indexOf(',') != -1) {
131
- const lst2 = m.isoform2.split(',')
130
+ if (m.isoform2 && m.isoform2.indexOf(",") != -1) {
131
+ const lst2 = m.isoform2.split(",")
132
132
  m.isoform2 = undefined
133
133
  for (const t of lst2) {
134
- if (t != '') m.isoform2 = t
134
+ if (t != "") m.isoform2 = t
135
135
  }
136
136
  }
137
137
  if (!m.gene1) {
@@ -160,17 +160,17 @@ export function parseline(i, line, flag, issv) {
160
160
  isoform: m.isoform1,
161
161
  strand: m.strand1,
162
162
  chr: m.chr1,
163
- position: m.position1
163
+ position: m.position1,
164
164
  },
165
165
  b: {
166
166
  name: m.gene2,
167
167
  isoform: m.isoform2,
168
168
  strand: m.strand2,
169
169
  chr: m.chr2,
170
- position: m.position2
171
- }
172
- }
173
- ]
170
+ position: m.position2,
171
+ },
172
+ },
173
+ ],
174
174
  }
175
175
  const n = flag.geneToUpper ? m.gene1.toUpperCase() : m.gene1
176
176
  if (!flag.data[n]) {
@@ -198,17 +198,17 @@ export function parseline(i, line, flag, issv) {
198
198
  isoform: m.isoform1,
199
199
  strand: m.strand1,
200
200
  chr: m.chr1,
201
- position: m.position1
201
+ position: m.position1,
202
202
  },
203
203
  b: {
204
204
  name: m.gene2,
205
205
  isoform: m.isoform2,
206
206
  strand: m.strand2,
207
207
  chr: m.chr2,
208
- position: m.position2
209
- }
210
- }
211
- ]
208
+ position: m.position2,
209
+ },
210
+ },
211
+ ],
212
212
  }
213
213
  const n = flag.geneToUpper ? m.gene2.toUpperCase() : m.gene2
214
214
  if (!flag.data[n]) {
@@ -221,10 +221,10 @@ export function parseline(i, line, flag, issv) {
221
221
  export function duplicate(m) {
222
222
  const n = {}
223
223
  for (const k in m) {
224
- if (k == 'pairlst') continue
224
+ if (k == "pairlst") continue
225
225
  const v = m[k]
226
226
  const type = typeof v
227
- if (type == 'object') {
227
+ if (type == "object") {
228
228
  continue
229
229
  }
230
230
  n[k] = v
@@ -234,7 +234,7 @@ export function duplicate(m) {
234
234
  for (const pair of m.pairlst) {
235
235
  const p = {}
236
236
  for (const k in pair) {
237
- if (k == 'a' || k == 'b' || k == 'interstitial') {
237
+ if (k == "a" || k == "b" || k == "interstitial") {
238
238
  continue
239
239
  }
240
240
  p[k] = pair[k]
@@ -243,7 +243,7 @@ export function duplicate(m) {
243
243
  p.a = {}
244
244
  for (const k in pair.a) {
245
245
  const v = pair.a[k]
246
- if (typeof v == 'object') {
246
+ if (typeof v == "object") {
247
247
  continue
248
248
  }
249
249
  p.a[k] = v
@@ -253,7 +253,7 @@ export function duplicate(m) {
253
253
  p.b = {}
254
254
  for (const k in pair.b) {
255
255
  const v = pair.b[k]
256
- if (typeof v == 'object') {
256
+ if (typeof v == "object") {
257
257
  continue
258
258
  }
259
259
  p.b[k] = v
@@ -263,7 +263,7 @@ export function duplicate(m) {
263
263
  p.interstitial = {}
264
264
  for (const k in pair.interstitial) {
265
265
  const v = pair.interstitial[k]
266
- if (typeof v == 'object') {
266
+ if (typeof v == "object") {
267
267
  continue
268
268
  }
269
269
  p.interstitial[k] = v