Skip to content

Instantly share code, notes, and snippets.

View jsstevenson's full-sized avatar

James Stevenson jsstevenson

View GitHub Profile
{
"id": "moa.assertion:74",
"type": "Statement",
"description": "Secondary mutations in BCR-ABL may suggest resistance to imatinib in CML.",
"specifiedBy": {
"id": "moa.method:2021",
"type": "Method",
"name": "MOAlmanac (2021)",
"reportedIn": {
"type": "Document",
In [21]: input_data = {
...: "location": {
...: "end": 87894077,
...: "start": 87894076,
...: "sequenceReference": {
...: "refgetAccession": "SQ.ss8r_wB0-b9r44TQTMmVTI92884QvBiB",
...: "type": "SequenceReference"
...: },
...: },
...: "state": {
self = <botocore.awsrequest.AWSHTTPConnectionPool object at 0x11195bf50>, conn = <botocore.awsrequest.AWSHTTPConnection object at 0x1119d4b90>
method = 'POST', url = '/Execute'
body = b'{"sql": "DROP DATABASE IF EXISTS `varcat`;", "secretArn": "arn:aws:secretsmanager:us-east-1:123456789012:secret:dummy", "resourceArn": "arn:aws:rds:us-east-1:123456789012:cluster:dummy"}'
headers = {'Content-Type': b'application/json', 'User-Agent': b'Boto3/1.40.42 md/Botocore#1.40.42 ua/2.1 os/macos#24.6.0 md/arch...vocation-id': b'e1996f6f-cd92-4adf-9410-7fcac12dce9e', 'amz-sdk-request': b'attempt=5; max=5', 'Content-Length': '186'}
retries = Retry(total=False, connect=None, read=None, redirect=0, status=None), timeout = Timeout(connect=60, read=60, total=None)
chunked = False, response_conn = <botocore.awsrequest.AWSHTTPConnection object at 0x1119d4b90>, preload_content = False
decode_content = False, enforce_content_length = True
def _make_request(
self,
civic.eid:3811 can be loaded.
civic.eid:229 can be loaded.
civic.eid:4291 can be loaded.
civic.eid:4290 can be loaded.
civic.eid:4285 can be loaded.
civic.eid:4265 can be loaded.
civic.eid:885 can be loaded.
civic.eid:2994 can be loaded.
civic.aid:5 can be loaded.
civic.eid:2621 can be loaded.
@jsstevenson
jsstevenson / metakb_strenght_nodes.json
Created August 28, 2025 20:47
MetaKB Strength nodes
[
{
"n": {
"identity": 1625,
"labels": [
"Strength"
],
"properties": {
"mappings": "[{\"id\":null,\"extensions\":null,\"coding\":{\"id\":null,\"extensions\":null,\"name\":\"preclinical evidence\",\"system\":\"https://go.osu.edu/evidence-codes\",\"systemVersion\":null,\"code\":\"e000009\",\"iris\":null},\"relation\":\"exactMatch\"}]",
"primary_coding": "{\"id\":null,\"extensions\":null,\"name\":null,\"system\":\"https://civic.readthedocs.io/en/latest/model/evidence/level.html\",\"systemVersion\":null,\"code\":\"D\",\"iris\":null}",

uv notes

uv is a Python tool for managing dependencies, builds, and runtimes. Inspired by major players in other languages like cargo and npm. It should further simplify the hassle of dealing with Python runtimes and environments and I would strongly recommend switching over to it.

installation

  1. Cleanup

Get rid of pyenv

get DictReader for interactions TSV:

import csv
with open("~/Downloads/interactions.tsv") as f:
    next(f)  # skip header rows
    next(f)
    lines = list(csv.DictReader(f, delimiter="\t"))
# This file is autogenerated by maturin v1.7.6
# To update, run
#
# maturin generate-ci github -o tmp.yaml
#
name: CI
on:
push:
branches:
@jsstevenson
jsstevenson / bcl2_interaction_scores.txt
Last active November 25, 2024 15:27
SELECT g.name, d.name, i.score, i.gene_specificity, i.drug_specificity, i.evidence_score FROM interactions i LEFT JOIN genes g on g.id = i.gene_id LEFT JOIN drugs d on d.id = i.drug_id WHERE g.name = 'BCL2' ORDER BY i.score
name | name | score | gene_specificity | drug_specificity | evidence_score
------+------------------------------------------------------------+----------------------+---------------------+----------------------+----------------
BCL2 | BORTEZOMIB | 0.007488459062167905 | 0.17546867625942625 | 0.042676899500264064 | 1
BCL2 | CARBOPLATIN | 0.00757760738433657 | 0.17546867625942625 | 0.04318495782764816 | 1
BCL2 | DOCETAXEL ANHYDROUS | 0.007668903858846649 | 0.17546867625942625 | 0.04370525852436681 | 1
BCL2 | VINCRISTINE | 0.007858259509682369 | 0.17546867625942625 | 0.044784400710153646 | 1
BCL2 | DOXORUBICIN HYDROCHLORIDE | 0.008601608382219891 | 0.17546867625942625

misc notes

  • Dependencies on intake form seem incomplete -- OBI, Uberon?

  • treatment of 'history' is weird. BFO history (process) is imported but unreferenced. "smoking history" is defined as a "quality" but not as a subclass of "medical history".

Criteria

1. Ontology scope