(id)
| 67 | } |
| 68 | |
| 69 | function getLineage(id) { |
| 70 | const paths = getObserverPaths(); |
| 71 | const genes = readGenes(paths); |
| 72 | const capsules = readCapsules(paths).concat(readFailedCapsules(paths)); |
| 73 | const events = readJsonl(paths.eventsPath).map(redactValue); |
| 74 | const assetCalls = readJsonl(paths.assetCallLogPath).map(redactValue); |
| 75 | return { |
| 76 | id, |
| 77 | genes: genes.filter((g) => matchesAsset(g, id)), |
| 78 | capsules: capsules.filter((c) => matchesAsset(c, id) || c.gene === id), |
| 79 | events: events.filter((e) => eventMentions(e, id)), |
| 80 | assetCalls: assetCalls.filter((entry) => matchesAsset(entry, id)), |
| 81 | }; |
| 82 | } |
| 83 | |
| 84 | function readGenes(paths) { |
| 85 | const fromJson = readJsonSafe(paths.genesPath, { genes: [] }).genes || []; |
nothing calls this directly
no test coverage detected