Skip to content

Instantly share code, notes, and snippets.

View cmungall's full-sized avatar
💭
linkml hacking

Chris Mungall cmungall

💭
linkml hacking
View GitHub Profile
@cmungall
cmungall / nucleus_query.pro
Created October 23, 2018 00:10
Example of bash datalog on GO
rel(S,P,O) :~ cat relationships.tsv
anc(S,O) :- rel(S,_,O).
anc(S,O) :- anc(S,Z),anc(Z,O).
main(X) :- anc(X, "GO:0005634").
## Original Ontology
* IRI: http://purl.obolibrary.org/obo/ro.owl
* VersionIRI: http://purl.obolibrary.org/obo/ro/releases/2018-05-11/ro.owl
## New Ontology
* IRI: http://purl.obolibrary.org/obo/ro.owl
#!/usr/bin/env python3
"""
Command line wrapper to mygene for bulk operations
Type:
bulkgene -h
For instructions
Proposed schema for evolved processes. Evolved processes are either (1) the realization of a single function (2) a causally connected mereological sum of (1)s
The schema could be generalized to other processes arise from non-evolved functions such as building a house.
For simplicity this initial elucidation focuses on evolved processes (aka biological programs).
Subsubmption hierarchy (`P` = process, `C` = independent continuant, `Q` = quality)
* enabled by (aka has agent) `P->C`
* has participant `P->C`
* modifies or consumes (aka has initial participant)
fact(is_a(a,b)).
fact(is_a(b,c)).
rule((is_aT(A,B) :- is_a(A,B))).
rule((is_aT(A,B) :- is_a(A,Z),is_aT(Z,B))).
prove(Goal,[Goal]) :-
fact(Goal).
prove(Goal, [Rule|Steps]) :-
Rule = rule( (Goal :- Body) ),
## Type Definitions (contract)
type Drug {
id: ID!
name: String!
drugInteractions: [DrugInteraction]
drugTargets: [DrugTarger]
}
type DrugTarget {

Bold Hypothesis: GO BPs can be cleanly separated into cellular processes and larger processes formed from assemblages of these. Any process should be diagrammable. If the diagram is expressed using cell parts and molecules, it is cellular. If the diagram is expressed using cells or tissues it is at a larger level of organization.

Additionally, we may have grouping classes which can abstract over both branches, in terms of some objective or phenotype. Examples are: growth (to increase the size of the organism or a part), immune system

@cmungall
cmungall / README.md
Created November 30, 2015 15:09
No name

README is empty

@cmungall
cmungall / gist:9865999
Created March 30, 2014 01:41
uberon diffability output
fmt,num,diffsize,iteration
owl,1,250481,1
ofn,1,15,1
obo,1,2,1
ttl,1,245804,1
omn,1,22,1
owl,2,249967,1
ofn,2,12,1
obo,2,8,1
ttl,2,245001,1