Handle repeated with no children

This commit is contained in:
Kenny Daniel 2024-05-23 18:26:16 -07:00
parent ed3b525a27
commit 7a08aa3183
No known key found for this signature in database
GPG Key ID: 90AB653A8CAD7E45
4 changed files with 4088 additions and 2 deletions

@ -108,8 +108,13 @@ export function assembleNested(subcolumnData, schema, depth = 0) {
const nextDepth = optional ? depth + 1 : depth
if (isListLike(schema)) {
const sublist = schema.children[0].children[0]
assembleNested(subcolumnData, sublist, nextDepth + 1)
let sublist = schema.children[0]
let subDepth = nextDepth
if (sublist.children.length === 1) {
sublist = sublist.children[0]
subDepth++
}
assembleNested(subcolumnData, sublist, subDepth)
const subcolumn = sublist.path.join('.')
const values = subcolumnData.get(subcolumn)

@ -0,0 +1,38 @@
[
[
{
"alternateAllele": null,
"end": null,
"filtersApplied": null,
"filtersFailed": null,
"filtersPassed": null,
"names": ["name"],
"quality": null,
"referenceAllele": null,
"referenceName": null,
"splitFromMultiAllelic": false,
"start": null
},
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
false,
false,
null,
null
]
]

File diff suppressed because one or more lines are too long

Binary file not shown.