library("dna")
## dna 1.1-1 loaded
data("HeavyMice")
data("LeanMice")
args(test.individual.genes)
## function (X1, X2, scores = "PLS", distance = "abs", num.permutations = 1000,
## check.networks = TRUE, ...)
## NULL
tig.results=test.individual.genes(LeanMice,HeavyMice,scores="PLS", distance="abs",rescale.scores=TRUE,num.permutations=100)
## Starting permutation test:
## permutation 1 out of 100
## permutation 2 out of 100
## permutation 3 out of 100
## permutation 4 out of 100
## permutation 5 out of 100
## permutation 6 out of 100
## permutation 7 out of 100
## permutation 8 out of 100
## permutation 9 out of 100
## permutation 10 out of 100
## permutation 11 out of 100
## permutation 12 out of 100
## permutation 13 out of 100
## permutation 14 out of 100
## permutation 15 out of 100
## permutation 16 out of 100
## permutation 17 out of 100
## permutation 18 out of 100
## permutation 19 out of 100
## permutation 20 out of 100
## permutation 21 out of 100
## permutation 22 out of 100
## permutation 23 out of 100
## permutation 24 out of 100
## permutation 25 out of 100
## permutation 26 out of 100
## permutation 27 out of 100
## permutation 28 out of 100
## permutation 29 out of 100
## permutation 30 out of 100
## permutation 31 out of 100
## permutation 32 out of 100
## permutation 33 out of 100
## permutation 34 out of 100
## permutation 35 out of 100
## permutation 36 out of 100
## permutation 37 out of 100
## permutation 38 out of 100
## permutation 39 out of 100
## permutation 40 out of 100
## permutation 41 out of 100
## permutation 42 out of 100
## permutation 43 out of 100
## permutation 44 out of 100
## permutation 45 out of 100
## permutation 46 out of 100
## permutation 47 out of 100
## permutation 48 out of 100
## permutation 49 out of 100
## permutation 50 out of 100
## permutation 51 out of 100
## permutation 52 out of 100
## permutation 53 out of 100
## permutation 54 out of 100
## permutation 55 out of 100
## permutation 56 out of 100
## permutation 57 out of 100
## permutation 58 out of 100
## permutation 59 out of 100
## permutation 60 out of 100
## permutation 61 out of 100
## permutation 62 out of 100
## permutation 63 out of 100
## permutation 64 out of 100
## permutation 65 out of 100
## permutation 66 out of 100
## permutation 67 out of 100
## permutation 68 out of 100
## permutation 69 out of 100
## permutation 70 out of 100
## permutation 71 out of 100
## permutation 72 out of 100
## permutation 73 out of 100
## permutation 74 out of 100
## permutation 75 out of 100
## permutation 76 out of 100
## permutation 77 out of 100
## permutation 78 out of 100
## permutation 79 out of 100
## permutation 80 out of 100
## permutation 81 out of 100
## permutation 82 out of 100
## permutation 83 out of 100
## permutation 84 out of 100
## permutation 85 out of 100
## permutation 86 out of 100
## permutation 87 out of 100
## permutation 88 out of 100
## permutation 89 out of 100
## permutation 90 out of 100
## permutation 91 out of 100
## permutation 92 out of 100
## permutation 93 out of 100
## permutation 94 out of 100
## permutation 95 out of 100
## permutation 96 out of 100
## permutation 97 out of 100
## permutation 98 out of 100
## permutation 99 out of 100
## permutation 100 out of 100
summary(tig.results)
## Tests for differential connectivity of individual genes
##
## 26 genes are significant at level 0.001
## 26 genes are significant at level 0.005
## 26 genes are significant at level 0.01
## 55 genes are significant at level 0.05
get.results(tig.results)
## d p.value
## Ppic 0.09716742 0.00
## Fkbp7 0.12050326 0.00
## Anxa2 0.11804280 0.00
## F7 0.12197477 0.00
## Anxa5 0.11906887 0.00
## Map4k4 0.14530306 0.00
## Armcx2 0.15517749 0.00
## Marcks 0.13861997 0.00
## Slc22a7 0.15434813 0.00
## Kng2 0.16757005 0.00
## Itih1 0.14906222 0.00
## Scnn1a 0.14848855 0.00
## Col14a1 0.16069378 0.00
## Pdir 0.14063095 0.00
## X9430028I06Rik 0.15270580 0.00
## Serpinf2 0.15036694 0.00
## X1200015A22Rik 0.15468635 0.00
## AA960558 0.15251293 0.00
## Slc43a1 0.16212205 0.00
## Fabp4 0.15973700 0.00
## Tubb2 0.16003521 0.00
## Erbb3 0.16736104 0.00
## Apom 0.18553058 0.00
## Npn3 0.15701421 0.00
## Igfbp2 0.18188396 0.00
## Spp1 0.23177885 0.00
## Proz 0.12612199 0.01
## Epb4.1l2 0.12368313 0.01
## X2310016C16Rik 0.15020213 0.01
## Ddah2 0.11877532 0.01
## Igfbp7 0.15708917 0.01
## Aldh1a7 0.13667793 0.01
## X2310046G15Rik 0.15844399 0.01
## S100a10 0.15080617 0.01
## Tusc3 0.17674549 0.01
## X5031439A09Rik 0.12250126 0.02
## F2r 0.14932544 0.02
## Fetub 0.14218632 0.02
## Mat1a 0.14931635 0.02
## Col4a1 0.16470336 0.02
## Trip13 0.19332091 0.02
## Rnf11 0.12165250 0.03
## Sdcbp 0.13418668 0.03
## Tuba1 0.13218361 0.03
## Maged2 0.14606728 0.03
## Ang1 0.14038900 0.03
## Tubb4 0.17686177 0.03
## Cbr3 0.18839631 0.03
## X2600017H08Rik 0.16065576 0.03
## C86987 0.18759049 0.03
## Ap3s1 0.12320137 0.04
## Tax1bp3 0.12858950 0.04
## BC024139 0.17303655 0.04
## Ppm1l 0.18430953 0.04
## X3732412D22Rik 0.18703993 0.04
## Nid1 0.13781650 0.05
## Amigo 0.15840999 0.05
## Fsp27 0.12313638 0.05
## Cd36 0.17147827 0.05
## Ntf3 0.19664270 0.05
## Edn1 0.20941879 0.05
## Fmo3 0.16879753 0.05
## BC026585 0.20220433 0.05
## Col5a3 0.20499239 0.05
## Ggta1 0.19000063 0.06
## Serpina11 0.15423926 0.06
## X6720460F02Rik 0.16192725 0.06
## Aox1 0.16491202 0.06
## X2010002N04Rik 0.18955439 0.06
## Vim 0.13592278 0.07
## Arhgap18 0.15595248 0.07
## Arhgap24 0.16924492 0.07
## Clca2 0.18152715 0.07
## Mtnr1a 0.15186681 0.07
## Tnc 0.19193149 0.07
## Cyp2d13 0.18781141 0.07
## Xbp1 0.19459758 0.07
## Atp8b2 0.10088295 0.08
## Lcat 0.16580878 0.08
## BC038881 0.17901348 0.08
## Stk39 0.19659708 0.08
## Lrp1 0.13989013 0.09
## Tpd52 0.15729068 0.09
## Ugdh 0.13575072 0.09
## X1110008L20Rik 0.16139987 0.09
## Gpm6b 0.17271161 0.09
## E130307J04Rik 0.16841727 0.09
## Adamts4 0.19391404 0.09
## Tgm1 0.16555822 0.09
## Slc25a24 0.12214604 0.10
## Anxa3 0.12433940 0.10
## AI324046 0.13066854 0.10
## Gstm1 0.15964873 0.10
## X4632428N05Rik 0.15131068 0.10
## AI173486 0.13991740 0.10
## Slc38a2 0.18143612 0.10
## Sdcbp2 0.18703276 0.10
## Cyp4f13 0.14514032 0.11
## Mesp1 0.13794605 0.11
## Aldh1a7. 0.15625671 0.11
## X2410014A08Rik 0.17062430 0.11
## Trfr2 0.12653530 0.12
## Emcn 0.12497041 0.12
## Lxn 0.12543241 0.13
## X3930402F23Rik 0.13380030 0.13
## X1810023F06Rik 0.15350576 0.13
## X1110028A07Rik 0.14814678 0.13
## X2600011E07Rik 0.17173803 0.13
## Bet1 0.15156147 0.13
## Col1a2 0.14519873 0.14
## Fgb 0.13172604 0.14
## Dck 0.16826359 0.14
## Cdc42ep3 0.16532198 0.14
## X4930405M20Rik 0.16549799 0.14
## D330012D11Rik 0.15837145 0.14
## Msx2 0.12521485 0.15
## Plk2 0.15220054 0.15
## Synpo 0.15252586 0.15
## X1810008K03Rik 0.18891735 0.15
## Psmd8 0.15046483 0.16
## Icam2 0.12957145 0.16
## Il1r1 0.16425808 0.16
## Vtn 0.15009916 0.16
## Pex11a 0.13811639 0.16
## Cyp4f15 0.15301719 0.16
## Pdlim2 0.20624917 0.16
## Thpo 0.12546644 0.17
## Cyp2c37 0.13746491 0.17
## Scd2 0.12260652 0.18
## Nid2 0.14607186 0.18
## Matn2 0.16285510 0.18
## Fhl2 0.14516132 0.18
## Avpr1a 0.15733889 0.18
## Ngef 0.15005594 0.19
## Hprt 0.10546148 0.20
## Rnase4 0.12564596 0.21
## BC010552 0.16746730 0.21
## Raet1e 0.18816456 0.21
## Lamb3 0.17267479 0.21
## C8b 0.12890081 0.22
## Ly6d 0.14677712 0.22
## Abcg2 0.13926464 0.22
## Mcm4 0.14890072 0.23
## Aqp8 0.11606227 0.23
## BC051083 0.13275488 0.23
## Alas2 0.19409022 0.23
## X4930579G24Rik 0.15443961 0.24
## Arsa 0.16125386 0.24
## X5830411E10Rik 0.13470128 0.25
## Msr1 0.15248313 0.25
## Sart2 0.15769876 0.25
## Clstn3 0.16950956 0.25
## Zfp521 0.13921566 0.26
## X9030624L02Rik 0.14803808 0.26
## X3110050N22Rik 0.17472120 0.26
## X9.Sep 0.17951120 0.26
## Drctnnb1a 0.16556477 0.26
## AI428936 0.20526045 0.26
## X4632413K17Rik 0.11999209 0.27
## X1700093E07Rik 0.13262693 0.27
## Slc6a12 0.12371207 0.27
## Mod1 0.11461948 0.27
## Nfkbil1 0.18989939 0.27
## X9430059P22Rik 0.19975869 0.27
## X1500004O14Rik 0.12863339 0.28
## BC011468 0.13443830 0.28
## Sprr1a 0.11846883 0.28
## Mmp13 0.17344365 0.28
## Actg. 0.16161500 0.28
## Slc37a4 0.15831651 0.28
## Mx1 0.14390100 0.29
## X1110025F24Rik 0.17516957 0.29
## Lrat 0.14242857 0.30
## Ccbl1 0.13669181 0.30
## Gpx4 0.14450817 0.30
## Mlp 0.16192543 0.31
## Gnpnat1 0.16950361 0.31
## Gmpr 0.13946413 0.32
## Pgd 0.12499838 0.33
## X2600017H02Rik 0.15356857 0.33
## Gale 0.14117472 0.33
## Nrg1 0.15539084 0.33
## Crat 0.16452144 0.33
## Klra5 0.16694018 0.34
## Lama2 0.15113491 0.35
## Dll4 0.13046125 0.35
## Pole2 0.15387831 0.35
## Scarb1 0.14288780 0.35
## Phca 0.17251630 0.35
## Spnb3 0.12924374 0.36
## Mmp27 0.16377908 0.36
## Anxa1 0.16848922 0.36
## Arid5a 0.14990496 0.36
## X1810044O22Rik 0.12843278 0.36
## Lgals1 0.18189160 0.36
## Sdc4 0.13888908 0.37
## Chst7 0.13287132 0.37
## Armcx1 0.14314190 0.37
## X6430401A05Rik 0.16901981 0.37
## Phf7 0.16641806 0.39
## X5730485H21Rik 0.13074893 0.39
## Slc16a1 0.15999449 0.39
## Pparg 0.17544689 0.39
## Cml1 0.16843908 0.39
## Agpt2 0.14822173 0.40
## Slc25a10 0.17567942 0.40
## X9130422G05Rik 0.14938669 0.41
## X9030622O22Rik 0.16620614 0.41
## X2810408E11Rik 0.14220752 0.42
## Ppm1f 0.14416300 0.42
## Postn 0.17441643 0.42
## Serpina3n 0.12455319 0.44
## X5430432M24Rik 0.12085341 0.44
## Npdc1 0.13810757 0.44
## X2310004K20Rik 0.14795051 0.44
## Igfals 0.16889929 0.44
## C820005L12Rik 0.18556470 0.44
## Kifc2 0.15172966 0.45
## X2510042P03Rik 0.15440034 0.46
## Egr2 0.14004216 0.47
## Fignl1 0.13990253 0.47
## Hal 0.17065020 0.47
## Dnaic1 0.16747308 0.47
## Cyp2g1 0.15031080 0.48
## X4931406C07Rik 0.14739349 0.48
## Agxt 0.18117086 0.48
## AW547365 0.18256607 0.48
## Ces2 0.13851554 0.49
## Tceal1 0.12919030 0.49
## E430036I04Rik 0.15052145 0.50
## X2810439K08Rik 0.14385852 0.50
## Tbx6 0.18439111 0.52
## Acat2 0.14254769 0.52
## Dp1 0.17132223 0.53
## Sema6d 0.15422842 0.54
## Spata13 0.14958079 0.55
## Impa2 0.17231375 0.56
## Gne 0.13953451 0.57
## X4933434G05Rik 0.15082503 0.57
## Lmo2 0.16456725 0.58
## BC025600 0.15626836 0.60
## X2310057H16Rik 0.14631639 0.61
## Papss1 0.14408625 0.61
## Zfp533 0.15816855 0.61
## Asf1b 0.15850859 0.62
## Ung 0.15649133 0.62
## Ctsk 0.14477655 0.63
## AW146242 0.14676333 0.63
## AA545217 0.14983029 0.63
## Spon2 0.10812820 0.63
## Atp6v1a1 0.14526595 0.63
## X0610010O12Rik 0.16082861 0.63
## X2600001J17Rik 0.15012323 0.65
## Npl 0.16085035 0.66
## Egfr 0.14642894 0.66
## X5730469M10Rik 0.15404820 0.66
## Porcn 0.14965442 0.67
## Serpina3m 0.12897168 0.67
## Gck 0.16603992 0.67
## Cyp2c50 0.14538373 0.67
## BC025446 0.17924198 0.67
## X1700012B18Rik 0.18513991 0.67
## Nek2 0.12580513 0.68
## X2310014L17Rik 0.20792119 0.68
## Eml1 0.12580005 0.69
## Gpld1 0.09782543 0.70
## Cyp2c55 0.14720403 0.70
## Clcn5 0.16350439 0.70
## AA408451 0.17120958 0.70
## Bace2 0.17096023 0.70
## Mcm2 0.12145383 0.71
## Golph2 0.15154439 0.72
## Tjp2 0.15897684 0.72
## Ahcy 0.13471035 0.73
## Arhgap21 0.14346679 0.73
## Tk1 0.14859604 0.73
## H2afz 0.12651811 0.74
## Dnaja1 0.15406980 0.74
## Rcn 0.15865176 0.75
## Ephx1 0.13063829 0.75
## Gbe1 0.14436268 0.75
## Lin7a 0.17252229 0.75
## Dact2 0.13279644 0.76
## Actg 0.15345333 0.76
## D19Wsu12e 0.13034954 0.76
## X9330129D05Rik 0.14681915 0.76
## mKIAA1236 0.15111720 0.76
## Ctps 0.13339645 0.76
## Nab2 0.15015058 0.78
## Cyp2c54 0.13045141 0.78
## Tm4sf6 0.13611335 0.79
## Tjp3 0.14407809 0.80
## Gys2 0.17121730 0.80
## X4833409A17Rik 0.16518939 0.80
## Chc1l 0.17622546 0.83
## Psmb10 0.12934832 0.84
## Mme 0.13715677 0.84
## Hamp 0.17643097 0.84
## X2810489O06Rik 0.13054261 0.85
## Osbpl3 0.14292111 0.85
## Fhit 0.17371633 0.86
## Unc5b 0.13183091 0.87
## Banp 0.18003112 0.87
## Abcd3 0.12375583 0.89
## Ywhah 0.12990389 0.90
## Timp3 0.12519211 0.90
## LOC13909 0.14206693 0.91
## Pigr 0.15065682 0.93
## Olig2 0.12863477 0.97
## Rgs5 0.14097035 0.97
## Heph 0.13693018 0.98
## Nup210 0.16231391 0.98
## Mug1 0.15095152 0.98
## Gnai1 0.13951043 0.99
ourgenelist=c("Anxa2","Anxa5","F7","Proz")
tcg.results=test.class.genes(LeanMice,HeavyMice,genelist=ourgenelist, scores="PLS",distance="abs",rescale.scores=TRUE,num.permutations=100)
## Starting permutation test:
## permutation 1 out of 100
## permutation 2 out of 100
## permutation 3 out of 100
## permutation 4 out of 100
## permutation 5 out of 100
## permutation 6 out of 100
## permutation 7 out of 100
## permutation 8 out of 100
## permutation 9 out of 100
## permutation 10 out of 100
## permutation 11 out of 100
## permutation 12 out of 100
## permutation 13 out of 100
## permutation 14 out of 100
## permutation 15 out of 100
## permutation 16 out of 100
## permutation 17 out of 100
## permutation 18 out of 100
## permutation 19 out of 100
## permutation 20 out of 100
## permutation 21 out of 100
## permutation 22 out of 100
## permutation 23 out of 100
## permutation 24 out of 100
## permutation 25 out of 100
## permutation 26 out of 100
## permutation 27 out of 100
## permutation 28 out of 100
## permutation 29 out of 100
## permutation 30 out of 100
## permutation 31 out of 100
## permutation 32 out of 100
## permutation 33 out of 100
## permutation 34 out of 100
## permutation 35 out of 100
## permutation 36 out of 100
## permutation 37 out of 100
## permutation 38 out of 100
## permutation 39 out of 100
## permutation 40 out of 100
## permutation 41 out of 100
## permutation 42 out of 100
## permutation 43 out of 100
## permutation 44 out of 100
## permutation 45 out of 100
## permutation 46 out of 100
## permutation 47 out of 100
## permutation 48 out of 100
## permutation 49 out of 100
## permutation 50 out of 100
## permutation 51 out of 100
## permutation 52 out of 100
## permutation 53 out of 100
## permutation 54 out of 100
## permutation 55 out of 100
## permutation 56 out of 100
## permutation 57 out of 100
## permutation 58 out of 100
## permutation 59 out of 100
## permutation 60 out of 100
## permutation 61 out of 100
## permutation 62 out of 100
## permutation 63 out of 100
## permutation 64 out of 100
## permutation 65 out of 100
## permutation 66 out of 100
## permutation 67 out of 100
## permutation 68 out of 100
## permutation 69 out of 100
## permutation 70 out of 100
## permutation 71 out of 100
## permutation 72 out of 100
## permutation 73 out of 100
## permutation 74 out of 100
## permutation 75 out of 100
## permutation 76 out of 100
## permutation 77 out of 100
## permutation 78 out of 100
## permutation 79 out of 100
## permutation 80 out of 100
## permutation 81 out of 100
## permutation 82 out of 100
## permutation 83 out of 100
## permutation 84 out of 100
## permutation 85 out of 100
## permutation 86 out of 100
## permutation 87 out of 100
## permutation 88 out of 100
## permutation 89 out of 100
## permutation 90 out of 100
## permutation 91 out of 100
## permutation 92 out of 100
## permutation 93 out of 100
## permutation 94 out of 100
## permutation 95 out of 100
## permutation 96 out of 100
## permutation 97 out of 100
## permutation 98 out of 100
## permutation 99 out of 100
## permutation 100 out of 100
tcg.results
## Tests for differential connectivity of a class of genes
##
## Class of genes:
## Proz,Anxa2,F7,Anxa5
##
## Test statistic: delta= 0.1511344
## P-value= 0
get.results(tcg.results)
## $p.value
## [1] 0
##
## $delta
## [1] 0.1511344
##
## $class.genes
## [1] "Proz" "Anxa2" "F7" "Anxa5"
args(test.modular.structure)
## function (X1, X2, scores = "PLS", min.module.size = 5, epsilon = 0.5,
## num.permutations = 1000, check.networks = TRUE, ...)
## NULL
tms.results=test.modular.structure(LeanMice,HeavyMice,min.module.size=5, epsilon=.5,scores="PLS",rescale.scores=TRUE,num.permutations=100)
## Starting permutation test:
## permutation 1 out of 100
## permutation 2 out of 100
## permutation 3 out of 100
## permutation 4 out of 100
## permutation 5 out of 100
## permutation 6 out of 100
## permutation 7 out of 100
## permutation 8 out of 100
## permutation 9 out of 100
## permutation 10 out of 100
## permutation 11 out of 100
## permutation 12 out of 100
## permutation 13 out of 100
## permutation 14 out of 100
## permutation 15 out of 100
## permutation 16 out of 100
## permutation 17 out of 100
## permutation 18 out of 100
## permutation 19 out of 100
## permutation 20 out of 100
## permutation 21 out of 100
## permutation 22 out of 100
## permutation 23 out of 100
## permutation 24 out of 100
## permutation 25 out of 100
## permutation 26 out of 100
## permutation 27 out of 100
## permutation 28 out of 100
## permutation 29 out of 100
## permutation 30 out of 100
## permutation 31 out of 100
## permutation 32 out of 100
## permutation 33 out of 100
## permutation 34 out of 100
## permutation 35 out of 100
## permutation 36 out of 100
## permutation 37 out of 100
## permutation 38 out of 100
## permutation 39 out of 100
## permutation 40 out of 100
## permutation 41 out of 100
## permutation 42 out of 100
## permutation 43 out of 100
## permutation 44 out of 100
## permutation 45 out of 100
## permutation 46 out of 100
## permutation 47 out of 100
## permutation 48 out of 100
## permutation 49 out of 100
## permutation 50 out of 100
## permutation 51 out of 100
## permutation 52 out of 100
## permutation 53 out of 100
## permutation 54 out of 100
## permutation 55 out of 100
## permutation 56 out of 100
## permutation 57 out of 100
## permutation 58 out of 100
## permutation 59 out of 100
## permutation 60 out of 100
## permutation 61 out of 100
## permutation 62 out of 100
## permutation 63 out of 100
## permutation 64 out of 100
## permutation 65 out of 100
## permutation 66 out of 100
## permutation 67 out of 100
## permutation 68 out of 100
## permutation 69 out of 100
## permutation 70 out of 100
## permutation 71 out of 100
## permutation 72 out of 100
## permutation 73 out of 100
## permutation 74 out of 100
## permutation 75 out of 100
## permutation 76 out of 100
## permutation 77 out of 100
## permutation 78 out of 100
## permutation 79 out of 100
## permutation 80 out of 100
## permutation 81 out of 100
## permutation 82 out of 100
## permutation 83 out of 100
## permutation 84 out of 100
## permutation 85 out of 100
## permutation 86 out of 100
## permutation 87 out of 100
## permutation 88 out of 100
## permutation 89 out of 100
## permutation 90 out of 100
## permutation 91 out of 100
## permutation 92 out of 100
## permutation 93 out of 100
## permutation 94 out of 100
## permutation 95 out of 100
## permutation 96 out of 100
## permutation 97 out of 100
## permutation 98 out of 100
## permutation 99 out of 100
## permutation 100 out of 100
summary(tms.results)
## Tests for differential modular structure in two networks of genes
##
## Network 1:
## Class: modules
## 10 genes in Module 1
## 44 genes in Module 2
## 6 genes in Module 3
## 5 genes in Module 4
## 10 genes in Module 5
##
## Network 2:
## Class: modules
## 300 genes in Module 1
##
## Test statistic: N= 0.9755889
## P-value= 0.07
X1=cbind(Gz=c(.4,.5,-.8),Gy=c(.8,-.8,-.3), Gb=c(1.1,.3,.8),Ga=c(1.5,-.6,-1.5))
X2=cbind(Gc=c(-1.6,1.8,-.5,.6),Ga=c(.6,-.2,.8,2.2),Gb=c(2,1.6,.3,.5))
networks=new("pairOfNetworks",network1=X1,network2=X2)
networks
## Class: pairOfNetworks
## Network 1: 3 subjects and 4 genes.
## Network 2: 4 subjects and 3 genes.
## The networks have 2 genes in common.
get.common.networks(networks)
## $network1
## Gb Ga
## [1,] 1.1 1.5
## [2,] 0.3 -0.6
## [3,] 0.8 -1.5
##
## $network2
## Gb Ga
## [1,] 2.0 0.6
## [2,] 1.6 -0.2
## [3,] 0.3 0.8
## [4,] 0.5 2.2
PLSnet(X1,ncom=2,rescale.data=TRUE,symmetrize.scores=TRUE, rescale.scores=TRUE)
## Gz Gy Gb Ga
## Gz 1.0000000 -0.1609580 -0.8778705 1.0000000
## Gy -0.1609580 1.0000000 0.9692391 0.6735266
## Gb -0.8778705 0.9692391 1.0000000 0.3125738
## Ga 1.0000000 0.6735266 0.3125738 1.0000000
args(gennet)
## function (data, f, recenter.data = FALSE, rescale.data = FALSE,
## symmetrize.scores = FALSE, rescale.scores = FALSE, ...)
## NULL
require(lars)
## Loading required package: lars
## Loaded lars 1.2
our.LASSO=function(X,y,s=s,mode=mode){
coef(lars(X,y,type="lasso",normalize=FALSE,intercept=FALSE),
s=s,mode=mode)
}
gennet(X1,our.LASSO,recenter.data=TRUE,rescale.data=TRUE,
symmetrize.scores=TRUE,rescale.scores=TRUE,s=1,mode="lambda")
## Gz Gy Gb Ga
## Gz 1.0000000 0.0000000 0 0.3953771
## Gy 0.0000000 1.0000000 1 0.5017072
## Gb 0.0000000 1.0000000 1 0.0000000
## Ga 0.3953771 0.5017072 0 1.0000000
our.dist=function(score1,score2){pmin(abs(score1-score2),1)}
our.LASSOnet=function(data,s=1,mode="lambda"){
gennet(data,our.LASSO,recenter.data=TRUE,rescale.data=TRUE,
symmetrize.scores=TRUE,rescale.scores=TRUE,s=s,mode=mode)
}
ourgenelist=c("Anxa2","Anxa5","F7","Proz")
results=test.class.genes(LeanMice,HeavyMice,genelist=ourgenelist,
scores=our.LASSOnet,distance=our.dist,num.permutations=10)
## Starting permutation test:
## permutation 1 out of 10
## permutation 2 out of 10
## permutation 3 out of 10
## permutation 4 out of 10
## permutation 5 out of 10
## permutation 6 out of 10
## permutation 7 out of 10
## permutation 8 out of 10
## permutation 9 out of 10
## permutation 10 out of 10
results
## Tests for differential connectivity of a class of genes
##
## Class of genes:
## Proz,Anxa2,F7,Anxa5
##
## Test statistic: delta= 0.01925669
## P-value= 0.2
set.seed(123)
s=matrix(runif(100,-1,1),10,10);diag(s)=1;s=round((s+t(s))/2,1)
s
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
## [1,] 1.0 0.7 0.3 0.8 0.1 -0.9 0.2 0.6 -0.2 -0.4
## [2,] 0.7 1.0 0.4 0.5 -0.5 0.3 -0.7 -0.3 0.0 0.6
## [3,] 0.3 0.4 1.0 0.7 0.1 0.5 -0.1 0.3 -0.3 -0.5
## [4,] 0.8 0.5 0.7 1.0 -0.6 -0.4 0.0 -0.8 0.1 -0.1
## [5,] 0.1 -0.5 0.1 -0.6 1.0 -0.3 0.0 -0.1 -0.6 0.2
## [6,] -0.9 0.3 0.5 -0.4 -0.3 1.0 -0.4 0.0 0.3 -0.4
## [7,] 0.2 -0.7 -0.1 0.0 0.0 -0.4 1.0 0.2 0.8 0.2
## [8,] 0.6 -0.3 0.3 -0.8 -0.1 0.0 0.2 1.0 0.2 -0.8
## [9,] -0.2 0.0 -0.3 0.1 -0.6 0.3 0.8 0.2 1.0 -0.4
## [10,] -0.4 0.6 -0.5 -0.1 0.2 -0.4 0.2 -0.8 -0.4 1.0
the.modules=network.modules(s,m=3,epsilon=.7)
the.modules
## Module 1:
## Gene 1,Gene 2,Gene 3,Gene 4,Gene 6,Gene 7,Gene 8,Gene 9,Gene 10
summary(the.modules)
## Class: modules
## 9 genes in Module 1
get.modules(the.modules)
## Gene 1 Gene 2 Gene 3 Gene 4 Gene 5 Gene 6 Gene 7 Gene 8 Gene 9
## 1 1 1 1 0 1 1 1 1
## Gene 10
## 1
## Levels: 0 1
network.modules(s,m=3,epsilon=.7,plot=TRUE,interactive=FALSE)
## Loading required package: igraph
##
## Attaching package: 'igraph'
## The following objects are masked from 'package:stats':
##
## decompose, spectrum
## The following object is masked from 'package:base':
##
## union

## Module 1:
## Gene 1,Gene 2,Gene 3,Gene 4,Gene 6,Gene 7,Gene 8,Gene 9,Gene 10