Skip to content

Instantly share code, notes, and snippets.

View yk-tanigawa's full-sized avatar

Yosuke Tanigawa yk-tanigawa

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yk-tanigawa
yk-tanigawa / file0.txt
Created February 23, 2016 02:34
NCBI SRA (Short Read Archive) 形式から fastq 形式に変換する Makefile ref: http://qiita.com/yk-tanigawa/items/f78834d697daf23378b0
## commands
FASTQ-DUMP = /somewhere/fastq-dump
## files
FASTQ1 = $(SRA:%.sra=%_1.fastq)
FASTQ2 = $(SRA:%.sra=%_2.fastq)
all: $(FASTQ1) $(FASTQ2)
# obtain the paired-end fastq files from a given sra file
#usage: make SRA=XXXXX.sra
## commands
FASTQ-DUMP = /somewhere/fastq-dump
## files
FASTQ1 = $(SRA:%.sra=%_1.fastq)
FASTQ2 = $(SRA:%.sra=%_2.fastq)
all: $(FASTQ1) $(FASTQ2)
#------------------------------------------------------------------------------
# Configurable configuration
#------------------------------------------------------------------------------
c = get_config()
#c.NotebookApp.ip = '*'
c.NotebookApp.password = u'sha1:xxxx'
c.NotebookApp.open_browser = False
#c.NotebookApp.port = 8899
local$ ssh -L 8888:localhost:8888 remote
remote$ jupyter notebook
@yk-tanigawa
yk-tanigawa / file0.txt
Created January 20, 2016 20:52
Scipyで標本分布を計算する(離散分布) ref: http://qiita.com/yk-tanigawa/items/0e4bd9480216c7a84106
from scipy import stats
help(stats.rv_discrete)
@yk-tanigawa
yk-tanigawa / revcomp.py
Created December 28, 2015 16:03
Compute reverse complement nucleotide sequence with python
import string;
def revcomp(sequence):
return string.translate(sequence[::-1], string.maketrans("ACGT", "TGCA"))
CC = gcc
LD = gcc
CFLAGS = -Wall -Wextra -O2
LDFLAGS = #-lpthread -lm
SRCS := $(wildcard *.c)
OBJS = $(SRCS:.c=.o)
DEPS = $(SRCS:.c=.dep)
EXEC = $(SRCS:.c=)
RM = rm -f
@yk-tanigawa
yk-tanigawa / exec
Created November 5, 2015 08:02
chrom testrun
$ ./chrom -f /data/yt/GRCh37.ch21.fasta -H /data/yt/GM12878_combined/ -o /work2/yt/scripts/20151105/out/ -k1 -r1000 -c21 -m10000 -M1000000 -n"KR" -e"KR"
fasta file: /data/yt/GRCh37.ch21.fasta
Hi-C data dir: /data/yt/GM12878_combined/
Output dir: /work2/yt/scripts/20151105/out/
k: 1
resolution: 1000
chromosome: 21
min distance: 10000
Max distance: 1000000
Normalization: KR
@yk-tanigawa
yk-tanigawa / gist:93a2c0b855ff05a560c3
Last active October 28, 2015 16:34
Scala install on mac book air
sudo port install scala2.11 scala2.11-docs
sudo port select --set scala scala2.11
$scalac -version
Scala compiler version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL
$ fsc -version
Fast Scala compiler version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL