api-python icon indicating copy to clipboard operation
api-python copied to clipboard

[BUG]Python API SPARQL Query Doesn't Work for HumanProteinOccurrence

Open mengzhensun opened this issue 5 years ago • 0 comments

Describe the bug This query doesn't work.

To Reproduce Steps to reproduce the behavior:

  1. Go to Colab Notebook
  2. Run:
import datacommons as dc
root = 'https://api.datacommons.org'
query_str = '''
SELECT ?name ?pes_score ?rel_level
WHERE { 
    ?a typeOf HumanProteinOccurrence . 
    ?a humanProteinOccurrenceReliability ?humanProteinOccurrenceReliability .
    ?a proteinExpressionScore ?proteinExpressionScore .
    ?a name ?name .
    ?humanProteinOccurrenceReliability name ?rel_level .
    ?proteinExpressionScore name ?pes_score}LIMIT 5
'''
result = dc.query(query_str)
  1. See error in the screenshot

Expected behavior It should return the query result.

Screenshots https://screenshot.googleplex.com/2dbc2641-fd70-40d2-8a9f-2ddb3059ce7c

Additional context The relevant node in browser: https://datacommons.org/browser/bio/3BHS2_HUMAN_OralMucosa_SquamousEpithelialCells

mengzhensun avatar Aug 18 '20 23:08 mengzhensun