Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am duxan on github.
  • I am duxan (https://keybase.io/duxan) on keybase.
  • I have a public key ASAtxXTtmDA77LmCOIgQaZmt_nXHO9C_otIy1eRFXqTeJQo

To claim this, I am signing this object:

@duxan
duxan / keybase.md
Created April 17, 2021 22:20
keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@duxan
duxan / parse_maf.sh
Created April 20, 2017 15:40
Bash script to parse MAF (minor allele frequency) for minor allele (second most frequent allele) from VCFtools .frq files.
#!/bin/bash
sed 1d $1 | while read line
do
CHROM=`echo $line | awk '{print $1}'`
POS=`echo $line | awk '{print $2}'`
num_alleles=`echo $line | awk '{print $3}'`
num_chroms=`echo $line | awk '{print $4}'`
mafs=()
@duxan
duxan / server.R
Created March 7, 2016 10:32 — forked from sidderb/server.R
A Shiny/R app to display the Illumina human body map dataset. I have not included the expression data due to it's size (19Gb) but this should work with any RNA-seq data set analysed with a TopHat->Cufflinks->CuffDiff pipeline.
library(shiny)
library(deSolve)
library(cummeRbund)
# load cuffDiff data, must be in top dir and called cuffData.db:
cuff = readCufflinks()
shinyServer(function(input,output) {
getData = reactive(function() {
# 1. set WD
setwd("C:/Users/Core-i5/Desktop/dataSci/3 Getting data/W3") # NOTE: change this PATH
# 2. make folder
if(!file.exists("./data")){
dir.create("./data")
}
# 3. make handle
fileURL <- "https://github.com/DataScienceSpecialization/courses/blob/master/03_GettingData/dplyr/chicago.rds?raw=true"
@duxan
duxan / README.md
Created June 30, 2014 20:13 — forked from mloughran/README.md
EventMachine basic example

Getting started

First add your twitter username and password. Then server.rb and once it's started open websocket.html in your browser. You should see some tweets appear. If not take a look at the javascript console.

{
"@context": {
"dc": "http://purl.org/dc/elements/1.1/",
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"@vocab": "http://purl.org/dc/elements/1.1/",
"admin": null,
"id": null,
"_id": null,
"ingestionSequence": null,
hr {
width: 30%;
margin: 30px 0;
}