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 / 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:
@ar0ch
ar0ch / addblastdb.sh
Last active May 6, 2022 03:38
Automatically create blastdb + restart sequence server
#!/bin/bash
j=$(basename $1)
/usr/bin/makeblastdb -in $1 -dbtype $2 -title $j
killall sequenceserver
/usr/bin/screen -dmS ss /usr/local/bin/sequenceserver -d=/home//blast/public/blast/ -H 127.0.0.1 -p 4567 > /dev/null
exit
@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 git@github.gatech.edu:compgenomics${year}/Team${i}-${j}.git
cd Team${i}-$j;
git remote add github git@github.com:compgenomics${year}/Team${i}-$j;
git push -u github master;
cd ../
@ar0ch
ar0ch / keybase.md
Last active September 9, 2019 17:48

Keybase proof

I hereby claim:

  • I am ar0ch on github.
  • I am arch (https://keybase.io/arch) on keybase.
  • I have a public key whose fingerprint is 0DED DFD3 2FDF 7B78 C66C 6FA2 43B4 7A53 432D E7B0

To claim this, I am signing this object:

#!/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 / 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.
@ar0ch
ar0ch / C_011283.fasta
Created March 26, 2018 14:41
NifGenes
This file has been truncated, but you can view the full file.
>NC_011283.1
gttcgagtggagtccgccgtgtcactttcgctttggcagcagtgtcttgc
ccgattgcaggatgagttaccagccacagaattcagcatgtggatccgcc
cattgcaggcggaactgagcgataacacgctggcactgtatgcgccaaac
cgttttgtgctcgactgggtaagggacaaatacctcaataatatcaatgg
actcctcaatgacttttgcggtgctgatgccccgcagctgcgttttgagg
tgggtgctaagccagccagctcgctgcagaaaggagcggtaagcccggct
gcggcggccattccggcggcgcaggtgcagaccgcgcgcgtggcgccgac
gatcgtgcgcccaggctgggataatgtcccggcgccagcggagccgacct
accgctctaacgttaacgtgaaacacacgtttgataacttcgtcgaaggt
>NC_011283.1:1770808-1774323
atgtccggaaacatgaaaacaatggatggcaacacggcggcggcctggatctcctacgcc
tttaccgacgtggcggccatctaccccatcaccccctccacgccgatggcggaaaatgtc
gatgaatgggccgctaaggggaaaaagaatctgtttggccagccggtgcgcctgatggag
atgcaatccgaagccggtgccgccggggcggtgcacggcgcgctgcaggcgggagcgctc
accaccacctacaccgcgtcgcaggggctgctgctgatgatccccaatttgtacaaaatt
gccggtgaactgctgccgggtgtttttcacgtcagcgcgcgggcgctggcgaccaattcg
ctgaatatttttggcgaccaccaggacgtgatggcggtacggcagaccggctgcgccatg
ctggtggagaataacgttcagcaggtgatggacctgtcggcggtggcgcacctggcggcg
atcgccgggcggatcccgtttatcaactttttcgacggctttcgcacctcgcacgaaata
>Illumina_DpnII_expression_PCR_Primer_2
AATGATACGGCGACCACCGACAGGTTCAGAGTTCTACAGTCCGA
>Illumina_Single_End_Sequencing_Primer
ACACTCTTTCCCTACACGACGCTCTTCCGATCT
>custom3
AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT
>Illumina_DpnII_expression_Sequencing_Primer
CGACAGGTTCAGAGTTCTACAGTCCGACGATC
>Illumina_Multiplexing_PCR_Primer_2.01
GTGACTGGAGTTCAGACGTGTGCTCTTCCGATCT