Skip to content

Instantly share code, notes, and snippets.

View dyndna's full-sized avatar
💤
Moved to @sbamin

Samir B. Amin dyndna

💤
Moved to @sbamin
View GitHub Profile
@dyndna
dyndna / docker_fix_centos.md
Created April 7, 2015 01:05
[Solved] docker does not run on cent os 6.6

Issue:

Upon sudo service docker start, docker daemon fails to start with tail /var/log/docker showing following error:

time="2015-04-07T00:28:43Z" level="info" msg="+job serveapi(unix:///var/run/docker.sock)" 
time="2015-04-07T00:28:43Z" level="info" msg="WARNING: You are running linux kernel version 2.6.32-504.12.2.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0." 
time="2015-04-07T00:28:43Z" level="info" msg="Listening for HTTP on unix (/var/run/docker.sock)" 
time="2015-04-07T00:28:45Z" level="fatal" msg="Error loading device metadata file .tmp529617825" 
sudo cp /etc/bluetooth/main.conf /etc/bluetooth/main.conf.OLD
sudo nano /etc/bluetooth/main.conf

#Search for the entry:
InitiallyPowered = true

#and change the value to:
InitiallyPowered = false
@dyndna
dyndna / bed_to_gtf_pcawg14_gtf.md
Created May 21, 2015 19:05
bed to gtf conversion for PCAWG14 extended set of annotations

bed to gtf conversion for syn3606092 file, rnaseq.gc19_extNc.bed was done as follows:

Ref.: http://onetipperday.blogspot.com/2012/08/convert-bed-to-gtf.html

#wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bedToGenePred
#wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/genePredToGtf
<workdir>/scripts/bedToGenePred rnaseq.gc19_extNc.bed rnaseq.gc19_extNc.btgp.genepred
<workdir>/scripts/genePredToGtf file rnaseq.gc19_extNc.btgp.genepred rnaseq.gc19_extNc.gptg.gtf
@dyndna
dyndna / diskstats.sh
Last active December 9, 2015 17:19
disk usage summary per user
#!/bin/bash
# Find disk usage per base directory, per user
# http://unix.stackexchange.com/a/77509/28675
# http://stackoverflow.com/a/32533111/1243763
BASEDIR="$1"
MYTIME="$(date +%d%b%y_%H%M%S%Z)"
if [ -z "$BASEDIR" ] || [ ! -d "$BASEDIR" ]; then

Keybase proof

I hereby claim:

  • I am dyndna on github.
  • I am sbamin (https://keybase.io/sbamin) on keybase.
  • I have a public key whose fingerprint is FC90 E95D 5E01 4D54 26FF 1163 13B4 0CB3 1EAE A07B

To claim this, I am signing this object:

@dyndna
dyndna / tensorflow_in_r_using_rpython.R
Created March 24, 2016 20:28 — forked from rasmusab/tensorflow_in_r_using_rpython.R
An example of building a TensorFlow model from R using rPython
### An example of building a TensorFlow model from R using rPython ###
# For this script you need to
# 1. Have python 2.7 installed.
# 2. Install the rPython package in R.
# 3. Install Google's TensorFlow library as per these instructions:
# http://www.tensorflow.org/get_started/os_setup.md#binary_installation
### Here is how to setup and run a trivial TensorFlow model ###
# Load TensorFlow (I couldn't get this to work without setting sys.argv... )
@dyndna
dyndna / mpibzip2_makefile
Last active April 26, 2016 22:42
Makefile for mpibzip2: How to compile on cluster machine running Cent OS 6
#### Parallel MPI BZIP2
## See man doc at http://compression.ca/mpibzip2/
### for .tar or tar.bz2 files,
## mpirun -np 4 mpibzip2 myfile.tar or mpirun -np 4 mpibzip2 myfile.tar.bz2
### for tar.gz files, see pigz at http://serverfault.com/a/270825/149084
## pigz -dk -p 4 target.tar.gz | tar -xf
# remove -k to delete original file after decompression.
# Make file for MPI BZIP2
SHELL=/bin/sh
@dyndna
dyndna / get_oauth2_token.py
Last active April 28, 2016 19:37 — forked from burnash/get_oauth2_token.py
Simple command line script to fetch a Google API's access token.
'''
This script will attempt to open your webbrowser,
perform OAuth 2 authentication and print your access token.
It depends on two libraries: oauth2client and gflags.
To install dependencies from PyPI:
$ pip install python-gflags oauth2client
@dyndna
dyndna / entrez_ensg_conversion.R
Created April 29, 2016 23:22
Convert between Ensembl gene ID and Entrez gene id/symbol
#### Get gene annotations ####
# By Michael Love, http://www.bioconductor.org/help/workflows/rnaseqGene/
library("AnnotationDbi")
library("org.Hs.eg.db")
columns(org.Hs.eg.db)
convertIDs <- function( ids, from, to, db, ifMultiple=c("putNA", "useFirst")) {
stopifnot( inherits( db, "AnnotationDb" ) )
ifMultiple <- match.arg( ifMultiple )
@dyndna
dyndna / circos_install_ubuntu_1404.md
Last active May 7, 2016 15:21
Install circos on ubuntu 14.04 LTS