Skip to content

Commit 0e86c17

Browse files
Add variant QA flags to VA
1 parent 1e21bf5 commit 0e86c17

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

graphql-api/src/graphql/resolvers/va.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ describe('resolveVACohortAlleleFrequency', () => {
6767
exome: exomeEsDocument,
6868
joint: { fafmax: { faf95_max: 0.234, faf95_max_gen_anc: 'amr' } },
6969
coverage: { exome: { mean: 0.345, over_20: 0.456 } },
70+
flags: ['monoallelic', 'lcr', 'lc_lof', 'lof_flag'],
7071
}
7172

7273
test('parses a single CohortAlleleFrequency correctly', async () => {
@@ -98,10 +99,10 @@ describe('resolveVACohortAlleleFrequency', () => {
9899
meanDepth: 0.345,
99100
fractionCoverage20x: 0.456,
100101
qcFilters: ['AC0'],
101-
monoallelic: null,
102-
lowComplexityRegion: null,
103-
lowConfidenceLossOfFunctionError: null,
104-
lossOfFunctionWarning: null,
102+
monoallelic: true,
103+
lowComplexityRegion: true,
104+
lowConfidenceLossOfFunctionError: true,
105+
lossOfFunctionWarning: true,
105106
heterozygousSkewedAlleleCount: null,
106107
},
107108
},

graphql-api/src/graphql/resolvers/va.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,10 @@ export const resolveVACohortAlleleFrequencies = async (
389389
meanDepth: coverage && coverage.mean ? coverage.mean : null,
390390
fractionCoverage20x: coverage && coverage.over_20 ? coverage.over_20 : null,
391391
qcFilters: frequencies.filters,
392-
monoallelic: null,
393-
lowComplexityRegion: null,
394-
lowConfidenceLossOfFunctionError: null,
395-
lossOfFunctionWarning: null,
392+
monoallelic: obj.flags.includes('monoallelic'),
393+
lowComplexityRegion: obj.flags.includes('lcr'),
394+
lowConfidenceLossOfFunctionError: obj.flags.includes('lc_lof'),
395+
lossOfFunctionWarning: obj.flags.includes('lof_flag'),
396396
heterozygousSkewedAlleleCount: null,
397397
}
398398

0 commit comments

Comments
 (0)