Skip to content

Instantly share code, notes, and snippets.

View aabiddanda's full-sized avatar
👋

Arjun Biddanda aabiddanda

👋
View GitHub Profile
@aabiddanda
aabiddanda / .gitignore
Last active August 25, 2023 14:43
Prediction of selection in euploid embryos due to lethal mutations
*.png
*.pdf
@aabiddanda
aabiddanda / .flake8
Last active September 16, 2022 19:57
[flake8]
max-line-length = 120
exclude=
.git,
.github,
env,
venv,
build,
dist
ignore=
@aabiddanda
aabiddanda / README.md
Created July 8, 2021 09:32
Interpolating genetic map positions

Interpolating genetic maps

In order to run this script you would need to run:

python3 interp_genmap.py --snp test.snp --genmap test_chr20_22.txt --morgans True

the module requirements for this are:

"""
GANTT Chart with Matplotlib
Sukhbinder
Inspired from
https://sukhbinder.wordpress.com/2016/05/10/quick-gantt-chart-with-matplotlib/
"""
import datetime as dt
import matplotlib.pyplot as plt
import matplotlib.font_manager as font_manager
import matplotlib.dates
#!/usr/local/bin/python3
'''
Outputting audio representation of the
geography of a genetic variant (from 1000 Genomes)
'''
import argparse as arg
import subprocess as sp
import requests as req
# Function to convert R matrices to LaTeX
mat2tex <- function(mat, mat.name=NA){
mat.string <- "\\setcounter{MaxMatrixCols}{15}$$\n"
if (!is.na(mat.name)) {
mat.string <- paste(mat.string, mat.name, "=")
}
mat.string <- paste(mat.string, "\\begin{bmatrix} \n")
n <- dim(mat)[1]
m <- dim(mat)[2]
@aabiddanda
aabiddanda / mawkstats.sh
Last active February 8, 2016 23:05
Summary Stats in the Terminal
#Usage : <file> <column>
mawk_stats(){
file=$1
col=$2
mawk -v c=$col '{if(min==""){min=max=$c};
if($c > max){max=$c}; if($c < min){min=$c}; sum+=$c; n+=1}
END {printf "Min\tMax\tMean\tN\n%.3f\t%.3f\t%.3f\t%.0f\n",min, max ,sum/n, n}' $file
}