@@ -0,0 +1,1625 @@
+from rdflib.graph import ConjunctiveGraph%0A%0Agraph = ConjunctiveGraph()%0A%0Agraph.parse('http://data.monarchinitiative.org/ttl/omim.ttl', format='turtle')%0Aquery = %22%22%22%0A            SELECT DISTINCT ?gene ?disease%0A            WHERE %7B%0A                ?anonVariant a OBO:GENO_0000002 ;%0A                    OBO:GENO_0000408 ?gene .%0A%0A                %7B?anonVariant OBO:RO_0002200 ?disease . %7D%0A                UNION %7B?anonVariant OBO:RO_0002326 ?disease . %7D%0A                UNION %7B?anonVariant OBO:RO_0002607 ?disease . %7D%0A            %7D%0A        %22%22%22%0Acount = 0%0Aquery_result = graph.query(query)%0Acount += len(list(query_result))%0A%0A%0Aquery = %22%22%22%0A            SELECT DISTINCT ?gene ?disease%0A            WHERE %7B%0A                ?gene rdfs:subClassOf OBO:SO_0000704 .%0A                ?gene owl:equivalentClass ?eqGene .%0A%0A                %7B?eqGene OBO:RO_0002200 ?disease . %7D%0A                UNION %7B?eqGene OBO:RO_0002326 ?disease . %7D%0A                UNION %7B?eqGene OBO:RO_0002607 ?disease . %7D%0A            %7D%0A        %22%22%22%0A%0Aquery_result = graph.query(query)%0Acount += len(list(query_result))%0Aprint(%22Gene-disease count: %7B0%7D%22.format(count))%0A%0Aquery = %22%22%22%0A            SELECT DISTINCT ?heritable_marker ?disease%0A            WHERE %7B%0A                ?heritable_marker a OBO:SO_0001500 .%0A%0A                %7B?heritable_marker OBO:RO_0002200 ?disease . %7D%0A                UNION %7B?heritable_marker OBO:RO_0002326 ?disease . %7D%0A                UNION %7B?heritable_marker OBO:RO_0002607 ?disease . %7D%0A            %7D%0A        %22%22%22%0Apcount = 0%0Aquery_result = graph.query(query)%0Apcount += len(list(query_result))%0Aprint(%22heritable phenotypic marker-disease count: %7B0%7D%22.format(pcount))

add omim gene-disease stats script