title: Get gene name and molecular function from gene ontology using Wikidata
body: <p>I am trying to get gene name, molecular function for each gene but I am getting an error:</p>
  
  <blockquote>
    <p>Query time out reached limit</p>
  </blockquote>
  
  <p>This is the current query I have:</p>
  
  <pre><code>SELECT ?geneLabel ?molecular_functionLabel WHERE {
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    OPTIONAL { ?gene wdt:P680 ?molecular_function. }
    ?gene wdt:P31 wd:Q7187.
  }
  </code></pre>
  
  <p>However, when adding <code>LIMIT</code> to the end I receive results:</p>
  
  <pre><code>SELECT ?geneLabel ?molecular_functionLabel WHERE {
        SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
        OPTIONAL { ?gene wdt:P680 ?molecular_function. }
        ?gene wdt:P31 wd:Q7187.
  }
  
  LIMIT 100
  </code></pre>
  
  <p>My question is what could be  I am doing wrong?  or should this be filtered by the protein domain e.g. filter by ketoreductase to avoid receiving results that reach the limit?
  And how can I combine two ontologies such as gene ontology and chromosome ontology?</p>
  
  <p>ketoreductase ontology id: <a href="https://www.wikidata.org/wiki/Q62989273" rel="nofollow noreferrer">https://www.wikidata.org/wiki/Q62989273</a></p>