Sunday, November 19, 2017

pairwise interaction to adjancency matrix, rank and eigen values, igraph




require(Matrix)
## Loading required package: Matrix
## Warning: package 'Matrix' was built under R version 3.4.2
require(igraph)
## Loading required package: igraph
## Warning: package 'igraph' was built under R version 3.4.1
## 
## Attaching package: 'igraph'
## The following objects are masked from 'package:stats':
## 
##     decompose, spectrum
## The following object is masked from 'package:base':
## 
##     union
#URL = "https://docs.google.com/spreadsheet/pub?key=0ArLJZixvTlU7dDI5c3dnTzdRX1dndzBORUk1UC0wYlE&single=true&gid=0&output=csv"
#states = read.csv(textConnection(getURL(URL)), colClass = c("character", "character"))
states = read.csv("48states.csv", colClass = c("character", "character"))
g = graph.data.frame(states, directed=F)
g.degree = degree(g)
g.degree [g.degree == max(g.degree)] #TN and MO have 8 bordering states
##  MISSOURI TENNESSEE 
##         8         8
g.shortestpath.m = shortest.paths(g)
str(g.shortestpath.m)
##  num [1:48, 1:48] 0 4 3 4 3 7 3 1 2 4 ...
##  - attr(*, "dimnames")=List of 2
##   ..$ : chr [1:48] "TEXAS" "WISCONSIN" "VIRGINIA" "WASHINGTON" ...
##   ..$ : chr [1:48] "TEXAS" "WISCONSIN" "VIRGINIA" "WASHINGTON" ...
sorted.names = sort( rownames(g.shortestpath.m) )
gsm = g.shortestpath.m[, sorted.names]
gsm = gsm[sorted.names, ]
A = as_adjacency_matrix(g, type = c("both", "upper", "lower"), attr = NULL,
  edges = FALSE, names = TRUE, sparse = igraph_opt("sparsematrices"))
rankMatrix(A)
## [1] 48
## attr(,"method")
## [1] "tolNorm2"
## attr(,"useGrad")
## [1] FALSE
## attr(,"tol")
## [1] 1.065814e-14
eigen(A)
## eigen() decomposition
## $values
##  [1]  5.46905036  4.71349007  4.10283310  3.98769817  3.56553201
##  [6]  3.29609990  2.92589988  2.47279120  2.21403386  1.98027335
## [11]  1.64326053  1.37137510  1.32589358  1.05103630  0.87007730
## [16]  0.72474178  0.49265884  0.25786926  0.13794547  0.06087911
## [21] -0.18440602 -0.30846880 -0.37586922 -0.69511879 -0.76035086
## [26] -0.82759766 -1.00000000 -1.04901188 -1.11963361 -1.21597743
## [31] -1.29093275 -1.39362399 -1.45885353 -1.51222782 -1.59093188
## [36] -1.64174682 -1.67854299 -1.74845653 -1.83665486 -1.93900022
## [41] -2.03895713 -2.13101810 -2.21289102 -2.25499195 -2.37505991
## [46] -2.39627221 -2.78120712 -2.84563603
## 
## $vectors
##                [,1]         [,2]         [,3]         [,4]        [,5]
##  [1,] -0.1269362183 -0.037595880  0.191120477  0.017179147  0.14085327
##  [2,] -0.1342561539  0.071741990 -0.239778162  0.127059399  0.02027220
##  [3,] -0.1354063391  0.211752293  0.086709716 -0.111031700 -0.18431323
##  [4,] -0.0338266747 -0.080078900 -0.010949302 -0.067103579 -0.12131413
##  [5,] -0.2582273680 -0.119195635 -0.097785210  0.095623439  0.14619647
##  [6,] -0.0058462038  0.027364688 -0.040557097 -0.200221510  0.21938914
##  [7,] -0.2334173178  0.027787111 -0.247476898  0.182905195  0.11339213
##  [8,] -0.2359207076 -0.083804838  0.195581899  0.037136383  0.20370474
##  [9,] -0.3334726731  0.105698197  0.058235559  0.141495543  0.15033629
## [10,] -0.0582955868 -0.140444357 -0.001589589 -0.123980447 -0.20834424
## [11,] -0.1879761471 -0.107183098 -0.248112711  0.107153245  0.06329444
## [12,] -0.0312374324  0.048998675  0.099388387  0.009141556 -0.03555842
## [13,] -0.0214983987  0.076277237 -0.082433313 -0.377517079  0.29194375
## [14,] -0.1831862658 -0.295982537  0.043295372 -0.161989688 -0.14129937
## [15,] -0.0892716733  0.133319468  0.164494910 -0.016744545 -0.10958822
## [16,] -0.2048646256 -0.246091640 -0.098168091 -0.042349949 -0.03808803
## [17,] -0.2344864497  0.238516369  0.291341321  0.033186539 -0.06563561
## [18,] -0.0320928344  0.054511479  0.090408412 -0.001137113 -0.05484129
## [19,] -0.1720858750 -0.194330230  0.142128166 -0.079235812  0.04390342
## [20,] -0.0078784656  0.038151177 -0.058338963 -0.289781327  0.32467730
## [21,] -0.1381976245  0.130455228 -0.248376998  0.065730253 -0.06531480
## [22,] -0.2546395582 -0.265142754  0.077424414 -0.061291765  0.07187651
## [23,] -0.0636729692  0.141296550 -0.024125732 -0.214479862 -0.12652124
## [24,] -0.0025963189  0.014554770 -0.025626722 -0.131124543  0.16561797
## [25,] -0.1978881589 -0.076895257  0.056901330  0.053405145  0.16045684
## [26,] -0.0689963439  0.164487874 -0.095056328 -0.339631128 -0.04453663
## [27,] -0.0065734019  0.030814251 -0.045368949 -0.223348667  0.24034822
## [28,] -0.0862456542  0.123619846  0.206435714  0.012210082 -0.08595017
## [29,] -0.2375124487  0.274479950 -0.027411095 -0.036509914 -0.16411286
## [30,] -0.1030970866 -0.219091774  0.023876785 -0.172477505 -0.23869805
## [31,] -0.1156005468  0.210479995 -0.048543911 -0.208213126 -0.19131677
## [32,] -0.0217080078  0.067899758 -0.053519840 -0.229092867  0.06070853
## [33,] -0.1266371117  0.200078700 -0.139284127 -0.128638496 -0.16266212
## [34,] -0.0551935383 -0.125805661  0.023884271 -0.111207145 -0.15864067
## [35,] -0.1415520797  0.015845772 -0.279065375  0.136080784  0.04106613
## [36,] -0.1106762297  0.094787206  0.228891818  0.042138321  0.04154739
## [37,] -0.1096814151 -0.135439731 -0.134255585 -0.004765675 -0.05166695
## [38,] -0.0803082094 -0.048112344 -0.161213887  0.059801004  0.01477861
## [39,] -0.0809742399  0.027674606  0.169795412  0.034068250  0.09571926
## [40,] -0.1322777780  0.163165916 -0.152071194  0.005652420 -0.11469594
## [41,] -0.2210866450  0.164067046 -0.208850510  0.121958301 -0.01686227
## [42,] -0.2052397480  0.073252655  0.276629943  0.076536430  0.15888943
## [43,] -0.1267042007 -0.237006745 -0.043333571 -0.143608372 -0.22420519
## [44,] -0.0845934368  0.107334924  0.201338251  0.024243685 -0.04083453
## [45,] -0.0065734019  0.030814251 -0.045368949 -0.223348667  0.24034822
## [46,] -0.1404635674 -0.233447603  0.075705982 -0.147002579 -0.11859609
## [47,] -0.0282274455  0.079279722 -0.042093328 -0.196404999 -0.03094891
## [48,] -0.0004747294  0.003087897 -0.006246104 -0.032882264  0.04644972
##              [,6]         [,7]         [,8]         [,9]        [,10]
##  [1,] -0.15433668  0.038758775 -0.293507694  0.120178849 -0.143275371
##  [2,]  0.01694524  0.184338924 -0.056227569  0.236909835  0.140575869
##  [3,]  0.04006946 -0.133528566  0.108782578 -0.116138102 -0.098408554
##  [4,]  0.08392612  0.098508725 -0.129072682 -0.198773911  0.110653949
##  [5,]  0.02977982 -0.221290476  0.179044831 -0.155536557  0.151313884
##  [6,]  0.10208301  0.120761438  0.058680015 -0.052201859 -0.084134168
##  [7,]  0.07972409  0.008937100 -0.001401282  0.027433737  0.274619285
##  [8,] -0.23919868 -0.025809991 -0.037673906  0.018941326  0.008109148
##  [9,] -0.08386704  0.022720468  0.073271203 -0.292015812  0.241261140
## [10,]  0.09826935  0.211230394 -0.162414860 -0.211783340  0.250504572
## [11,]  0.25054231 -0.242523726 -0.106249402  0.012933933 -0.095694147
## [12,]  0.17798879  0.008820393  0.083862174  0.195012840  0.055165717
## [13,]  0.09821281  0.052621287 -0.013424752  0.030928690  0.072812396
## [14,] -0.02858334  0.060517228  0.090454156  0.135162051 -0.128800640
## [15,]  0.23165796 -0.044429880  0.199935346  0.098389473  0.006291263
## [16,]  0.15220564 -0.209432256  0.039493019 -0.092483240 -0.218156736
## [17,]  0.22996360  0.020424308  0.029461374 -0.075320379  0.001226677
## [18,]  0.16880256 -0.015620114  0.160127611  0.157959001  0.038899640
## [19,] -0.20836085  0.036727560  0.048275195  0.289270338 -0.151333179
## [20,]  0.15302117  0.183119342  0.087739197 -0.074571757 -0.108707118
## [21,] -0.07324914  0.247516264 -0.044333611  0.238644837 -0.102605141
## [22,] -0.16224479 -0.112155780  0.249804229  0.133196413 -0.069585274
## [23,] -0.08779489 -0.270436182 -0.079090516  0.035525224  0.099024296
## [24,]  0.08524184  0.117595247  0.070788981 -0.071933615 -0.130713928
## [25,] -0.13820294 -0.115019581  0.187822715 -0.133428235  0.167198583
## [26,] -0.12130606 -0.249679525 -0.154008998  0.131871679  0.161878247
## [27,]  0.10941770  0.122405444  0.050458235 -0.035948806 -0.036617054
## [28,]  0.32473215 -0.001273010  0.196026802  0.251337104  0.070740658
## [29,] -0.10582075  0.084475348  0.123606375 -0.241941621 -0.176862830
## [30,]  0.04824161  0.238780622 -0.067440959 -0.035397007  0.181523143
## [31,] -0.13593296 -0.180724809 -0.004915977 -0.073786387 -0.124555243
## [32,] -0.02891431 -0.145047523 -0.126523292  0.135276715  0.248385592
## [33,] -0.17319637  0.040386229 -0.011445625  0.027317260 -0.232284588
## [34,]  0.01337832  0.203753366 -0.048349464 -0.006415738  0.235269940
## [35,]  0.14064709  0.021593873 -0.152453774  0.269864177  0.025998673
## [36,]  0.13068497  0.051263418 -0.281291971  0.028443975 -0.050887494
## [37,]  0.23383146 -0.174321331 -0.158640892 -0.102208036 -0.257864287
## [38,]  0.18962437 -0.135087050 -0.168774488  0.081566085 -0.165411387
## [39,] -0.01973913  0.049035616 -0.377559179  0.033133192 -0.112292798
## [40,] -0.13456361  0.216578784  0.051349572  0.005692832 -0.217842011
## [41,] -0.09126884  0.261309997  0.059149631 -0.011416353  0.080365830
## [42,] -0.04141045  0.053451109 -0.358825352 -0.075264815 -0.028207569
## [43,]  0.17835954  0.076996271 -0.156754932 -0.228308830 -0.031379505
## [44,]  0.26193669  0.027080595  0.011346845  0.180427927  0.038502542
## [45,]  0.10941770  0.122405444  0.050458235 -0.035948806 -0.036617054
## [46,] -0.10241469  0.146150933  0.110297690  0.232975685  0.033871077
## [47,] -0.07221118 -0.227336293 -0.145431934  0.136706860  0.257180725
## [48,]  0.02586142  0.040191138  0.028627156 -0.032489844 -0.066008023
##              [,11]         [,12]         [,13]        [,14]        [,15]
##  [1,] -0.099643714  0.0786030590  0.2370736975  0.036692213 -0.042633056
##  [2,] -0.098633485 -0.0064999438  0.0536957489 -0.241128573 -0.218745333
##  [3,] -0.375033353  0.0997258651 -0.0302497029 -0.128345136 -0.158346501
##  [4,]  0.089195340  0.0190103318  0.3001843694 -0.005352065 -0.274709457
##  [5,]  0.095691459 -0.0769909062 -0.0971445877  0.038261855 -0.025641418
##  [6,] -0.103819289 -0.3181593563  0.0822591603 -0.013989263  0.070083529
##  [7,] -0.142555115 -0.0270085509 -0.0836957817 -0.123901657 -0.081112303
##  [8,] -0.024560936  0.0600514551  0.2892976722  0.198297298 -0.076475454
##  [9,]  0.017006868  0.0043081711 -0.0104030456  0.019535764  0.126085494
## [10,] -0.019075383  0.0051379051  0.1783576845  0.191515550 -0.114601223
## [11,] -0.101788822  0.0123431395 -0.0866681007  0.169721385  0.099128714
## [12,]  0.244525623 -0.1343661512 -0.0144036069  0.227319797 -0.270714179
## [13,]  0.101338864  0.1627843947 -0.0301120660 -0.011006893  0.100423671
## [14,]  0.035547280 -0.0104612744 -0.1211327029 -0.300407387 -0.001160090
## [15,] -0.206350645  0.1671324222  0.2770769979 -0.130231670  0.190226522
## [16,]  0.205948306 -0.0253112279 -0.0274459817 -0.234395234  0.010171534
## [17,] -0.048614118  0.0188998355 -0.1495438401 -0.094079021  0.099364083
## [18,] -0.046076065  0.1171084083  0.3543778446 -0.021786901  0.221766619
## [19,] -0.112286634  0.0558605404  0.0743453049 -0.014734192 -0.065860493
## [20,] -0.087266285 -0.0405380757 -0.0017131960  0.012387413 -0.081953763
## [21,]  0.127005817 -0.0117059955  0.1253423447 -0.012917658 -0.057811614
## [22,]  0.077709352 -0.0351055099 -0.0328740149 -0.017630605 -0.094974618
## [23,] -0.198015018 -0.0727613649 -0.0005962075 -0.091762512 -0.274172027
## [24,] -0.184674719 -0.5585621371  0.1408921544 -0.016083743  0.042508180
## [25,]  0.100925410 -0.0348094333  0.1122835395  0.226884945 -0.081608837
## [26,]  0.130110372 -0.0669632747  0.0315346816  0.044822684  0.057526387
## [27,]  0.021876951  0.3291720956 -0.0976553822  0.027049760 -0.142160744
## [28,]  0.130635666 -0.0065328673  0.1927903106  0.107332846  0.002727578
## [29,] -0.012334739  0.0472626052 -0.1089745114  0.045839007  0.110269886
## [30,] -0.105035973 -0.0142405484 -0.1204985350  0.080599418  0.116131949
## [31,] -0.150962987 -0.0237719300 -0.0580703255  0.135338800 -0.263462159
## [32,]  0.183747454 -0.0094450194  0.0433047234 -0.108888997  0.326041691
## [33,]  0.207201221 -0.0398640635  0.0312906685  0.271691948  0.035489811
## [34,] -0.181151755 -0.0186561788 -0.1628573692  0.323183205  0.183282825
## [35,] -0.229997268  0.0247938150  0.0087165519  0.111823594 -0.123857648
## [36,]  0.119078201 -0.1217401490 -0.3097837498 -0.102269321 -0.038690660
## [37,]  0.065620891  0.0545709729  0.0817741120  0.060837618  0.155914672
## [38,] -0.161973828  0.0668729712  0.0028830091  0.325757159  0.150774808
## [39,] -0.002821714 -0.0216139605 -0.0524609283 -0.102667791  0.012789940
## [40,]  0.246667125  0.0005100111  0.0516559070  0.072475266  0.184356379
## [41,]  0.083466053  0.0050068703  0.0208317337 -0.228439162  0.072456217
## [42,] -0.024071298  0.0134962428  0.0031524444 -0.042330467  0.092451953
## [43,]  0.165646564  0.0209323905  0.2196548433 -0.197140765 -0.124417239
## [44,]  0.271183639 -0.1777335264 -0.2118879605  0.131588512 -0.238269840
## [45,]  0.021876951  0.3291720956 -0.0976553822  0.027049760 -0.142160744
## [46,] -0.173568174 -0.0164819758 -0.2737906895  0.067562310  0.157939499
## [47,]  0.070495704 -0.1087737843  0.0559948390 -0.148262079  0.125731416
## [48,] -0.112383104 -0.4073007730  0.1062620384 -0.015302747  0.048855636
##              [,16]        [,17]        [,18]         [,19]        [,20]
##  [1,]  0.004569971 -0.328816297  0.031924327  0.0098454584  0.140469516
##  [2,]  0.006847243  0.094120659 -0.003154881  0.0682422178 -0.142952082
##  [3,] -0.032344214  0.105422429 -0.010157843  0.0879556730  0.194945179
##  [4,] -0.029275772  0.125935121  0.215556117 -0.2310458442  0.331326772
##  [5,]  0.340588556 -0.093979374  0.038939005 -0.0313837807  0.173275821
##  [6,] -0.017953074  0.022664822  0.372401038  0.4158130272  0.027376347
##  [7,]  0.035031621 -0.299110229  0.165970726 -0.1451006657 -0.013715246
##  [8,] -0.185746153  0.090816539 -0.055511539  0.0622958624 -0.116376646
##  [9,] -0.186767093 -0.065975219 -0.016820694 -0.0158290167 -0.221328780
## [10,]  0.077517410  0.045403832  0.044656524 -0.0361971078  0.210516854
## [11,]  0.048639755 -0.135868884  0.057752284 -0.0722649824  0.167524947
## [12,] -0.183183036 -0.306458831 -0.052417179  0.1130354697 -0.002808344
## [13,] -0.029624613  0.031794440  0.223336340 -0.0041593901 -0.013949092
## [14,] -0.075874782 -0.010145324  0.067421208 -0.0735415823 -0.230116107
## [15,]  0.189833127  0.097373493  0.008452687 -0.0124499873  0.057737064
## [16,]  0.137426263 -0.066956996 -0.059638536  0.0814462550  0.016763430
## [17,] -0.130275138  0.252386528  0.077087770 -0.1016898762  0.015830336
## [18,]  0.284119329 -0.142338990 -0.044756282 -0.0003806891 -0.140942987
## [19,] -0.227401201 -0.097073686  0.148084039 -0.1562178981  0.203415476
## [20,]  0.020497436 -0.016837237 -0.033759983  0.1396254155  0.018413771
## [21,]  0.153850443  0.291136083 -0.132867307  0.1232947880 -0.017632673
## [22,]  0.107806438  0.218478992 -0.001583840  0.0046159858  0.158511719
## [23,] -0.003617855 -0.047036321 -0.305111864  0.2528411415  0.049541251
## [24,] -0.003884165 -0.003791178 -0.093545577 -0.0781065019 -0.002798032
## [25,]  0.104701770  0.303132566 -0.135638767  0.1428031736 -0.097207192
## [26,]  0.054378724 -0.028187579  0.101602573 -0.0964576923 -0.181133034
## [27,]  0.033158600 -0.029481549 -0.255448732 -0.1571432208 -0.004754105
## [28,]  0.016080020 -0.167498055 -0.019993957  0.0123974729 -0.066317547
## [29,] -0.184356659 -0.106204106  0.095207349 -0.0893704916  0.103404388
## [30,]  0.041476285 -0.057927593 -0.076340744  0.0804508246 -0.262249182
## [31,]  0.104975322 -0.144582303  0.121744663 -0.0371976998 -0.214644952
## [32,] -0.144710482  0.096986903  0.128245413 -0.1452680778  0.144001918
## [33,]  0.242020004  0.004775827  0.149853992 -0.1600998847 -0.179825177
## [34,]  0.142714377 -0.062278148 -0.138628601  0.1412764123  0.134084463
## [35,] -0.006145550  0.248883933  0.116195334 -0.1056669255 -0.089614763
## [36,]  0.189507284  0.229708295 -0.003006369 -0.0233022951  0.057322500
## [37,] -0.222826628 -0.028111583 -0.188836374  0.1794841212 -0.077829861
## [38,] -0.248823000  0.172337242 -0.057737616  0.0112523687  0.001319388
## [39,]  0.353987284 -0.170732323 -0.044060413  0.0719044431  0.112458474
## [40,]  0.046554178 -0.009809241 -0.147044539  0.0776460419  0.299058674
## [41,] -0.177774031 -0.194540413 -0.150112299  0.1368865080  0.112259886
## [42,]  0.062472119  0.014995214 -0.040279784  0.0233757289 -0.190945645
## [43,] -0.098734785  0.016639218  0.010928772  0.0043253802 -0.190345976
## [44,] -0.148840419  0.016518403  0.006477177  0.0031952581  0.066146578
## [45,]  0.033158600 -0.029481549 -0.255448732 -0.1571432208 -0.004754105
## [46,] -0.015562624 -0.018158120 -0.004063834 -0.0247652757  0.059895270
## [47,] -0.129631843  0.044174594 -0.291868363  0.0805780092  0.203848834
## [48,] -0.005359378 -0.007695342 -0.362763583 -0.5662128808 -0.045960460
##               [,21]       [,22]         [,23]        [,24]        [,25]
##  [1,]  0.2208684340  0.10690302 -0.0567608955 -0.155898463 -0.074579510
##  [2,]  0.1898046899 -0.22211101  0.1754099184  0.087867822 -0.235829896
##  [3,]  0.2808638752 -0.05587835 -0.1674022699 -0.054751545  0.074018912
##  [4,] -0.2787962425 -0.07958535  0.0279084092  0.319894237  0.166149094
##  [5,]  0.0520892097  0.11095478 -0.0643586902 -0.043754704  0.072364435
##  [6,] -0.0478331810  0.01395297 -0.0001071867 -0.024016761  0.133456083
##  [7,] -0.0989230516  0.03892521  0.0645295180 -0.161341370  0.045281001
##  [8,]  0.0914676161  0.05799847  0.1431359915 -0.123311586 -0.033412692
##  [9,] -0.1265634291  0.06725144 -0.0103623344  0.138102034  0.090524393
## [10,]  0.0545418416  0.01449414  0.0704037353 -0.110304763 -0.117276487
## [11,] -0.0051836656  0.16303815  0.0342795235 -0.089469119  0.065430389
## [12,]  0.1802470852 -0.03223512 -0.2896552122  0.309137322  0.101932694
## [13,]  0.1853353149 -0.19391493 -0.0228618240 -0.070137157  0.309809532
## [14,] -0.1256251896  0.10716955 -0.2517133008 -0.017923935  0.037348054
## [15,]  0.0941576011  0.02557857 -0.0097242616 -0.061422279  0.132601719
## [16,]  0.2388284314  0.09181721  0.1550428935  0.166849340 -0.114027888
## [17,]  0.0733705996  0.19886519  0.1253007131  0.052873786 -0.004976271
## [18,] -0.3401693852 -0.18118989  0.0577320441 -0.055263294 -0.155497131
## [19,] -0.1015483111  0.02870859  0.1735511930 -0.199138324 -0.004286802
## [20,] -0.1405522589  0.13785758  0.0159622374  0.050803287 -0.232596797
## [21,]  0.1558267223  0.16072970  0.0287623700  0.080857412  0.160951232
## [22,] -0.0168191971 -0.16525633  0.0224517576  0.149096634 -0.089010287
## [23,] -0.1928507401  0.09047383  0.0432072719 -0.049798085  0.283260448
## [24,] -0.0359623294  0.05175330  0.0069398748  0.036028371 -0.178686184
## [25,] -0.0009446519 -0.23000177 -0.2417509076 -0.172822804 -0.053219967
## [26,] -0.0333347697 -0.04913203  0.1575154865 -0.006986629  0.149008983
## [27,] -0.0378105609  0.04284195  0.0050147111  0.011405613 -0.043862129
## [28,] -0.0314283182  0.03031286 -0.0119754366  0.099836833 -0.014369342
## [29,] -0.0150338247 -0.09208359 -0.1584579914  0.072905644 -0.337252118
## [30,]  0.0570007973  0.11728702 -0.2531948113 -0.278750797  0.025068562
## [31,] -0.0114366257 -0.20559727  0.0625956283  0.023499761 -0.129914121
## [32,]  0.2631643832 -0.12854571 -0.1748069035  0.006142532 -0.197707958
## [33,] -0.0375355580  0.17004049  0.1016097330  0.022295489 -0.070255911
## [34,]  0.2148677369 -0.05222812  0.2797174524  0.147591205 -0.092991259
## [35,] -0.0050779836  0.14876701 -0.2356485522  0.066328791 -0.113326538
## [36,] -0.2218555310 -0.19065963  0.1309069246 -0.243077379 -0.034582124
## [37,]  0.0546275776 -0.25428436  0.2819585060 -0.001869257  0.009623732
## [38,] -0.2405882843 -0.18647203 -0.2144082928  0.035978865  0.050335206
## [39,] -0.0387887502 -0.29418764 -0.3544232848  0.104440738 -0.061571454
## [40,] -0.0890997193  0.13363101 -0.1286074642 -0.185774201  0.210625167
## [41,] -0.0868268148 -0.27990760  0.0764254754 -0.046923408  0.086407770
## [42,]  0.0081399761  0.17450432  0.0590707737  0.326377123  0.155977543
## [43,] -0.0031301357  0.01005546 -0.0808936472 -0.112059731 -0.009055120
## [44,] -0.0018103297 -0.02036933  0.1208479147 -0.314723993 -0.063135270
## [45,] -0.0378105609  0.04284195  0.0050147111  0.011405613 -0.043862129
## [46,] -0.1511655434 -0.11567042  0.0776538960  0.286462141  0.162913909
## [47,] -0.2005296421  0.28269930 -0.0689491284  0.072853997 -0.308491100
## [48,]  0.1950171100 -0.16777483 -0.0184635360 -0.051830524  0.235004907
##              [,26]         [,27]       [,28]        [,29]       [,30]
##  [1,] -0.127166434  2.731135e-16  0.26359174  0.181976368  0.11436565
##  [2,] -0.088739549  1.015117e-16  0.07560462 -0.032232181 -0.13898014
##  [3,] -0.015547383 -1.467448e-16 -0.21577436  0.061910783  0.05873831
##  [4,] -0.093074515 -1.330338e-16 -0.07201234  0.179951085  0.04546114
##  [5,] -0.114359259  2.437475e-16  0.14059459  0.099344900  0.22366027
##  [6,]  0.086523021 -1.810011e-16  0.12570137  0.130224023 -0.31930645
##  [7,] -0.124905760 -1.124855e-16 -0.21934319 -0.110444882 -0.18685123
##  [8,]  0.196662154 -4.120809e-16 -0.28275058 -0.095230236 -0.12657648
##  [9,] -0.044553819  2.388999e-16  0.08002881  0.082750215  0.10707304
## [10,]  0.188131678  5.687204e-17  0.14269228 -0.312112389  0.02548184
## [11,]  0.089516659 -5.609270e-16 -0.16896008  0.047125885 -0.01931472
## [12,]  0.017756690 -1.171073e-16 -0.29880890 -0.144789663 -0.06144100
## [13,]  0.160135921 -3.936951e-16  0.10218335  0.074237929 -0.08866092
## [14,]  0.089955733 -2.375453e-16  0.07185781 -0.107852977  0.05731813
## [15,] -0.264309423 -2.138098e-16 -0.12016699 -0.334234233 -0.07822829
## [16,]  0.250433771  1.199660e-16  0.09980885 -0.026968192  0.01226232
## [17,] -0.089870376  2.733304e-17  0.21566856  0.014346740 -0.02147510
## [18,]  0.347154187  4.278574e-16 -0.12232562  0.303191345  0.09430460
## [19,] -0.099963598 -4.771598e-17  0.04193232  0.015298876  0.05797566
## [20,] -0.126565698  8.964093e-16 -0.11423107 -0.103925705  0.21699915
## [21,] -0.063161280  4.018948e-16  0.03720737  0.219864132  0.30107951
## [22,]  0.145137539  1.928977e-16  0.03757852 -0.244356030 -0.09706321
## [23,]  0.137450244 -2.676872e-16  0.08695401  0.080444357  0.04133720
## [24,] -0.105176472 -3.699221e-16 -0.11981451 -0.116115417  0.25993120
## [25,] -0.220984935  7.246944e-18  0.02340170  0.140663114 -0.08807204
## [26,] -0.088612459 -6.291678e-16  0.13886957 -0.240204897  0.02608926
## [27,] -0.018368497 -7.071068e-01  0.00587977  0.014006089 -0.05791495
## [28,] -0.022994568 -1.554468e-16  0.24848802 -0.005228987 -0.03644398
## [29,]  0.140468545  3.650444e-16  0.09964179  0.132796322 -0.18001404
## [30,] -0.037092085 -2.640402e-16 -0.05328392  0.017814319  0.05643042
## [31,]  0.089127988  3.231950e-16 -0.05574751  0.037329420  0.16695576
## [32,]  0.032864017  3.852128e-16 -0.26929096  0.102775121  0.29985762
## [33,] -0.247521062  2.463818e-16 -0.05121122 -0.076741839 -0.14916518
## [34,]  0.085572692  2.696332e-16  0.04276084  0.041053011 -0.05211534
## [35,]  0.196419524  1.493479e-16  0.01406534  0.131085293 -0.13472675
## [36,]  0.088239879 -3.161639e-16 -0.23349785 -0.051687982 -0.01580170
## [37,] -0.306405646  1.949212e-16 -0.11862103  0.125299610 -0.09874961
## [38,]  0.024733592  6.132436e-17  0.26073658 -0.271080454  0.20789126
## [39,] -0.176230024  4.727516e-16  0.11423177 -0.054105927 -0.13010028
## [40,]  0.127025056 -6.710082e-16 -0.16625005 -0.063862235 -0.13272900
## [41,]  0.065088158 -3.188850e-16  0.08876034 -0.204416310  0.18949518
## [42,]  0.184774109 -2.860682e-16 -0.14992437 -0.069709571  0.05963505
## [43,] -0.111103428  1.321714e-16 -0.06715047  0.110633106 -0.08076156
## [44,]  0.008299174  3.048275e-16  0.06496607  0.167340360  0.11115484
## [45,] -0.018368497  7.071068e-01  0.00587977  0.014006089 -0.05791495
## [46,] -0.221859353  1.236200e-16 -0.13426499  0.248333739 -0.01854118
## [47,] -0.098721646  6.055661e-16  0.04143650  0.050896488 -0.30204844
## [48,]  0.127086479  2.956172e-16  0.11421654  0.103708406 -0.21376318
##              [,31]        [,32]        [,33]        [,34]        [,35]
##  [1,] -0.141762811  0.103918920  0.210191184 -0.153130736  0.025104254
##  [2,] -0.102362255  0.366476860 -0.012958516 -0.208060316  0.224704625
##  [3,]  0.085976489  0.038582144  0.040415597 -0.075883211 -0.047972690
##  [4,] -0.214721441  0.045615920  0.236311489  0.067142648  0.067701012
##  [5,]  0.151260130  0.286498930 -0.033246153 -0.157871173 -0.064528887
##  [6,]  0.148578211  0.150335130  0.092644667  0.154786200 -0.203840715
##  [7,] -0.045340049 -0.073908874 -0.069966033 -0.130020320 -0.310352671
##  [8,] -0.145269681 -0.027901139  0.091434246  0.193019398 -0.078669819
##  [9,]  0.213021394 -0.187779542  0.031107495 -0.014078023 -0.058076830
## [10,]  0.273651514  0.042957846 -0.292027716  0.057361623  0.034323506
## [11,] -0.111261711  0.002857108 -0.001056778  0.387608054  0.370903641
## [12,]  0.316258203  0.054203513  0.085352875 -0.120065576  0.199516272
## [13,]  0.010975443 -0.026917547 -0.030197563 -0.067793679  0.118711708
## [14,]  0.031434024 -0.152707972  0.158819055 -0.044663859 -0.007394071
## [15,]  0.032721338 -0.066890443  0.288763839  0.075551516 -0.037865934
## [16,] -0.060972464 -0.128514736  0.189567683  0.005107489  0.038598615
## [17,] -0.043274516  0.022285713 -0.140473516 -0.056937069  0.127591038
## [18,]  0.179497435  0.087744078  0.070703146 -0.183747715  0.096867613
## [19,]  0.369834848 -0.105056178 -0.188080626 -0.029966534  0.138861006
## [20,] -0.090723679 -0.083009855 -0.050624307 -0.089174946  0.159232506
## [21,]  0.269609439 -0.071769895 -0.029353536  0.255633115 -0.067884491
## [22,] -0.093447295  0.137690421 -0.126988343  0.011966087 -0.174796343
## [23,] -0.043387653 -0.081276842 -0.170895789 -0.137403535  0.016650137
## [24,] -0.112056243 -0.099583241 -0.054333130 -0.077103374  0.046352478
## [25,] -0.097266530 -0.149616160  0.025837244 -0.021846106  0.236384652
## [26,] -0.098117537 -0.129182855  0.082111471 -0.101249796  0.297662454
## [27,]  0.034810378  0.045925092  0.032869737  0.062481843 -0.107275771
## [28,] -0.264440455 -0.055391809 -0.391909372  0.202316891 -0.116243839
## [29,]  0.018131010  0.013862385 -0.002327383 -0.002286040  0.191473015
## [30,] -0.131147571  0.329818692  0.005597738  0.201206155  0.136293811
## [31,] -0.075180044  0.058250186 -0.034027587  0.235827831 -0.221526975
## [32,] -0.043526311  0.007520335 -0.145817484  0.013194342 -0.227364944
## [33,]  0.134450073  0.076836312  0.100337370 -0.039802825 -0.105378590
## [34,] -0.010936115 -0.328772410  0.236832572 -0.196196042 -0.116569979
## [35,] -0.041736163 -0.315799160 -0.050592296 -0.093042677 -0.012069958
## [36,]  0.177128548  0.006980632  0.056944208  0.006065066  0.109189003
## [37,]  0.097186778  0.011292019 -0.221363130 -0.045866193 -0.043560903
## [38,]  0.043233156  0.216450086  0.187141614 -0.164458807 -0.198168623
## [39,]  0.021287307 -0.251592819 -0.124535644  0.153349687 -0.057811929
## [40,] -0.288008870  0.021759251 -0.162780491 -0.327734170 -0.032073845
## [41,] -0.050390440 -0.049253017  0.168816443  0.282064480  0.032817368
## [42,] -0.062846218  0.239726236 -0.085456127 -0.084833993 -0.042318415
## [43,]  0.003539426 -0.106529287 -0.052716135 -0.158896602 -0.142031204
## [44,] -0.143827616 -0.020147507  0.267392029 -0.020750387 -0.201172959
## [45,]  0.034810378  0.045925092  0.032869737  0.062481843 -0.107275771
## [46,] -0.128386154  0.085408581 -0.059074057  0.038125335  0.014837579
## [47,]  0.143331635  0.145619882  0.160812444  0.149090623 -0.054652024
## [48,]  0.086802541  0.071456320  0.037243718  0.050986613 -0.029135426
##              [,36]        [,37]        [,38]        [,39]        [,40]
##  [1,] -0.043845131 -0.033831445  0.164383465  0.145682409  0.281244048
##  [2,]  0.204396537  0.027015341 -0.181766767 -0.053608619 -0.270393246
##  [3,] -0.092797272 -0.014164134 -0.244892720 -0.013535116  0.188789030
##  [4,]  0.085831433  0.029569550 -0.098934967 -0.137437060  0.013489470
##  [5,]  0.028961498  0.021884627  0.147215092 -0.223195375 -0.145763960
##  [6,]  0.147970209 -0.060812857  0.022145907  0.061498179 -0.006099202
##  [7,] -0.057111001  0.034175824 -0.093820013  0.056489224  0.259653541
##  [8,] -0.100428211  0.014135492 -0.138145912 -0.294039244 -0.142517360
##  [9,] -0.054469875 -0.009969256 -0.058197022 -0.023515272 -0.257871763
## [10,] -0.076284248 -0.039661260 -0.066130031  0.379527200 -0.067526461
## [11,]  0.119763225 -0.006335031 -0.173265135  0.125915817 -0.006332030
## [12,]  0.015414504 -0.035646000  0.110315118 -0.011830029  0.060182508
## [13,] -0.092883453 -0.002427860 -0.022317731 -0.069531939  0.007925255
## [14,]  0.311404818  0.096472020 -0.283416823  0.202430070  0.061821713
## [15,]  0.012771875  0.012177372  0.225105353  0.071924342 -0.272534672
## [16,] -0.009343961 -0.013385332  0.022467738 -0.049298602 -0.096448981
## [17,] -0.001906742 -0.036859025 -0.009474814  0.023063412  0.114872354
## [18,] -0.134800361 -0.063017802 -0.114750769  0.083312904  0.050853308
## [19,]  0.202405624  0.031755416  0.054162720 -0.143377772 -0.162583087
## [20,] -0.213648796  0.632261078  0.016127554  0.018456463 -0.001292040
## [21,] -0.073566783  0.010439035 -0.018422743 -0.028680935  0.087746295
## [22,] -0.314906720 -0.063576672  0.040454905  0.012997185  0.210560540
## [23,] -0.004188593 -0.019173724 -0.169286930 -0.096182925 -0.029808686
## [24,]  0.063602629 -0.527756223 -0.032530978 -0.061875455  0.005193140
## [25,]  0.268520884  0.022356180  0.004960339  0.287344518  0.173075041
## [26,] -0.163123402 -0.141679495  0.093637520 -0.002381537  0.019564698
## [27,]  0.116033924 -0.235140231  0.002252238  0.018005530 -0.002256963
## [28,]  0.208536189  0.093600719 -0.024468622 -0.224941393  0.173930096
## [29,] -0.106107432 -0.051130911  0.033563794 -0.120540758 -0.010877655
## [30,] -0.140250033 -0.040251118  0.017319909 -0.261277289 -0.016910864
## [31,]  0.251780518  0.118761396  0.348276873  0.146595264 -0.167713310
## [32,]  0.149225256  0.044587003 -0.097393873  0.014122006 -0.023026601
## [33,] -0.047143166  0.026802155 -0.321968637 -0.036604571  0.157528757
## [34,]  0.244287256  0.087227200 -0.041872977 -0.171243372  0.092984840
## [35,] -0.155213415 -0.072594163  0.308375283  0.017502118 -0.042762304
## [36,]  0.161866890  0.035584297  0.218090369 -0.239337942  0.214535025
## [37,] -0.065253169 -0.016004588 -0.009385422  0.099499575  0.025357954
## [38,]  0.061339152  0.056557254 -0.071906121 -0.132260837  0.012241556
## [39,] -0.137167723 -0.018642119 -0.239211866 -0.091068828 -0.272148235
## [40,]  0.168414243  0.018621405  0.105892724  0.072237927 -0.234168322
## [41,] -0.049676166 -0.017367108  0.121678763  0.053150123  0.219655030
## [42,]  0.107172915  0.029538747  0.035777715  0.260917538  0.031916413
## [43,] -0.064629235 -0.009972501  0.239113521 -0.127102756  0.041370376
## [44,] -0.233842902 -0.033767375 -0.168412566  0.246669073 -0.290623992
## [45,]  0.116033924 -0.235140231  0.002252238  0.018005530 -0.002256963
## [46,] -0.184523545 -0.066502226  0.122023203  0.196265061 -0.095860300
## [47,]  0.011016765  0.069266153  0.098969165  0.045976224  0.017158631
## [48,] -0.038740827  0.314413289  0.018605540  0.033689212 -0.002678256
##              [,41]        [,42]        [,43]        [,44]         [,45]
##  [1,]  0.174638599  0.086475669 -0.128844507 -0.066787468 -0.1843365161
##  [2,]  0.042921951 -0.065172035 -0.008706158  0.022217078 -0.0820102678
##  [3,] -0.255840269 -0.251605622  0.028329069 -0.267404453  0.1529234772
##  [4,] -0.042423702  0.237827234 -0.021868689 -0.087856472  0.0869758000
##  [5,] -0.128645278 -0.038463324 -0.010234596  0.097329556 -0.0244278280
##  [6,]  0.110327377  0.025438955  0.279132222 -0.127645951 -0.0480987316
##  [7,] -0.049263044  0.074828765 -0.076949310 -0.095252760 -0.0341359262
##  [8,] -0.034443512 -0.109947371 -0.080731941 -0.075208101 -0.2382728679
##  [9,]  0.099056832  0.052445245 -0.092568793 -0.174000407 -0.0715978172
## [10,]  0.104477458 -0.081742706 -0.163976394 -0.128921211 -0.0671039415
## [11,] -0.008442478 -0.124256733  0.123284612  0.244249571 -0.1688774714
## [12,]  0.047429364  0.081435826  0.049046648 -0.004587643 -0.1098595039
## [13,] -0.161476099 -0.040994424 -0.485690580  0.230403525  0.0955577025
## [14,] -0.128820080  0.163084454 -0.159639288  0.037256317 -0.1992566016
## [15,]  0.198333572  0.122311299 -0.097172616  0.194827907  0.0279455548
## [16,]  0.213511290 -0.093842420 -0.079754815 -0.374946851  0.2297491410
## [17,] -0.044700659  0.134086638  0.220137704 -0.022991886 -0.2697181001
## [18,] -0.090938159  0.018405815  0.107682369 -0.036565081 -0.0569922882
## [19,] -0.081009274 -0.012777777  0.175621052  0.017109475  0.3403501942
## [20,]  0.021937711  0.005253277  0.061345508 -0.029077001 -0.0121573489
## [21,] -0.133807182  0.048068627 -0.062290284  0.020155019 -0.1990730286
## [22,] -0.047030736  0.240717358  0.119862969  0.203257393 -0.0654176813
## [23,]  0.435094960  0.129307956 -0.013434578  0.226647936  0.0007791075
## [24,] -0.085414404 -0.018469727 -0.193344116  0.086514069  0.0308370156
## [25,]  0.054470343 -0.067926175  0.028773383 -0.022784312  0.1682973101
## [26,] -0.204098319 -0.040179742  0.287176174 -0.241675530 -0.0974015232
## [27,]  0.045916537  0.011415184  0.132075775 -0.061851619 -0.0247107772
## [28,] -0.012914563 -0.161534425 -0.141116732 -0.112373944  0.1074145443
## [29,]  0.095162050  0.057685069 -0.092832713  0.212056368 -0.0157858278
## [30,] -0.005665475  0.296538787  0.064443207 -0.119369692  0.2291019426
## [31,] -0.162242581  0.092785173 -0.079386940 -0.007545437 -0.1064231545
## [32,]  0.309243000  0.074017002  0.182974873  0.002543627 -0.0198761104
## [33,]  0.260487245 -0.092934544 -0.033563306  0.087390577  0.2122461344
## [34,] -0.146958533  0.064900601  0.107917953  0.170905609 -0.0172330667
## [35,]  0.060209821  0.113376281  0.017630132 -0.061423262  0.2225127560
## [36,]  0.181033903 -0.028401342 -0.200167693 -0.136776978 -0.0924284905
## [37,] -0.104424447  0.383969577 -0.109154401 -0.063627554  0.0517804022
## [38,]  0.025825508 -0.175075530 -0.014352421 -0.052859947 -0.0443844327
## [39,] -0.110730912  0.003078414  0.114422858 -0.004095152 -0.0428839037
## [40,] -0.126136295  0.039686070  0.021605701 -0.180055469 -0.0854137511
## [41,]  0.035344386 -0.097390885  0.140875241  0.086421670  0.2054754982
## [42,] -0.129896921 -0.064634482  0.075806883  0.212798982  0.3786168471
## [43,] -0.017977350 -0.425071436  0.212369418  0.327036849 -0.1394687945
## [44,] -0.083791877 -0.012006795  0.032581845  0.122719041  0.1535083592
## [45,]  0.045916537  0.011415184  0.132075775 -0.061851619 -0.0247107772
## [46,]  0.200830165 -0.353100437 -0.139277484 -0.137099869 -0.1210684352
## [47,] -0.264958803 -0.076557405 -0.206389046  0.005536147  0.0490507736
## [48,]  0.041891221  0.008667091  0.087371730 -0.038365578 -0.0129836790
##              [,46]        [,47]         [,48]
##  [1,] -0.030848335 -0.126766284  0.1007814759
##  [2,] -0.018453210 -0.100900566  0.0960549006
##  [3,] -0.148642320 -0.162440681  0.0938082324
##  [4,]  0.006845561  0.011134134 -0.0093233898
##  [5,] -0.298386254  0.027624094 -0.3158573581
##  [6,] -0.106188735  0.035521380  0.0207724730
##  [7,]  0.225354164  0.350138263  0.0607705280
##  [8,] -0.094049193  0.110358157 -0.3079094291
##  [9,]  0.007629335 -0.369241788  0.3788546259
## [10,] -0.081101869  0.030051818 -0.0656968616
## [11,]  0.018212194 -0.165041747  0.1834181509
## [12,]  0.107739983 -0.012002600 -0.0689488832
## [13,]  0.214315476 -0.091176877 -0.0551474253
## [14,] -0.274675004 -0.005723569 -0.1393900941
## [15,] -0.056555925  0.093830593  0.0773181781
## [16,]  0.273700340  0.155016030 -0.0001809073
## [17,]  0.374044115 -0.051103162 -0.3704530068
## [18,]  0.104875201 -0.026056556 -0.0725731171
## [19,]  0.154959825  0.057319530  0.0578178206
## [20,] -0.027325139  0.012013812  0.0072858703
## [21,]  0.067876736  0.296734133  0.1812933094
## [22,]  0.050684913 -0.204311204  0.2927710111
## [23,]  0.025529481  0.061753287 -0.0524860522
## [24,]  0.067466777 -0.019629249 -0.0112493425
## [25,]  0.139433741  0.156612119 -0.0168183314
## [26,] -0.236713818  0.159550944  0.1206335047
## [27,] -0.055057524  0.020935924  0.0124456799
## [28,] -0.194753606 -0.021361913  0.1291984983
## [29,] -0.209019087  0.434925604  0.1256666421
## [30,]  0.136591263  0.001886812  0.0647991506
## [31,]  0.222188876 -0.087625142 -0.0469898470
## [32,] -0.033215481  0.004623796 -0.0166537076
## [33,]  0.036420715 -0.250085484 -0.1539063257
## [34,] -0.013792710 -0.035583126  0.0392457598
## [35,] -0.189844551 -0.185171103 -0.1991281445
## [36,] -0.135057180 -0.067785700  0.1195317553
## [37,] -0.216394410 -0.022661111 -0.1126547489
## [38,]  0.161929336  0.134069109  0.0451093328
## [39,]  0.109502388  0.005426871 -0.0994873521
## [40,]  0.068393345 -0.108046011  0.0573577756
## [41,] -0.059167437 -0.181075919 -0.3162729785
## [42,] -0.096492013  0.179458733  0.0627915620
## [43,]  0.064698042 -0.061018150  0.0922278354
## [44,] -0.063420721  0.054743631  0.0670049278
## [45,] -0.055057524  0.020935924  0.0124456799
## [46,] -0.022438305  0.067025413 -0.1107814369
## [47,]  0.101991676 -0.081233801 -0.0180956891
## [48,] -0.028154888  0.007057816  0.0039531909
#URL2 = "https://docs.google.com/spreadsheet/pub?key=0ArLJZixvTlU7dC1rTlRhTkw5UlY0eWZGT1JOVUVCWGc&single=true&gid=0&output=csv"
#state.year.tb = read.csv(textConnection(getURL(URL2)), colClass = c("character", NA))

# http://igraph.org/r/doc/as_adjacency_matrix.html

Friday, November 17, 2017

UTC full time student


based on
https://www.utc.edu/financial-aid/sap-standards.php
undergraduate is 12 hours or more

graduate student is 9 hours or more

indoor positioning advances exploiting GZPS and WLAN infrastures

D Akopian

3 billion devices in 2014 relied on positions.
7.5 billions expected in 2019

 Global Navigation Satellite System GNSS

GNSS enabled handsets
multi-constelation GNSS (GPS, Galio, Beidou, GLONASS, etc)

FCC enhanced 911 requirement: original
network based technology, 100 meter of accuracy for 67 percent of calls, with 300 meters of 95 % calls

GPS-enabled phones: 50 meters of accuracy for 67% calls, 100 meters for 95% calls

In 2015, wireless phone must add public safety answring points with reports on their locations

Cell-ID, cell site identifcation (all networks)
Network based position tech vs GPS based positioning tech

A-GPS assistance GPS require cellular network

 WLAN radio landscape and fingerprinting, databased based positioning
challenges: fluctuating signals, landscape surveys

WIFI database, coarse-grid database, commerical vendors

GPS spoofing

crowdsourcing of positioning






Thursday, November 16, 2017

biogrid yeast intxt statistics


https://wiki.thebiogrid.org/doku.php/statistics











biogrid yeast tab2 file clean



applejack:biogrid hqin$ ll
total 126248
-rw-r--r--@  1 hqin  staff   713B Nov 16 13:36 1.clean.tab2.20171115.pl
-rw-r--r--   1 hqin  staff   385B Nov 16 11:44 1analye_biogrid.Rmd
drwx------@ 65 hqin  staff   2.2K Nov 16 11:41 BIOGRID-ORGANISM-3.4.154.tab2
-rw-r--r--@  1 hqin  staff    62M Nov 16 11:24 BIOGRID-ORGANISM-3.4.154.tab2.zip
drwxr-xr-x   5 hqin  staff   170B Nov 16 13:34 test

applejack:biogrid hqin$ perl 1.clean.tab2.20171115.pl BIOGRID-ORGANISM-3.4.154.tab2/BIOGRID-ORGANISM-Saccharomyces_cerevisiae_S288c-3.4.154.tab2.txt > BIOGRID-ORGANISM-Saccharomyces_cerevisiae_S288c-3.4.154.tab2.cleaned.txt

Trying to read.table into R, only half of the table were loaded. 

I then tried "text to column" feature in Excel, and it worked. All 688014 rows are converted. I then save this as csv file. This csv file can be loaded into R correctly, 688014 obs of 36 variables. 







