Skip to content

Instantly share code, notes, and snippets.

View jsstevenson's full-sized avatar

James Stevenson jsstevenson

View GitHub Profile
@jsstevenson
jsstevenson / gist:a5de75d9764082209b69f174dd8a557c
Created January 30, 2026 01:47
vaf_cbioportal_example_20260129.json
{
"type": "TumorVariantFrequencyStudyResult",
"id": "<figure out an ID rule>",
"focusVariant": "ga4gh:VA.kNnN0j0CvPaXeJyCmDFmTATjIwjPrJLn", // pretend there's a whole variation here. or catvar?
"affectedSampleCount": 2, // total # of samples in study w/ allele
"totalSampleCount": 34, // total # of samples in study
"affectedFrequency": 0.058824,
"sampleGroup": {
"id": "all_stjude_2015",
"label": "all_stjude_2015",
@jsstevenson
jsstevenson / gks_usage_stats_20260121.csv
Last active January 22, 2026 03:11
usage stats snapshot for gks/biocommons computational tools
name github_url gh_stars gh_forks gh_participants pypi_name last_month_pypi_downloads dh_pull_count total_ghcr_downloads
VRS https://github.com/ga4gh/vrs 94 38 58
VA-Spec https://github.com/ga4gh/va-spec 26 7 39
Cat-VRS https://github.com/ga4gh/cat-vrs 5 4 16
Metaschema Processor https://github.com/ga4gh/gks-metaschema 0 1 9 ga4gh.gks.metaschema 601
vrs-python https://github.com/ga4gh/vrs-python 61 39 48 ga4gh.vrs 19332 14
cat-vrs-python https://github.com/ga4gh/cat-vrs-python 1 4 5 ga4gh.cat-vrs 3786
va-spec-python https://github.com/ga4gh/va-spec-python 2 1 4 ga4gh.va-spec 3852
seqrepo https://github.com/biocommons/biocommons.seqrepo 47 35 54 biocommons.seqrepo 67234 26225
hgvs https://github.com/biocommons/hgvs 287 98 141 hgvs 61932 245
@jsstevenson
jsstevenson / software_stats.py
Last active January 22, 2026 04:41
simple script to grab snapshot of basic usage stats for specific libs of interest
# /// script
# dependencies = [
# "requests",
# ]
# ///
import os
from pathlib import Path
from datetime import datetime
import csv
import requests
{
"assertions":{
"id":"metakb:id that sums up the proposition parts",
"type":"Statement",
"specifiedBy":{
"id":"metakb.method:2026",
"type":"Method",
"name":"MetaKB (2026)",
"reportedIn":{
"type":"Document",
{
"id": "metakb.placeholder:1",
"type": "Statement",
"specifiedBy": { "id": "placeholder" },
"proposition": {
"type": "VariantTherapeuticResponseProposition",
"subjectVariant": {
"id": "catvar equivalent of GA4GH.VAxxxx from below, we can come up with something",
"content": "the catvar etc"
},
{
"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}",