Skip to content

Instantly share code, notes, and snippets.

@bosborne
bosborne / make_dr_seqs.py
Last active January 18, 2022 17:23
Use `mash` k-mer analysis to create a decreased redundancy sequence protein sequence file
#!/usr/bin/env python3
import argparse
import os
import subprocess
import sys
from shutil import which
import tempfile
from collections import defaultdict
from Bio import SeqIO
@bosborne
bosborne / build_neo4j_db.py
Last active January 28, 2022 14:49
Make a Neo4J database for a collection of wines using py2neo
#!/usr/bin/env python3
'''
Use py2neo to create a Neo4J Wine database.
Data is stored in YAML files like this:
region: Cotes du Rhone
country: France
comment: Mostly Grenache. Thin, sour, unpleasant.
winemaker: Joseph Sabon
year: 2006
@bosborne
bosborne / query-nih-reporter.py
Last active December 12, 2023 02:08
Python code to query the NIH Reporter API
#!/usr/bin/env python3
import requests
import argparse
import re
from collections import defaultdict
'''
Query the v2 NIH Reporter API