Skip to content

Instantly share code, notes, and snippets.

View ar0ch's full-sized avatar
🔬
Doing sciencey things

Aroon Chande ar0ch

🔬
Doing sciencey things
View GitHub Profile
@ar0ch
ar0ch / create_forked_task.R
Created April 3, 2018 13:10 — forked from jcheng5/create_forked_task.R
Concurrent, forked, cancellable tasks in Shiny
library(shiny)
# Also uses parallel, shinyjs, tools
# Create a long-running task, executed in a forked process. (Doesn't work on Windows)
#
# The return value is a promise-like object with three
# methods:
# - completed(): FALSE initially, then TRUE if the task succeeds,
# fails, or is cancelled. Reactive, so when the state changes
# any reactive readers will invalidate.
#!/usr/bin/env python
import sys
import os
import re
import shutil
import xml.etree.ElementTree as ET
try:
from urllib.request import urlopen, urlretrieve
except ImportError:
from urllib import urlopen, urlretrieve
@ar0ch
ar0ch / cel2vcf.sh
Last active March 28, 2022 00:58
Convert CEL to VCF with PLINK
#!/bin/bash
mkdir lgen plnk vcf
for i in folder_of_CELs/*;do
j=`basename $i`
cat $i |tail -n +14 | pee "awk -F '\t' '{print \"FAMID\",\$1,\$2,\$5,\$6}' > lgen/$j.lgen" \
"awk -F '\t' '{print \$3,\$2,'0',\$4}' > lgen/$j.map" \
"awk -F'\t' '{print "FAMID",$1,'0','0','0','0'}' > lgen/$j.fam"
plink --lgen lgen/$j.lgen --fam lgen/$j.fam --map lgen/$j.map --make-bed --out plink/$j
plink --lgen lgen/$j.lgen --fam lgen/$j.fam --map lgen/$j.map --recode vcf --out vcf/$j
done
@ar0ch
ar0ch / migrate_repos.sh
Created May 12, 2020 16:49
Migrate github.gatech.edu repos to public
#!/bin/bash
year=2020
for i in {1..3}; do
for j in {WebServer,ComparativeGenomics,FunctionalAnnotation,GenePrediction,GenomeAssembly};do
gh repo create -t compgenomics${year} Team${i}-${j}
git clone [email protected]:compgenomics${year}/Team${i}-${j}.git
cd Team${i}-$j;
git remote add github [email protected]:compgenomics${year}/Team${i}-$j;
git push -u github master;
cd ../
@ar0ch
ar0ch / zola_export_to_address.py
Last active April 16, 2024 06:04
Zola guest list CSV to formatted addresses
"""Quick and dirty transform of the Zola guest list CSV export to formatted addresses"""
import csv
from dataclasses import dataclass
from pathlib import Path
from typing import Optional, Union
@dataclass
class Address: