ぱらぱらめくるBiophysics ReviewとBulletin of Mathematical Biology

  • 周期性データのことを扱っていて(こちらなど)、複数の周期がリンクしている状態をフラクタル的に取り扱ってみたところ。(こちら
  • また、複数要素が作るサイクルを作っているときに、個々の要素が周期的な変動をすることを考えていると、「複数要素が作る空間」での状態推移は、「連続空間」での状態推移と同じと言えば同じ、違うと言えば違うけれど、拡散やら反応拡散系やら(こちらこちら)とつながってくるのですが。
  • そうこうしているうちに、周期をつくる何者かがあって、それが複数の周期(グラフでサイクル)でできていて、周期が連結している様子は、「歯車(Gear)」としての特性を持っている、ということとなり、そこからたどると、生物物理学や数理生物学の記事(こちらこちら)にたどり着くので、それじゃあ、その分野の論文をぱらぱらしてみるのが、休暇の過ごし方としては適当ではないか、と、そういう流れなわけです(はてなダイアリー上はすでに2011年だが、ぱらぱらめくっている今は2010年末)。
  • Biophysics ReviewBulletin of Mathematical Biologyとのどちらもオンラインで閲覧できるので図書館まで行かなくてもぱらぱらめくれるのがよい
  • ネットワーク
    • boolean networkの回路風図,state transition function,0/1 state 表示 petri net
  • Multi-dimensional correlative imaging: 解像度の異なる多種の顕微鏡技術と観察する構造の多層化と。
  • 癌と免疫サーベイランス
    • One-equation model: Tumor growth
    • Two-equation model: Tumor and immune system interactions
    • Three-equation model: Tumor and immune system and one more interact
      • Four-equation model:
      • Five and more-equation model:
  • パターン形成の反応拡散系 Gierer-Meinhardt model(こちら)と遺伝子発現のタイムラグ
  • SELEX(Systematic Evolution of Ligands by Exponential Enrichment)(こちら)
  • 細胞による埋め尽くしとボロノイ分割(Voronoi tessellation/Voronoi diagram)におけるOrnstein-Uhlenbeck process
  • CLLの細胞増殖に偏微分方程式
  • 以下のソースは、ただのメモ
library(bnlearn)
library(MCMCpack)
# 関数

# Function to estimate polynomial coefficients and coordinates estimated
# 多項式近似の係数と、推定座標を返す関数
glmPolynomial<-function(y,x,dg){# y:dependent values (従属値列),x:descriptive values (説明変数),dg:degrees of polynomials (多項式の次数)
 # Xs: Matrix consisted of x^1,x^2,...x^{dg}
 # Xs: xの1,2,...,dg 乗の値でできた行列
 Xs<-matrix(0,length(x),dg) 
 for(i in 1:dg){
  Xs[,i]<-x^i
 }
 # glm() is generalized linear regression function in R
 # glm() はRの一般化線形回帰関数
 fit<-glm(y~Xs[,1:dg]) 
 # beta: coefficients estimated
 # beta: 推定係数ベクトル
 beta<-fit$coefficients
 # Xs2 has an additional column for x^0
 # Xs2 には、x^0のための列を追加
 Xs2<-cbind(rep(1,length(x)),Xs)
 # predY is a matrix of values for individual degrees of x
 # predY は xの各次数の項
 predY<-t(t(Xs2)*beta)
 # apply(): Sum up all columns corresponding to 0 to dg degrees
 # apply()関数で0:dg次数のすべてを足し合わせる
 sumupPredY<-apply(predY,1,sum)
 list(beta=beta,x=x,predY=sumupPredY)
}
# 多次元単位球面の角座標から、直交座標の座標を作る
sphereCoords<-function(v){
	C<-cos(v)
	S<-sin(v)
	ret<-c(1,S)

	for(i in 1:length(v)){
		for(j in i:length(v)){
			ret[i]<-ret[i]*C[j]
		}
	}
	return(ret)
}
# 各座標から推移行列を作る
TransitionMat<-function(e.val.theta,e.vec.theta,e.vec.psi){
	k<-length(e.val.theta)
	S<-diag(complex(real=cos(e.val.theta),imaginary=sin(e.val.theta)))
	V<-matrix(0,k,k)
	Co<-cos(e.vec.theta)
	Si<-sin(e.vec.theta)
	Comp<-matrix(complex(real=Co,imaginary=Si),k,k)
	V<-Comp
	for(i in 1:k){
		A<-sphereCoords(e.vec.psi[i,])
		V[i,]<-A*Comp[i,]
	}
	return(V%*%S%*%solve(V))
}

Ns<-3 # 階層数
Ne<-4 # 巡回状態数

m<-matrix(0,Ne,Ne)

# この分岐木のノード数
Nnode<-((Ne-1)^Ns-1)/(Ne-2)

# この分岐木をグラフとして見て、そのエッジを行列表現する
# 1は自身、2は行に親ノード、列に子ノード
# 3は行に子ノード、列に親ノード

MM<-diag(rep(1,Nnode))
NodeName<-paste("",1:Nnode)
h<-1
a<-1
for(i in 2:Nnode){
	MM[h,i]<-2
	MM[i,h]<-3
	a<-a+1
	if(a==Ne){
		h<-h+1
		a<-1
	}
}

# 辺のリスト(始点ノード、終点ノード)を作る
E<-c()
for(i in 1:Nnode){
	for(j in 1:Nnode){
		if(MM[i,j]==2){
			E<-c(E,NodeName[i],NodeName[j])
		}
	}
}

E<-matrix(E,byrow=TRUE,ncol=2)

# 辺なしのグラフを作って、辺を与える
g<-empty.graph(NodeName)
arcs(g)<-E

# グラフオブジェクトgの様子を見てみる
plot(g)

g$nodes
length(g$nodes)

for(i in 1:length(g$nodes)){
	print(g$nodes[[i]]$children)
}




k<-Ne

m<-t(rdirichlet(Ne,rep(1,Ne)))

m<-matrix(0,Ne,Ne)
m[1,Ne]<-1
for(i in 2:Ne){
	m[i,i-1]<-1
}

mList<-list()
for(i in 1:(Nnode-(Ne-1)^(Ns-1))){
	e.val.theta<-runif(k)*2*pi
e.vec.theta<-matrix(runif(k^2)*2*pi,k,k)
e.vec.psi<-matrix(runif(k*(k-1))*2*pi,k,k-1)

e.vector.norm<-matrix(runif(k*(k-1))*2*pi,k,k-1)


mList[[i]]<-TransitionMat(e.val.theta,e.vec.theta,e.vec.psi)

}
Niter<-100
dseries<-matrix(0,Niter,Nnode)
# 各ノードに値(量など)を与えてみる
for(i in 1:Nnode){
	g$nodes[[i]]$freq<-runif(1)

}

for(t in 1:Niter){
for(i in 1:(Nnode-(Ne-1)^(Ns-1))){
	members<-c(i,which(MM[i,]==2))
	fs<-c()
	for(j in members){
		fs<-c(fs,g$nodes[[j]]$freq)
	}
	tmpfs<-mList[[i]]%*%matrix(fs,ncol=1)
	tmpc<-1
	for(j in members){
		g$nodes[[j]]$freq<-tmpfs[tmpc]
		tmpc<-tmpc+1
	}

}
for(i in 1:length(g$nodes)){
	dseries[t,i]<-g$nodes[[i]]$freq

}
}

matplot(dseries[1:10,],type="l")
matplot(dseries,type="l")