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
change definition of GO:0000008 from 'OBSOLETE. A small disulfide-containing redox protein that serves as a general protein disulfide oxidoreductase. Interacts with a broad range of proteins by a redox mechanism, based on the reversible oxidation of 2 cysteine thiol groups to a disulfide, accompanied by the transfer of 2 electrons and 2 protons. The net result is the covalent interconversion of a disulfide and a dithiol.' to 'OBSOLETE. A small disulfide-containing redox protein that serves as a general protein disulfide oxidoreductase. Interacts with a broad range of proteins by a redox mechanism, based on the reversible oxidation of 2 L-cysteine thiol groups to a disulfide, accompanied by the transfer of 2 electrons and 2 protons. The net result is the covalent interconversion of a disulfide and a dithiol.'
change definition of GO:0000096 from 'The chemical reactions and pathways involving amino acids containing sulfur, comprising cysteine, homocysteine, methionine and selenocysteine.' to 'The chemical react
@cmungall
cmungall / biobank-specimens-hacked.csv
Created March 4, 2024 23:25
A modified version of obi biobank specimens with some definitions intentionally removed
ontology ID label definition
ID A rdfs:label A definition
OBI:0002500 amniotic fluid specimen A specimen that is derived from amniotic fluid.
OBI:0002501 bile specimen A specimen that is derived from bile.
OBI:0002502 cerebrospinal fluid specimen A specimen that is derived from cerbrospinal fluid.
OBI:0002503 feces specimen A specimen that is derived from feces.
OBI:0002504 digestive system fluid or secretion specimen A specimen that is derived from digestive system fluid or secretion.
OBI:0002505 milk specimen A specimen that is derived from milk.
OBI:0002506 pericardial fluid specimen A specimen that is derived from pericardial fluid.
OBI:0002507 saliva specimen A specimen that is derived from saliva.
@cmungall
cmungall / antibody-purification-with-intentional-mistake.csv
Created March 4, 2024 22:14
antibody-purification-with-intentional-mistake.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 16 columns, instead of 1. in line 3.
id,rdfs label,editor preferred term,has curation status,alternative term,definition,definition source,example of usage,term editor,editor note,curator note,ontology term requester,term tracker item,logical type,parent,output
ID,A rdfs:label,A editor preferred term,AI has curation status,A alternative term SPLIT=|,A definition SPLIT=|,A definition source SPLIT=|,A example of usage SPLIT=|,A term editor SPLIT=|,A editor note SPLIT=|,A curator note SPLIT=|,A ontology term requester SPLIT=|,A term tracker item SPLIT=|,CLASS_TYPE,C %,C has_specified_output some %
OBI:0003616,antibody purification of MHC class I protein complex,,,,"An antibody purification of MHC protein complex to separate a material entity into different compositions of which one fraction contains a higher concentration of MHC class I protein complex, while others contain impurities and are not of interest.",Randi Vita,,Randi Vita|Sebastian Duesing,,,,,equivalent,antibody purification of MHC protein complex,MHC class I protein complex
OBI:0003617
@cmungall
cmungall / biobank-specimens.csv
Created March 4, 2024 21:50
obi-biobank-specimens
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 18 columns, instead of 15. in line 2.
ontology ID,label,editor preferred term,has curation status,alternative term,definition,definition source,example of usage,term editor,editor note,curator note,ontology term requester,term tracker item,logical type, specimen collection process,gross anatomical part,collection process input,URI
ID,A rdfs:label,A editor preferred term,AI has curation status,A alternative term,A definition,A definition source SPLIT=|,A example of usage SPLIT=|,A term editor SPLIT=|,A editor note SPLIT=|,A curator note SPLIT=|,A ontology term requester,A term tracker item,CLASS_TYPE,C specimen and (is_specified_output_of some %),C specimen and (is_specified_output_of some 'specimen collection process') and ('derives from' some %),C specimen and (is_specified_output_of some ('specimen collection process' and has_specified_input some %)),
OBI:0002500,amniotic fluid specimen,,ready for release,,A specimen that is derived from amniotic fluid.,"Chris Stoeckert, Penn Medicine Biobank",,Chris Stoeckert,,,,,equivalent,collecting specimen
@cmungall
cmungall / gist:3930c9d63a0cd53b1a05207393cee816
Created July 14, 2023 18:47
non-locatable uberon structures
uberon info .desc//p=i "anatomical structure" .not .desc//p=i,p [ "organism subdivision" "organ" ]
http://purl.obolibrary.org/obo/UBERON_0003072 ! optic cup
http://purl.obolibrary.org/obo/UBERON_0008188 ! tendon of biceps brachii
http://purl.obolibrary.org/obo/UBERON_0005719 ! footplate apical ectodermal ridge
http://purl.obolibrary.org/obo/UBERON_0004468 ! set of muscles of vertebral column
http://purl.obolibrary.org/obo/UBERON_0009614 ! hindbrain neural plate
http://purl.obolibrary.org/obo/UBERON_0017615 ! vomerine dentition
http://purl.obolibrary.org/obo/UBERON_8480009 ! tendon of semitendinosus
http://purl.obolibrary.org/obo/UBERON_0005240 ! basal plate medulla oblongata
@cmungall
cmungall / gist:27d726d42d03b85b7cfe275518310225
Created July 14, 2023 18:46
non-locatable uberon structures
http://purl.obolibrary.org/obo/UBERON_0003072 ! optic cup
http://purl.obolibrary.org/obo/UBERON_0008188 ! tendon of biceps brachii
http://purl.obolibrary.org/obo/UBERON_0005719 ! footplate apical ectodermal ridge
http://purl.obolibrary.org/obo/UBERON_0004468 ! set of muscles of vertebral column
http://purl.obolibrary.org/obo/UBERON_0009614 ! hindbrain neural plate
http://purl.obolibrary.org/obo/UBERON_0017615 ! vomerine dentition
http://purl.obolibrary.org/obo/UBERON_8480009 ! tendon of semitendinosus
http://purl.obolibrary.org/obo/UBERON_0005240 ! basal plate medulla oblongata
http://purl.obolibrary.org/obo/UBERON_0001999 ! iliopsoas
http://purl.obolibrary.org/obo/UBERON_0003854 ! spinal cord neural plate
```sql
sqlite> attach 'db/orcid.db' as orcid_db;
sqlite> select * from contributor inner join orcid_db.orcid on (orcid.id=contributor.object) where orcid.label like 'Chris%';
obo:cl.owl|obo:cl.owl|dcterms:contributor|orcid:0000-0002-6601-2165||||orcid:0000-0002-6601-2165|Christopher J. Mungall
CL:0010001|CL:0010001|dcterms:contributor|orcid:0000-0002-6601-2165||||orcid:0000-0002-6601-2165|Christopher J. Mungall
CL:0010002|CL:0010002|dcterms:contributor|orcid:0000-0002-6601-2165||||orcid:0000-0002-6601-2165|Christopher J. Mungall
CL:0010003|CL:0010003|dcterms:contributor|orcid:0000-0002-6601-2165||||orcid:0000-0002-6601-2165|Christopher J. Mungall
CL:0010004|CL:0010004|dcterms:contributor|orcid:0000-0002-6601-2165||||orcid:0000-0002-6601-2165|Christopher J. Mungall
UBERON:0000093|UBERON:0000093|dcterms:contributor|orcid:0000-0002-6601-2165||||orcid:0000-0002-6601-2165|Christopher J. Mungall
UBERON:0000094|UBERON:0000094|dcterms:contributor|orcid:0000-0002-6601-2165||||orcid:0000-0002-6601-2165|Christopher J. M
@cmungall
cmungall / oak-definitions.md
Created November 18, 2022 00:25
Fetching definitions with OAK
@cmungall
cmungall / make_gdrive_index.py
Created June 12, 2019 01:46
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
#!/usr/bin/env python3
import os
import re
import logging
import click
# don't index these
excludes = {
'single_files',
'Icon',
% 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