Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
use strict;
use warnings;
my $target="ATcgAGCGTTTCG";
print $target."\n";
$target=uc("ATcgAGCGTTTCG");
#!/usr/bin/perl
use strict;
use warnings;
my $target="ATcgAGCGTTTCG";
my $line;
open (DATAFILE, " < /home/work/biol/References/hg19/chr2.fa")) or die("error: no such file! \n!);
print $target."\n";
@wakuteka
wakuteka / agqr.rb
Last active August 29, 2015 14:14 — forked from ybenjo/README.md
# -*- coding: utf-8 -*-
# record AGQR
# usage: use with crontab
# 29,59 * * * sleep 40; ruby agqr.rb
require 'yaml'
rtmpdump = '/usr/local/bin/rtmpdump'
ffmpeg = '/usr/bin/ffmpeg'
agqr_stream_url = 'rtmp://fms-base1.mitene.ad.jp/agqr/aandg22'
$ls -l /etc/systemd/system/default.target
lrwxrwxrwx 1 root root 37 9月 2 22:25 /etc/systemd/system/default.target -> /lib/systemd/system/multi-user.target
$ uptime
22:47:36 up 32 min, 1 user, load average: 0.00, 0.01, 0.05
# パッケージのインストール
source("http://bioconductor.org/biocLite.R")
biocLite("Biostrings")
# パッケージのロード
library(Biostrings)
# 読み込むmultifastaファイルの指定(ここでは組み込みのデータを使用)
# 例: inFileName <- "sample.fasta"
@wakuteka
wakuteka / random.R
Last active December 31, 2015 10:29
> library(random)
# 関数が5つしかないシンプルなパッケージです。
> ls("package:random")
[1] "quotaCheck" "randomNumbers" "randomQuota"
[4] "randomSequence" "randomStrings"
# randomNumbers()は重複を許した乱数列を生成します。
# runif()とは違い、出力されるのは全てint型の整数です。
> randomNumbers(n=20,min=1,max=100,col=5,base=10,check=TRUE)
library(cummeRbund)
packagePath <- system.file(package="cummeRbund")
extdataPath <- paste(packagePath, "/extdata", sep = "")
cuff <- readCufflinks(extdataPath,rebuild=TRUE)
my.fpkmMatrix <- fpkmMatrix(genes(cuff))
plot(x=my.fpkmMatrix$"hESC",
y=my.fpkmMatrix$"Fibroblasts",
log="xy",
@wakuteka
wakuteka / gist:4426042
Created January 1, 2013 09:01
csScatter
scatter <- csScatter(genes(cuff),"hESC","Fibroblasts",smooth=T)
print(scatter)
p <- ggplot(fpkmMatrix(genes(cuff)), aes(hESC, Fibroblasts))
p + geom_point()
# original in http://d.hatena.ne.jp/syou6162/20080801/1217528370
url <- "http://research.microsoft.com/en-us/um/people/cmbishop/PRML/webdatasets/curvefitting.txt"
curvefitting <- read.csv(file=url, sep=" ",head=F)
colnames(curvefitting)<-c("x","t")
takousiki <- function(n){