Skip to content

Instantly share code, notes, and snippets.

💭
too busy writing grants to commit code

Chris Mungall cmungall

💭
too busy writing grants to commit code
Block or report user

Report or block cmungall

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cmungall
cmungall / make_gdrive_index.py
Created Jun 12, 2019
Generate HTML index of a synced google drive folder. For me this is faster to search and navigate than the clunky slow google web interface. Pretty hacky code but it works for me
View make_gdrive_index.py
#!/usr/bin/env python3
import os
import re
import logging
import click
# don't index these
excludes = {
'single_files',
'Icon',
View clpfd_example.pl
% from https://twitter.com/mbeisen/status/1097569638555086851
:- use_module(library(clpfd)).
% xi where 1 <= xi <= M, 1 <= i <= N, sum(xi = 2M)
solve(M,N,L) :- length(L,N), L ins 1..M, sum(L,#=,M*2).
% use random_variable option when labeling results
test(M,N) :-solve(M,N,L), labeling([random_variable(5)],L), writeln(L), fail ; halt.
% TO RUN
@cmungall
cmungall / nucleus_query.pro
Created Oct 23, 2018
Example of bash datalog on GO
View nucleus_query.pro
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").
View 2018-10-01 PRERELEASE diff
## 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
View fetch-gene-info.py
#!/usr/bin/env python3
"""
Command line wrapper to mygene for bulk operations
Type:
bulkgene -h
For instructions
View has participant
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)
View metainterpreter
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) ),
View GraphQL examples for Translator
## Type Definitions (contract)
type Drug {
id: ID!
name: String!
drugInteractions: [DrugInteraction]
drugTargets: [DrugTarger]
}
type DrugTarget {
View scilink api.md
View Biological process refactor.md

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

You can’t perform that action at this time.