Skip to content

Instantly share code, notes, and snippets.

View lpasselin's full-sized avatar

Louis-Philippe Asselin lpasselin

View GitHub Profile
@hrldcpr
hrldcpr / tree.md
Last active June 8, 2024 18:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@casibbald
casibbald / 23andme_gene_synthesis.py
Last active September 2, 2021 13:48
Synthesise genes for a potential child from two 23andme profiles. This is a work in progress and my still have issues.
import argparse
import os
import zipfile
from collections import Counter
# gene_set = set(['rs2015343', 'rs12203592', 'rs4778136', 'rs9782955',
# 'rs4778138', 'rs3739070', 'rs11074314', 'rs11631797',
# 'rs12914687', 'rs1667394', 'rs3794604', 'rs3947367',
# 'rs4778241', 'rs7495174', 'rs7170869',