Skip to content

Instantly share code, notes, and snippets.

@hmartiniano
hmartiniano / king.py
Created March 17, 2024 20:04 — forked from johnbowes/king.py
Select related individuals for exclusion based on output from KING
#!/usr/bin/python
# Run KING to generate sample QC and IBD summary stats
# ./king_1.9 -b <data>.bed --bysample --prefix <prefix_for_output>
# ./king_1.9 -b <data>.bed --kinship --related --degree 2 --prefix <prefix_for_output>
#
# Run this script to create a list of exclusions (member of pair with least data will be excluded)
# python king.py --prefix <prefix_for_output> --out <output_file_name>
# Add error if no samples in kinship file.
#!/usr/bin/env python
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2016-08-26 13:20:35 (UTC+0200)
# DSSP_SECONCARY.PY
# Trajectories of Secondary Structure by DSSP
# The keys [" ","B","E","G","H","I","T","S"]
@hmartiniano
hmartiniano / assotest.py
Created January 12, 2017 12:16 — forked from brentp/assotest.py
c-alpha test in python. copied from AssotesteR. and rpy2 wrapper for all functions in AssotesteR
"""
C-alpha test for rare variants. Copied from AssotesteR
Only reports the permutation p-value, not the asymptotic
This also wraps all of the functions in R's AssotesteR using
rpy2. Any function available in AssotesteR, e.g. CALPHA is
availailable here has r_calpha().
The args are always
casecon: a list of 0's, 1's indicating case/control status