See http://hongqinlab.blogspot.com/2017/11/cellmap-gin-output.html http://hongqinlab.blogspot.com/2017/06/yeast-genetic-map.html
rm(list=ls());
set.seed(2017);
datapath = "~/github/cellmap_parent/cellmap_data/";
#datapath = "~/github/cellmap_parent/CellMap/20170626/S1.pairwise/"; #ridgeside
#datapath = "~/data/Sce/CellMap/20170626/S1.pairwise/"; #applejack
debug = 0;
list.files(path=datapath);
## [1] "gin_intermediate_uniquePairs20171115.csv"
## [2] "gin_lenient_uniquePairs20171115.csv"
## [3] "gin_stringent_uniquePairs20171115.csv"
## [4] "trash"
Load unique pairwise genetic interaction data, generated by cellmap_analysis/cellmap_explore20171101ridgeside.Rmd
tb.gin.intermediate = read.csv( paste(datapath, "gin_intermediate_uniquePairs20171115.csv", sep=''));
tb.gin.stringenet = read.csv( paste(datapath, "gin_stringent_uniquePairs20171115.csv", sep=''));
tb.gin.stringenet$essenflag1 = as.character(tb.gin.stringenet$essenflag1)
tb.gin.stringenet$essenflag2 = as.character(tb.gin.stringenet$essenflag2)
How many interactions per gene? Hundreds for intermediate GIN.
tb = tb.gin.intermediate;
longname = c( as.character(tb$ORF1), as.character(tb$ORF2) );
net = table( longname);
str(net)
## 'table' int [1:5698(1d)] 285 532 80 81 114 42 193 359 474 113 ...
## - attr(*, "dimnames")=List of 1
## ..$ longname: chr [1:5698] "YAL001C" "YAL002W" "YAL004W" "YAL005C" ...
mean(net)
## [1] 173.5763
median(net)
## [1] 101.5
Stringent GIN
tb = tb.gin.stringenet;
longname = c( as.character(tb$ORF1), as.character(tb$ORF2) );
net = table( longname);
str(net)
## 'table' int [1:5673(1d)] 126 242 18 31 33 9 95 110 257 50 ...
## - attr(*, "dimnames")=List of 1
## ..$ longname: chr [1:5673] "YAL001C" "YAL002W" "YAL004W" "YAL005C" ...
mean(net)
## [1] 76.16605
median(net)
## YGL063W
## 38
For Hong’s reliability aging model, we need to find out the interactions per essential gene.
tb = tb.gin.stringenet;
tb$essenflag1[ is.na(tb$essenflag1) ] = 'missing';
tb$essenflag2[ is.na(tb$essenflag2) ] = 'missing';
table(tb$essenflag1)
##
## abnormal essential missing nonessential
## 5281 83476 17519 109769
table(tb$essenflag2);
##
## abnormal essential missing nonessential
## 4473 85605 6208 119759
tb$AgingFlag = 'Nonaging-intxn'
tb$AgingFlag = ifelse( tb$essenflag1=='essential' | tb$essenflag2 =='essential', 'Aging-intxn', tb$AgingFlag );
table(tb$AgingFlag)
##
## Aging-intxn Nonaging-intxn
## 133502 82543
table(tb$AgingFlag) /length(tb$AgingFlag)
##
## Aging-intxn Nonaging-intxn
## 0.6179361 0.3820639
tb2 = tb[tb$AgingFlag=='Aging-intxn', ]
net2 = table( c( as.character(tb2$ORF1), as.character(tb2$ORF2)) );
mean(net2)
## [1] 49.64745
median(net2)
## [1] 15
#how about positive gin?
tb2postive = tb2[ tb2$Genetic.interaction.score..ε. > 0, ]
net2positive = table( c( as.character(tb2postive$ORF1), as.character(tb2postive$ORF2)) );
mean(net2positive )
## [1] 10.32623
median(net2positive )
## [1] 3
#how about negative gin?
tb2negative = tb2[ tb2$Genetic.interaction.score..ε. < 0, ]
net2negative = table( c( as.character(tb2negative$ORF1), as.character(tb2negative$ORF2)) );
mean(net2negative )
## [1] 43.07605
median(net2negative )
## YKL043W
## 14
No comments:
Post a Comment