biogrid tab2 clean, perl code


FILE:  1.clean.tab2.20171115.pl


#! /usr/bin/perl

# usage:
# ~/pypeworks/biogrid/00_cleanup_biogrid_table.pl  BIOGRID-ORGANISM-Homo_sapiens-3.2.117.tab2.txt > BIOGRID-ORGANISM-Homo_sapiens-3.2.117.tab2.clean.txt
# can use bash to apply it to more species as needed

while ( <>) {
    chomp;
    @aux = split "\t";
    @new = ();
    foreach (@aux) {
        $blah = $_;
        $blah =~ s/\s//g;
        ($blah eq '-') && ($blah='');
        if (! $blah) {
            push @new, 'NA';
        } else {
            # somebody in BioGRID thought it would be cute to use backslash
            # as quotes
            $blah = $_;
            $blah =~ s/\\//g;
            push @new, $blah;
        }
    }
    
    print join ("\t", @new), "\n";

}

Based on 
https://github.com/ivanamihalek/biogrid/blob/master/00_cleanup_biogrid_table.pl 

biogrid interaction data

The S crevisiae interaction file is part of the files in Organizam ZIPped archive.

Try read.table ( sep='\t') for *all*  and S cerevisiae tab2 file from the Biogrid download site, EOF error occurred and only about 1/3 of rows can be loaded to R.

GitHub showed some repos on Biogrid data handling.

https://wiki.thebiogrid.org/doku.php/biogrid_tab_version_2.0

integration of hegerogenous genomic data sets





Discovery of multi-dimensional modules by integrative analysis of cancer genomic data



Gene prioritization through genomic data fusion

semantic similarity, 


Inference of patient-specific pathway activities from multi-dimensional cancer genomics data using PARADIGM 




Integrative genomics analyses unveil downstream biological effectors of disease-specific polymorphisms buried in intergenic regions




MNMF, modified non-negative matrix Factorization = mNMF 


Wednesday, November 15, 2017

metric


conversion dominoes: Conversonoes (C)
smaller or larger

dimenstional analysis

hints

pre- and post-surveys

Journal of Chemical Education, Ellis


genetic network (cellmap) analysis, for aging modeling



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