Skip to content

Instantly share code, notes, and snippets.

View corneliusroemer's full-sized avatar

Cornelius Roemer corneliusroemer

View GitHub Profile
@corneliusroemer
corneliusroemer / auspice.json
Created March 8, 2023 18:25
Tree with log_priors
This file has been truncated, but you can view the full file.
{"version":"v2","meta":{"title":"SARS-CoV-2 phylogeny","updated":"2023-03-08","build_url":"https://github.com/neherlab/nextclade_data_workflows","maintainers":[{"name":"Cornelius Roemer","url":"https://neherlab.org"},{"name":"Richard Neher","url":"https://neherlab.org"}],"display_defaults":{"color_by":"clade_membership","distance_measure":"div","map_triplicate":false,"branch_label":"clade","transmission_lines":false},"genome_annotations":{"nuc":{"end":29903,"start":1,"strand":"+","seqid":"defaults/reference_seq.gb","type":"source"},"E":{"end":26472,"seqid":"defaults/reference_seq.gb","start":26245,"strand":"+","type":"CDS"},"M":{"end":27191,"seqid":"defaults/reference_seq.gb","start":26523,"strand":"+","type":"CDS"},"N":{"end":29533,"seqid":"defaults/reference_seq.gb","start":28274,"strand":"+","type":"CDS"},"ORF1a":{"end":13468,"seqid":"defaults/reference_seq.gb","start":266,"strand":"+","type":"CDS"},"ORF1b":{"end":21555,"seqid":"defaults/reference_seq.gb","start":13468,"strand":"+","type":"CDS"},"ORF3a":{"
@corneliusroemer
corneliusroemer / add-branch-labels.py
Created February 22, 2023 19:49
Script to add node data as branch label
import argparse
import json
def extract_attribute(node_data, attribute: str) -> dict[str, str]:
data = {}
for name, node in node_data["nodes"].items():
if attribute in node:
data[name] = node[attribute]
return data
[tool.poetry]
name = "nwkfmt"
version = "0.1.0"
description = "Simple Newick tree validator and formatter"
authors = ["Cornelius Roemer <[email protected]>"]
readme = "README.md"
[tool.poetry.scripts]
greet = "nwkfmt.cli:main"
>MN908947 (Wuhan-Hu-1/2019)
TTELLFLVMFLLTTKRTMFVFLVLLPLVSSQCVNLTTRTQLPPAYTNSFTRGVYYPDKVFRSSVLHSTQDLFLPFFSNVTWFHAIHVSGTNGTKRFDNPVLPFNDGVYFASTEKSNIIRGWIFGTTLDSKTQSLLIVNNATNVVIKVCEFQFCNDPFLGVYYHKNNKSWMESEFRVYSSANNCTFEYVSQPFLMDLEGKQGNFKNLREFVFKNIDGYFKIYSKHTPINLVRDLPQGFSALEPLVDLPIGINITRFQTLLALHRSYLTPGDSSSGWTAGAAAYYVGYLQPRTFLLKYNENGTITDAVDCALDPLSETKCTLKSFTVEKGIYQTSNFRVQPTESIVRFPNITNLCPFGEVFNATRFASVYAWNRKRISNCVADYSVLYNSASFSTFKCYGVSPTKLNDLCFTNVYADSFVIRGDEVRQIAPGQTGKIADYNYKLPDDFTGCVIAWNSNNLDSKVGGNYNYLYRLFRKSNLKPFERDISTEIYQAGSTPCNGVEGFNCYFPLQSYGFQPTNGVGYQPYRVVVLSFELLHAPATVCGPKKSTNLVKNKCVNFNFNGLTGTGVLTESNKKFLPFQQFGRDIADTTDAVRDPQTLEILDITPCSFGGVSVITPGTNTSNQVAVLYQDVNCTEVPVAIHADQLTPTWRVYSTGSNVFQTRAGCLIGAEHVNNSYECDIPIGAGICASYQTQTNSPRRARSVASQSIIAYTMSLGAENSVAYSNNSIAIPTNFTISVTTEILPVSMTKTSVDCTMYICGDSTECSNLLLQYGSFCTQLNRALTGIAVEQDKNTQEVFAQVKQIYKTPPIKDFGGFNFSQILPDPSKPSKRSFIEDLLFNKVTLADAGFIKQYGDCLGDIAARDLICAQKFNGLTVLPPLLTDEMIAQYTSALLAGTITSGWTFGAGAALQIPFAMQMAYRFNGIGVTQNVLYENQKLIANQFNSAIGKIQDSLSSTASALGKLQDVVNQNAQALNTLVKQLSSNFGAISSVLND
{
"nucMutLabelMap": {
"A10195G": [
"20I (Alpha, V1)"
],
"A10317G": [
"21J (Delta)"
],
"A10323G": [
"21J (Delta)",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@corneliusroemer
corneliusroemer / JQfix
Created April 23, 2020 16:12
JQ fix of inconsistent timestamps
jq 'if .topic == "devices_overview" then .timestamp = (.timestamp * 1000 | round | tostring) else . end' <out
@corneliusroemer
corneliusroemer / diffscript
Created April 21, 2020 15:05
Comparing text files, only changed lines shown, changed words color highlighted
diff -U 0 gry gryold | wdiff -d | colordiff
@corneliusroemer
corneliusroemer / findgunzip.sh
Last active April 16, 2020 14:46
Extract and concatenate all .gz files in all subdirectories into a new text file without touching the original files
find . -name '*.gz' -exec gzip -ckd {} + > test.txt