This site is to serve as my note-book and to effectively communicate with my students and collaborators. Every now and then, a blog may be of interest to other researchers or teachers. Views in this blog are my own. All rights of research results and findings on this blog are reserved. See also http://youtube.com/c/hongqin @hongqin
Showing posts with label mathramp. Show all posts
Showing posts with label mathramp. Show all posts
Tuesday, October 28, 2014
mathramp, 2014 Oct 28
Rstudio was not moved into "Application".
Went over R code for simulating aging in permuted networks.
Went over R code for generating histogram of CV
Monday, March 24, 2014
Network configuration on gompertz and weibull fitting (need follow up)
When p=0.6, pop=2000, original GINDIP fits much better to Gompertz with regards to Weibull, as compared to the ms02 permutated network.

I need to generate a distribution using 100 ms02 networks.
Wednesday, March 19, 2014
Monday, March 17, 2014
ms02 network aging, preliminary
I run preliminary analysis on network aging, and found that ms02 network tend to have short maximum network lifespan, even though their average lifespan is more or less the same with the yeast GIN/PPI. This seem to suggests that ms02 network has a more homogenous aging process. It seems to make sense that power-law increase heterogeneity in the yeast network.
Population size of 500 did not good p-value using wilcox.test().
Monday, February 17, 2014
mathramp, 2014 Feb 17
The student used link-switch to generate random network. I went over '20131221.DIPandGIN.sim.aging_v2.R' with the student. The code is 5 1/2 pages, much longer than I thought.
Wednesday, February 12, 2014
ms02 R, batch run
# ms02-2014Feb12.R
#permuate merged yeast PPI+GIN
#2014 Feb 12, re-name function to ms02_singlerun
#2014 Jan 31, fixed a bug that inserted "NA" into new network. The bug seems to be caused by spliting the
# arrays. I rewrote the spliting portion.
#require(igraph)
rm(list=ls())
debug = 0
setwd("~/projects/0.ginppi.reliability.simulation/ms02GINPPI")
#set.seed(2014)
#permute.pairs.wo.selfpairs = function( inpairs, ncycles=10, debug=1 ) {
ms02_singlerun = function( inpairs, ncycles=10, indebug=0 ) { # Renamed, 2014 Feb 12
if (ncycles >= 1 ) {
if(indebug>0) {
print(paste('ncycles=', ncycles))
}
longids = c(as.character(inpairs[,1]), as.character(inpairs[,2]) )
longids = sample(longids)
len = length(inpairs[,1])
newpairs = data.frame( cbind( longids[1:len], longids[(len+1): (2*len)]) )
names(newpairs) = c('id1', 'id2')
newpairs$id1 = as.character( newpairs$id1)
newpairs$id2 = as.character( newpairs$id2)
newpairs$selfpairs = ifelse( newpairs$id1 == newpairs$id2, 1, 0 )
self.tb = newpairs[ newpairs$selfpairs==1, ]
nonself.tb = newpairs[newpairs$selfpairs==0, ]
if(indebug>0) {
print(paste("===selfpairs===="),NULL)
print(self.tb)
print(paste("================="),NULL)
}
if( length(self.tb[,1])>=1 ) {
if ( ncycles == 0) {
#return (c(NA,NA, NA) );
print(paste("ncycles reached zero, ncycles"),ncycles)
print(paste("Abort!"),NULL)
stop;
} else {
ncycles = ncycles - 1
splitPos = round( length(self.tb[,1]) * sqrt(ncycles) ) + 5 #2014Jan31 change
splitPos = min( splitPos, (length(nonself.tb[,1])-1 ) )
selectedpairs = rbind(self.tb, nonself.tb[1: splitPos, ] )
restpairs = nonself.tb[ (splitPos + 1): length(nonself.tb[,1]), ]
#return( rbind(restpairs, permute.pairs.wo.selfpairs(selectedpairs, ncycles)))
return( rbind(restpairs, ms02_singlerun(selectedpairs, ncycles))) #2014 Feb 12
}
} else {
return (newpairs)
}
} else {
return( c(NA,NA,NA ))
}
}
#net = read.table("repeat.tab")
#write.table(pairs, "merged_PPIGIN_2014Jan20.tab", quote=F, row.names=F, col.names=F, sep='\t')
net = read.table( "merged_PPIGIN_2014Jan20.tab", header=F, sep="\t", colClass = c("character", "character") )
head(net)
if(debug==9) {
#net = read.table('pair.tab',header=F)
net = net[1:90000,]
}
for( i in 1:100) {
net.ms02 = ms02_singlerun( net, indebug=0 )
cmnd = paste( "mkdir dipgin.ms02.output/", i, sep="")
system( cmnd )
outputname = paste( 'dipgin.ms02.output/', i, '/', "ms02_",i,".tab", sep="")
write.csv(net.ms02, outputname)
}
#do they have the same degree?
#t1 = table(c(net[,1],net[,2]))
#t2 = table(c(net.ms02[,1],net.ms02[,2]))
#comp <- t1 == t2
#table(comp)
#tf = comp[comp==F]; tf
#t1[names(tf)[1]]
#t1[names(tf)]
#t2[names(tf)]
#permuate merged yeast PPI+GIN
#2014 Feb 12, re-name function to ms02_singlerun
#2014 Jan 31, fixed a bug that inserted "NA" into new network. The bug seems to be caused by spliting the
# arrays. I rewrote the spliting portion.
#require(igraph)
rm(list=ls())
debug = 0
setwd("~/projects/0.ginppi.reliability.simulation/ms02GINPPI")
#set.seed(2014)
#permute.pairs.wo.selfpairs = function( inpairs, ncycles=10, debug=1 ) {
ms02_singlerun = function( inpairs, ncycles=10, indebug=0 ) { # Renamed, 2014 Feb 12
if (ncycles >= 1 ) {
if(indebug>0) {
print(paste('ncycles=', ncycles))
}
longids = c(as.character(inpairs[,1]), as.character(inpairs[,2]) )
longids = sample(longids)
len = length(inpairs[,1])
newpairs = data.frame( cbind( longids[1:len], longids[(len+1): (2*len)]) )
names(newpairs) = c('id1', 'id2')
newpairs$id1 = as.character( newpairs$id1)
newpairs$id2 = as.character( newpairs$id2)
newpairs$selfpairs = ifelse( newpairs$id1 == newpairs$id2, 1, 0 )
self.tb = newpairs[ newpairs$selfpairs==1, ]
nonself.tb = newpairs[newpairs$selfpairs==0, ]
if(indebug>0) {
print(paste("===selfpairs===="),NULL)
print(self.tb)
print(paste("================="),NULL)
}
if( length(self.tb[,1])>=1 ) {
if ( ncycles == 0) {
#return (c(NA,NA, NA) );
print(paste("ncycles reached zero, ncycles"),ncycles)
print(paste("Abort!"),NULL)
stop;
} else {
ncycles = ncycles - 1
splitPos = round( length(self.tb[,1]) * sqrt(ncycles) ) + 5 #2014Jan31 change
splitPos = min( splitPos, (length(nonself.tb[,1])-1 ) )
selectedpairs = rbind(self.tb, nonself.tb[1: splitPos, ] )
restpairs = nonself.tb[ (splitPos + 1): length(nonself.tb[,1]), ]
#return( rbind(restpairs, permute.pairs.wo.selfpairs(selectedpairs, ncycles)))
return( rbind(restpairs, ms02_singlerun(selectedpairs, ncycles))) #2014 Feb 12
}
} else {
return (newpairs)
}
} else {
return( c(NA,NA,NA ))
}
}
#net = read.table("repeat.tab")
#write.table(pairs, "merged_PPIGIN_2014Jan20.tab", quote=F, row.names=F, col.names=F, sep='\t')
net = read.table( "merged_PPIGIN_2014Jan20.tab", header=F, sep="\t", colClass = c("character", "character") )
head(net)
if(debug==9) {
#net = read.table('pair.tab',header=F)
net = net[1:90000,]
}
for( i in 1:100) {
net.ms02 = ms02_singlerun( net, indebug=0 )
cmnd = paste( "mkdir dipgin.ms02.output/", i, sep="")
system( cmnd )
outputname = paste( 'dipgin.ms02.output/', i, '/', "ms02_",i,".tab", sep="")
write.csv(net.ms02, outputname)
}
#do they have the same degree?
#t1 = table(c(net[,1],net[,2]))
#t2 = table(c(net.ms02[,1],net.ms02[,2]))
#comp <- t1 == t2
#table(comp)
#tf = comp[comp==F]; tf
#t1[names(tf)[1]]
#t1[names(tf)]
#t2[names(tf)]
Monday, February 10, 2014
GAS 2014 annual meeting prep, math ramp research
Friday and Saturday, 28-29 March, 2014 at Georgia Regents University, Augusta, GA.
meeting registration site
http://www.gru.edu/trends/gas/accommodations.php
http://www.gaacademy.org/annualmeeting10.htm
Hilton Garden Inn Augusta Meeting rate ($89) but not available anymore.
1065 Stevens Creek Road, Augusta, Georgia, 30907
Sheraton Augusta Hotel , prepaid rate $107 per night, refundable rate $119
1069 Stevens Creek Road, Augusta, GA 30907
Sheraton Augusta Hotel
1069 Stevens Creek Road
Augusta, Georgia 30907 United States
Phone: (706) 396-1000 Fax: (706) 396-1001
Parking?
-------------------------
Prepare of a 10 minutes talk.
Research talk:
10 slides.
- background, gene network, essential and non-essential,
- background, what is aging, our quantitative definition
- specific aim: how reliable is the yeast gene interaction network.
- method: how to generate random networks.
- method: evaluate the failure rates of original and random networks
- method: how network failure is simulated and evaluated
- result: histogram of failure rate, average lifespan of random networks, with original network
- result: Gompertz versus Weibull (biological versus machine aging)
- summary and conclusions
- future directions:
acknowledge, funding support
things to do:
->flow chart to generate 100 random networks and simulate their failures.
-> run the two R codes on network aging simulation and network permutation.
Subscribe to:
Posts (Atom)