The purpose of this script is to assist in connecting all contributors to OBO Foundry ontologies to Wikidata pages via their GitHub usernames. Here's a screencast of me explaining this and showing some demo curations: https://www.youtube.com/watch?v=ERJyrh7UIbg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""This file contains code that implements the original ID* algorithm. | |
The algorithm is described in the paper "Complete Identification Methods for the Causal Hierarchy" | |
but the algorithm itself is not complete, as there are identifiable queries that cannot be | |
identified with this algorithm. | |
""" | |
import logging | |
from typing import Collection, Set, Tuple, cast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import pystow | |
import requests | |
from bioregistry.external import get_obofoundry | |
from tqdm.auto import tqdm | |
TOKEN = pystow.get_config("github", "token") | |
TEXT_FORMAT = """\ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bioregistry | |
def main(): | |
"""Identify resources with uncurated bananas.""" | |
for resource in bioregistry.resources(): | |
pattern = resource.get_pattern() | |
if not pattern: | |
continue | |
for peel in ":_-": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Get Journal of Cheminformatics DOIs.""" | |
import requests | |
import pystow | |
MODULE = pystow.module("jcheminf", "volumes") | |
USER = "egonw" # alternative use first-party jcheminform if it ever gets updated | |
REPO = "jcheminform-kb" | |
BRANCH = "main" | |
PREFIX = "https://doi.org/10.1186/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Update the dependencies.""" | |
import json | |
from pathlib import Path | |
from typing import Iterable, Optional | |
import bioontologies | |
import bioregistry | |
import click | |
from bioontologies.obograph import Graph |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.