Skip to content

Instantly share code, notes, and snippets.

@dustine32
dustine32 / ibd_bp_modules.json
Last active November 15, 2023 01:53
BP modules data format mockup
[
{
"module_term": "GO:0048839",
"annotations": [
{
"ptn_id": "PTN002750520",
"label": "HARMONIN",
"term": "GO:0042491",
"leaf_genes": [
{
@dustine32
dustine32 / metabolic_gocams2genes.rq
Created July 28, 2022 23:49
Metabolic causal GO-CAMs-to-genes list query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX gomodel: <http://model.geneontology.org/>
PREFIX REACTO: <http://purl.obolibrary.org/obo/go/extensions/reacto.owl#>
PREFIX MF: <http://purl.obolibrary.org/obo/GO_0003674>
@dustine32
dustine32 / gocams2genes.rq
Last active July 28, 2022 17:42
Causal GO-CAMs-to-genes list query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX gomodel: <http://model.geneontology.org/>
PREFIX MF: <http://purl.obolibrary.org/obo/GO_0003674>
PREFIX causally_upstream_of_or_within: <http://purl.obolibrary.org/obo/RO_0002418>
@dustine32
dustine32 / slim_maker.py
Created October 12, 2021 15:16
Generate the PANTHER slim given a list of IBDs in GAF format
from ontobio.ontol_factory import OntologyFactory
from ontobio.assoc_factory import AssociationSetFactory
from ontobio.io.ontol_renderers import GraphRenderer, OboFormatGraphRenderer
from ontobio.io.gafparser import GafParser
from ontobio.util.go_utils import GoAspector
import argparse
import json
import os
parser = argparse.ArgumentParser()