Skip to content

Commit

Permalink
Add variant QA flags to VA
Browse files Browse the repository at this point in the history
  • Loading branch information
phildarnowsky-broad committed Aug 14, 2024
1 parent 1e21bf5 commit 0e86c17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions graphql-api/src/graphql/resolvers/va.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ describe('resolveVACohortAlleleFrequency', () => {
exome: exomeEsDocument,
joint: { fafmax: { faf95_max: 0.234, faf95_max_gen_anc: 'amr' } },
coverage: { exome: { mean: 0.345, over_20: 0.456 } },
flags: ['monoallelic', 'lcr', 'lc_lof', 'lof_flag'],
}

test('parses a single CohortAlleleFrequency correctly', async () => {
Expand Down Expand Up @@ -98,10 +99,10 @@ describe('resolveVACohortAlleleFrequency', () => {
meanDepth: 0.345,
fractionCoverage20x: 0.456,
qcFilters: ['AC0'],
monoallelic: null,
lowComplexityRegion: null,
lowConfidenceLossOfFunctionError: null,
lossOfFunctionWarning: null,
monoallelic: true,
lowComplexityRegion: true,
lowConfidenceLossOfFunctionError: true,
lossOfFunctionWarning: true,
heterozygousSkewedAlleleCount: null,
},
},
Expand Down
8 changes: 4 additions & 4 deletions graphql-api/src/graphql/resolvers/va.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ export const resolveVACohortAlleleFrequencies = async (
meanDepth: coverage && coverage.mean ? coverage.mean : null,
fractionCoverage20x: coverage && coverage.over_20 ? coverage.over_20 : null,
qcFilters: frequencies.filters,
monoallelic: null,
lowComplexityRegion: null,
lowConfidenceLossOfFunctionError: null,
lossOfFunctionWarning: null,
monoallelic: obj.flags.includes('monoallelic'),
lowComplexityRegion: obj.flags.includes('lcr'),
lowConfidenceLossOfFunctionError: obj.flags.includes('lc_lof'),
lossOfFunctionWarning: obj.flags.includes('lof_flag'),
heterozygousSkewedAlleleCount: null,
}

Expand Down

0 comments on commit 0e86c17

Please sign in to comment.