Skip to content

Instantly share code, notes, and snippets.

View corneliusroemer's full-sized avatar

Cornelius Roemer corneliusroemer

View GitHub Profile
{
"$schema": "https://lnav.org/schemas/format-v1.schema.json",
"postgres2": {
"regex": {
"duration": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3} UTC) (?<ip>\\d+\\.\\d+\\.\\d+\\.\\d+)\\((?<port>\\d+)\\) (?<session_id>[^ ]+) (?<transaction_id>\\d+) (?<operation>[A-Z]+) ?(?<level>[A-Z]+)?: (?:duration: (?<dur>\\d+\\.\\d+) ms)?(?<body>.*)$"
}
},
"opid-field": "transaction_id",
"level-field": "level",
https://pathoplexus.org/
https://pathoplexus.org/about
https://pathoplexus.org/about/development-team
https://pathoplexus.org/about/eb
https://pathoplexus.org/about/faq
https://pathoplexus.org/about/governance
https://pathoplexus.org/about/governance/data-submission
https://pathoplexus.org/about/governance/eb-guidelines
https://pathoplexus.org/about/governance/minutes
https://pathoplexus.org/about/governance/minutes/2024-08-12_PathoplexusEBmeeting.pdf
@corneliusroemer
corneliusroemer / Newick.g4
Created December 19, 2023 01:59
ANTLR4 grammar for parsing Newick trees
// A Newick grammar based on the specification by Gary Olsen: available at
// https://phylipweb.github.io/phylip/newick_doc.html The grammar does _not_ include the optional
// comments as I have not figured out how to include them without adding a lot of `comment?` rules
// to the grammar whick makes it very slow.
grammar Newick;
tree: descendantList rootLabel? branchLength? SEMI;
descendantList: LPAREN subtree (COMMA subtree)* RPAREN;
subtree: (descendantList internalNodeLabel? | leafLabel) branchLength?;
@corneliusroemer
corneliusroemer / constraint_detector.py
Created December 17, 2023 11:31
Script to detect incompatible splits in two newick trees
import argparse
from pprint import pp
from Bio import Phylo
def get_terminals(clade):
return frozenset(terminal.name for terminal in clade.get_terminals())
@corneliusroemer
corneliusroemer / nearest_nodes.ndjson
Created December 1, 2023 14:48
Test data to reproduce polars bug
This file has been truncated, but you can view the full file.
{"seqName":"England/MILK-28D52E2/2021","nearestNodes":["B.1.617.2"]}
{"seqName":"USA/CO-CDPHE-2102374275/2021","nearestNodes":["B.1.617.2"]}
{"seqName":"Wales/PHWC-PGY3IH/2021","nearestNodes":["B.1.617.2"]}
{"seqName":"Turkey/HSGM-F70/2021","nearestNodes":["B.1.617.2"]}
{"seqName":"USA/WI-CDC-QDX31282160/2021","nearestNodes":["B.1.617.2"]}
{"seqName":"Canada/ON-SHL-21-02331/2021","nearestNodes":["B.1.617.2"]}
{"seqName":"France/BRE-IPP48628/2021","nearestNodes":["B.1.617.2"]}
{"seqName":"USA/CA-CDC-LC0396661/2021","nearestNodes":["B.1.617.2"]}
{"seqName":"France/OCC-HCL021227635901/2021","nearestNodes":["B.1.617.2"]}
@corneliusroemer
corneliusroemer / auto-faculty-profile.py
Created September 26, 2023 02:24
Automatically generate faculty profiles using pubmed abstracts and GPT-4, filtering papers for relevance based on author position
import argparse
from math import e
from Bio import Entrez
import openai
def search_latest_papers(faculty_name, source="Pubmed", num_papers=5):
papers_info = []
if source == "Pubmed":
Entrez.email = "YOUR_EMAIL@example.com"
@corneliusroemer
corneliusroemer / auto-faculty-profile.py
Created September 25, 2023 23:40
Automatically generate faculty profiles using pubmed abstracts and GPT-4
import argparse
from math import e
from Bio import Entrez
import openai
def search_latest_papers(faculty_name, source="Pubmed", num_papers=5):
abstracts = []
if source == "Pubmed":
This file has been truncated, but you can view the full file.
This file has been truncated, but you can view the full file.
@corneliusroemer
corneliusroemer / auspice.json
Created March 23, 2023 14:52
Test tree for Auspice PR #1655
This file has been truncated, but you can view the full file.