Skip to content

Instantly share code, notes, and snippets.

View eharkins's full-sized avatar

Elias Harkins eharkins

View GitHub Profile
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"description": "Shows the relationship between horsepower and the numbver of cylinders using tick marks.",
"data": {
"values":
[{"seq_id": ["5258-4"], "position": 7, "mut_from": "T", "mut_to": "I"}, {"seq_id": ["5258-4"], "position": 26, "mut_from": "S", "mut_to": "N"}, {"seq_id": ["5258-4"], "position": 39, "mut_from": "Y", "mut_to": "S"}, {"seq_id": ["5258-4"], "position": 57, "mut_from": "S", "mut_to": "Y"}, {"seq_id": ["5258-4"], "position": 107, "mut_from": "K", "mut_to": "R"}, {"seq_id": ["145307-1"], "position": 7, "mut_from": "T", "mut_to": "I"}, {"seq_id": ["145307-1"], "position": 22, "mut_from": "S", "mut_to": "A"}, {"seq_id": ["145307-1"], "position": 26, "mut_from": "S", "mut_to": "N"}, {"seq_id": ["145307-1"], "position": 39, "mut_from": "Y", "mut_to": "S"}, {"seq_id": ["145307-1"], "position": 45, "mut_from": "P", "mut_to": "Q"}, {"seq_id": ["145307-1"], "position": 57, "mut_from": "S", "mut_to": "Y"}, {"seq_id": [
def parse_fasta_string(fasta_string):
return dict([tuple(s.replace('\n', ':', 1).replace('\n','').split(':')) for s in fasta_string.split('>')[1:]])
{
"$schema": "https://vega.github.io/schema/vega/v4.json",
"width": 1000,
"height": 1000,
"padding": 5,
"signals": [
{ "name": "sortby", "value": "none",
"bind": {"input": "select", "options": ["none", "data.lbi", "data.lbr"]} },
{ "name": "method", "value": "cluster",
#!/usr/bin/env python
import os
import argparse
import subprocess
import csv
import sys
def parse_args():
parser = argparse.ArgumentParser(description='run cft bin/blast.py for seed clusters from partis yaml files specified in an input csv. write results to specified outdir.')
parser.add_argument(
import re
import sys
from Bio.SeqRecord import SeqRecord
from Bio import SeqIO
from Bio.Seq import Seq
"""
to calculate avg rate of inferred ambiguous nucleotides for many "ancestralStates" raxml-ng output files, do:
1. fd ancestralStates -x python amb_rate.py > amb_rates.txt
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import yaml
import argparse
import os
parser = argparse.ArgumentParser(description='Process some info.yaml.')
parser.add_argument('infile', type=str,
help='input info.yaml')
strain collection
1_0181_PF A Study
not_in_this_tree A Different Study