def test_no_disease_match(self, graphkb_conn) -> None: statement = base_graphkb_statement('other') result = convert_statements_to_alterations(graphkb_conn, [statement], 'disease', {'variant_rid'}) assert len(result) == 1 row = result[0] assert not row['matchedCancer']
def test_diagnostic_statement(self, graphkb_conn) -> None: statement = base_graphkb_statement() statement['relevance']['@rid'] = 'diag1' result = convert_statements_to_alterations(graphkb_conn, [statement], 'disease', {'variant_rid'}) assert len(result) == 1 row = result[0] assert row['category'] == 'diagnostic'
def test_disease_match(self, graphkb_conn) -> None: statement = base_graphkb_statement('disease') result = convert_statements_to_alterations(graphkb_conn, [statement], 'disease', {'variant_rid'}) assert len(result) == 1 row = result[0] assert row['kbVariantId'] == 'variant_rid' assert row['kbStatementId'] == 'statement_rid' assert row['matchedCancer'] assert row['kbVariant'] == 'KRAS increased expression' assert row['relevance'] == 'relevance_display_name'
def test_approved_therapeutic_statement(self, graphkb_conn) -> None: statement = base_graphkb_statement() statement['relevance']['@rid'] = 'ther1' statement['evidenceLevel'] = [{ '@rid': 'approved1', 'displayName': 'level' }] result = convert_statements_to_alterations(graphkb_conn, [statement], 'disease', {'variant_rid'}) assert len(result) == 1 row = result[0] assert row['category'] == 'therapeutic'
def test_multiple_disease_not_match(self, graphkb_conn) -> None: statement = base_graphkb_statement('disease') statement['conditions'].append({ '@class': 'Disease', '@rid': 'other', 'displayName': 'disease_display_name' }) result = convert_statements_to_alterations(graphkb_conn, [statement], 'disease', {'variant_rid'}) assert len(result) == 1 row = result[0] assert not row['matchedCancer']