[BioC] rbind of MALists
Matthew Scholz
schmatthew at gmail.com
Wed Jun 14 16:54:55 CEST 2006
Gordon,
Thank you for your advice. I'm still having a problem rbinding my
MALists and have attached below the output of the commands you asked
me to execute. While you are correct that I missed a "$'" in my
genesStatus syntax, correcting this does not seem to remedy the
problem. In addition, I realized that whether I correct this or not I
have no problem doing:
new = rbind(RGAmodel, RGAmodel)
but cannot do:
new = rbind(RGAmodel, RGBmodel)
Dawn slowly broke over my cratered skull when I noticed that the
column names for these two lists are not the same. I wanted to test
whether this was the problem, but noticed that when I tried:
colnames(RGBmodel) = colnames(RGAmodel)
Error in "colnames<-"(`*tmp*`, value = c("11_1.7A.003_133",
"11_1.7A.004_134", :
'dimnames' applied to non-array
According to the help for dimnames.MAList, colnames is supposed to
work 'as expected', so I'm not sure what the hang up is.
If it helps, here is the output from the commands you asked me to execute:
> show(RGAmodel)
An object of class "MAList"
$weights
11_1.7A.003_133 11_1.7A.004_134 11_1.7A.005_135 11_1.7A.006_136
[1,] 1 0 1 1
[2,] 1 1 1 0
[3,] 1 1 1 1
[4,] 1 1 1 1
[5,] 1 1 1 1
11_1.7A.007_137 11_1.7A.008_138 11_1.7A.009_139 11_1.7A.010_140
[1,] 1 1 1 1
[2,] 1 1 1 1
[3,] 1 1 1 1
[4,] 1 1 1 1
[5,] 1 1 1 1
11_1.7A.011_141 11_1.7A.012_142 11_1.7A.013_143 11_1.7A.014_144
[1,] 0 1 1 0
[2,] 1 1 1 1
[3,] 1 1 1 1
[4,] 1 1 1 1
[5,] 1 1 1 1
11_1.7A.015_145 11_1.7A.016_146 11_1.7A.017_147 11_1.7A.018_148
[1,] 1 1 1 0
[2,] 1 1 1 1
[3,] 1 1 1 1
[4,] 1 1 1 1
[5,] 1 1 1 1
11_1.7A.019_149 11_1.7A.020_150 11_1.7A.021_151 11_1.7A.022_152
[1,] 1 1 1 1
[2,] 1 1 1 1
[3,] 1 1 1 1
[4,] 1 1 1 1
[5,] 1 1 1 1
11_1.7A.023_153 11_1.7A.024_154 11_1.7A.025_155 11_1.7A.026_156
[1,] 1 1 1 0
[2,] 1 1 1 1
[3,] 1 1 1 1
[4,] 1 1 1 1
[5,] 1 1 1 1
11_1.7A.027_157 11_1.7A.028_158 11_1.7A.029_159 11_1.7A.030_160
[1,] 1 1 1 1
[2,] 1 1 1 1
[3,] 1 1 1 1
[4,] 1 1 1 1
[5,] 1 1 1 1
11_1.7A.031_161 11_1.7A.032_162 11_1.7A.033_163 11_1.7A.034_164
[1,] 1 1 1 1
[2,] 1 1 1 1
[3,] 1 1 1 1
[4,] 1 1 1 1
[5,] 1 1 1 1
32443 more rows ...
$targets
[1] "11_1.7A.003_133.gpr" "11_1.7A.004_134.gpr" "11_1.7A.005_135.gpr"
[4] "11_1.7A.006_136.gpr" "11_1.7A.007_137.gpr"
27 more rows ...
$genes
Block Row Column ID
1 1 1 1 MZ00040724
2 1 1 2 MZ00040730
3 1 1 3 MZ00040748
4 1 1 4 MZ00040754
5 1 1 5 MZ00040772
32443 more rows ...
$source
[1] "genepix"
$printer
$ngrid.r
[1] 12
$ngrid.c
[1] 4
$nspot.r
[1] 26
$nspot.c
[1] 26
$ndups
[1] 1
$spacing
[1] 1
attr(,"class")
[1] "PrintLayout"
$genesStatus
[1] "oligo" "oligo" "oligo" "oligo" "oligo"
32443 more elements ...
$M
11_1.7A.003_133 11_1.7A.004_134 11_1.7A.005_135 11_1.7A.006_136
[1,] -1.1025283 -0.4665859 -1.2443265 -0.7460295
[2,] -0.6452398 1.1784430 -1.1102468 -0.2550268
[3,] 0.1586242 0.1141068 -0.3987019 -0.7830444
[4,] 0.9701582 -1.1933750 0.2630213 -0.1432319
[5,] -0.5505187 1.2380281 -0.8449859 0.5921425
11_1.7A.007_137 11_1.7A.008_138 11_1.7A.009_139 11_1.7A.010_140
[1,] 0.30430951 -0.7297204 -0.1255653 1.5487331
[2,] -0.29503663 0.7602903 -0.3451359 -0.3052871
[3,] -0.23589470 -0.4166166 -0.1707812 0.7727964
[4,] -0.65639565 -1.0222411 -0.3986391 1.7082251
[5,] -0.09215817 0.6226440 0.0880441 -0.6095265
11_1.7A.011_141 11_1.7A.012_142 11_1.7A.013_143 11_1.7A.014_144
[1,] -1.6717252 0.355848103 -1.29343084 -0.8880984
[2,] -0.1466151 0.009279503 -0.02537785 -0.1948173
[3,] -0.2785056 0.455366117 -0.37567263 -0.3661568
[4,] 0.2075807 -0.542606661 0.09641300 -0.4351683
[5,] -0.6158258 1.054632489 -0.47918786 -0.5904125
11_1.7A.015_145 11_1.7A.016_146 11_1.7A.017_147 11_1.7A.018_148
[1,] 0.7297666 -0.2570969 -0.8220234 -1.1114843
[2,] -0.3067739 -1.0323099 0.1110739 -0.3244558
[3,] -0.9335876 -0.8589877 0.5613253 1.2955507
[4,] -1.8261876 -0.6935107 1.1364680 0.3303186
[5,] -0.4911613 0.5464649 -1.9364591 2.0930105
11_1.7A.019_149 11_1.7A.020_150 11_1.7A.021_151 11_1.7A.022_152
[1,] 2.3664853 1.3320860 -0.3395910 -1.0286536
[2,] -0.6584151 -0.7052792 -0.2159054 0.3553915
[3,] 0.8548703 0.8395172 0.5626271 0.4381228
[4,] -0.2767574 -0.8201371 0.9660881 0.9853922
[5,] -0.1787140 0.4437432 -0.6651411 -0.3365878
11_1.7A.023_153 11_1.7A.024_154 11_1.7A.025_155 11_1.7A.026_156
[1,] -1.62025658 -1.6703972 -1.5040131 -1.59465519
[2,] -1.03440276 -0.2526851 0.1587630 0.11541673
[3,] -0.09198932 -0.2073343 0.5093910 0.52420791
[4,] 0.48629916 -1.0061265 -0.1088980 -0.04149065
[5,] 0.03810017 -0.4870690 0.1284282 1.72733520
11_1.7A.027_157 11_1.7A.028_158 11_1.7A.029_159 11_1.7A.030_160
[1,] -1.2125924 -2.0282105 -1.6003112 -1.9826522
[2,] -0.9812115 0.8340283 -1.0061678 -0.1848412
[3,] -0.1897043 -0.6798321 -0.4078205 -0.9279219
[4,] 0.2455694 -0.9094738 0.9320699 -0.3152323
[5,] -0.1796293 0.8590802 -1.2228430 -1.1046028
11_1.7A.031_161 11_1.7A.032_162 11_1.7A.033_163 11_1.7A.034_164
[1,] 0.45430037 -1.7238789 0.01628412 1.7308700
[2,] 0.34254820 0.7655072 -0.07430473 0.1912626
[3,] 0.08683668 -2.0641031 -0.97659228 0.2502367
[4,] -0.17631164 -0.4071476 -1.51322855 0.8134877
[5,] 0.50517021 -1.8551115 0.31450027 1.1886982
32443 more rows ...
$A
11_1.7A.003_133 11_1.7A.004_134 11_1.7A.005_135 11_1.7A.006_136
[1,] 7.067742 6.314364 7.187490 8.572728
[2,] 9.012202 10.321708 11.347639 9.619762
[3,] 8.820257 9.480137 11.152441 10.103530
[4,] 9.113281 8.818256 9.237627 8.845255
[5,] 11.305631 11.811662 12.468975 11.767829
11_1.7A.007_137 11_1.7A.008_138 11_1.7A.009_139 11_1.7A.010_140
[1,] 13.216188 12.753544 11.138413 11.665765
[2,] 10.100641 9.813759 10.956860 10.238678
[3,] 10.869273 10.015065 10.561280 10.431992
[4,] 9.805024 8.536809 8.462371 8.964282
[5,] 11.478938 11.761713 13.455756 12.570729
11_1.7A.011_141 11_1.7A.012_142 11_1.7A.013_143 11_1.7A.014_144
[1,] 6.721641 5.932721 6.953904 6.500138
[2,] 11.400485 11.968232 11.727238 10.978747
[3,] 10.459052 10.645864 10.611947 10.003722
[4,] 9.042731 9.411245 8.887326 8.597725
[5,] 12.874397 13.502570 13.623161 12.659994
11_1.7A.015_145 11_1.7A.016_146 11_1.7A.017_147 11_1.7A.018_148
[1,] 5.033375 5.723043 6.116828 6.842104
[2,] 10.362262 9.771524 9.590353 11.194014
[3,] 9.913907 8.376788 7.768291 9.634776
[4,] 8.512061 7.199640 8.130019 9.597877
[5,] 12.092490 11.085349 10.279450 12.161460
11_1.7A.019_149 11_1.7A.020_150 11_1.7A.021_151 11_1.7A.022_152
[1,] 11.995929 13.127644 9.225215 10.92839
[2,] 9.592951 9.717794 10.451920 11.36524
[3,] 9.560552 9.686789 10.551277 10.45670
[4,] 8.812669 9.390420 8.927714 8.96156
[5,] 11.777360 11.345326 12.712251 13.00112
11_1.7A.023_153 11_1.7A.024_154 11_1.7A.025_155 11_1.7A.026_156
[1,] 7.080557 6.774674 6.905477 6.894019
[2,] 11.728278 11.298933 10.281641 11.074350
[3,] 10.743400 9.924770 8.743135 9.325957
[4,] 9.496900 8.646215 7.675072 8.711542
[5,] 13.572918 12.252402 12.518318 11.763458
11_1.7A.027_157 11_1.7A.028_158 11_1.7A.029_159 11_1.7A.030_160
[1,] 6.948659 6.849376 7.018617 7.895815
[2,] 10.500807 10.238772 10.185412 11.475047
[3,] 9.345473 9.949614 10.048936 10.199916
[4,] 8.389225 8.615887 8.910566 9.024467
[5,] 12.117364 12.060297 12.591901 13.183420
11_1.7A.031_161 11_1.7A.032_162 11_1.7A.033_163 11_1.7A.034_164
[1,] 8.065446 12.870417 13.320382 9.838204
[2,] 11.405467 10.001051 9.212157 10.999377
[3,] 10.927000 9.657809 9.245457 9.777995
[4,] 9.782490 9.239337 8.100707 7.909291
[5,] 13.772576 11.057297 10.929249 12.417927
32443 more rows ...
> show(RGBmodel)
An object of class "MAList"
$weights
11_1.7B.003 11_1.7B.004 11_1.7B.005 11_1.7B.006 11_1.7B.007 11_1.7B.008
[1,] 1 1 0 1 1 1
[2,] 1 1 1 1 1 1
[3,] 1 1 1 1 1 1
[4,] 1 1 1 1 1 0
[5,] 1 1 1 1 1 0
11_1.7B.009 11_1.7B.010 11_1.7B.011 11_1.7B.012 11_1.7B.013 11_1.7B.014
[1,] 1 1 1 1 1 1
[2,] 1 1 0 1 1 0
[3,] 1 0 0 0 1 1
[4,] 0 1 1 1 0 0
[5,] 0 1 1 1 1 1
11_1.7B.015 11_1.7B.016 11_1.7B.017 11_1.7B.018 11_1.7B.019 11_1.7B.020
[1,] 1 1 1 1 1 1
[2,] 1 1 0 1 1 1
[3,] 1 1 1 1 1 1
[4,] 1 1 0 1 1 1
[5,] 1 1 0 1 1 1
11_1.7B.021 11_1.7B.022 11_1.7B.023 11_1.7B.024 11_1.7B.025 11_1.7B.026
[1,] 1 0 1 1 1 1
[2,] 1 0 1 1 1 1
[3,] 1 1 1 1 1 1
[4,] 0 0 1 0 1 1
[5,] 1 1 1 1 1 1
11_1.7B.027 11_1.7B.028 11_1.7B.029 11_1.7B.030 11_1.7B.031 11_1.7B.032
[1,] 1 0 1 1 0 1
[2,] 0 1 1 1 1 1
[3,] 1 0 0 1 0 1
[4,] 0 0 1 1 1 1
[5,] 1 1 1 1 1 1
11_1.7B.033 11_1.7B.034
[1,] 1 1
[2,] 1 1
[3,] 1 1
[4,] 1 1
[5,] 0 1
32443 more rows ...
$targets
[1] "11_1.7B.003.gpr" "11_1.7B.004.gpr" "11_1.7B.005.gpr" "11_1.7B.006.gpr"
[5] "11_1.7B.007.gpr"
27 more rows ...
$genes
Block Row Column ID Name
1 1 1 1 MZ00002380 AZM4_14521
2 1 1 2 MZ00002386 AZM4_49988
3 1 1 3 MZ00002404 AZM4_100937
4 1 1 4 MZ00002410 AZM4_135577
5 1 1 5 MZ00002428 AZM4_79828
32443 more rows ...
$source
[1] "genepix"
$printer
$ngrid.r
[1] 12
$ngrid.c
[1] 4
$nspot.r
[1] 26
$nspot.c
[1] 26
$ndups
[1] 1
$spacing
[1] 1
attr(,"class")
[1] "PrintLayout"
$genesStatus
[1] "oligo" "oligo" "oligo" "oligo" "oligo"
32443 more elements ...
$M
11_1.7B.003 11_1.7B.004 11_1.7B.005 11_1.7B.006 11_1.7B.007 11_1.7B.008
[1,] 1.19167753 0.56248514 0.53057343 -0.2368892 0.08951696 0.02770597
[2,] 0.40105375 -0.17197218 0.04136003 0.1987125 -0.61484562 0.49959770
[3,] -0.04242721 -0.08305925 0.41395437 0.4196492 -0.23034644 -0.28972366
[4,] -1.42987096 -1.13447249 -0.92317619 -0.8872826 -0.70401948 -0.76497663
[5,] 1.30575510 -0.70657723 -0.43743378 -0.7544761 0.40971434 0.78362609
11_1.7B.009 11_1.7B.010 11_1.7B.011 11_1.7B.012 11_1.7B.013 11_1.7B.014
[1,] 0.3479275 -0.36757062 -0.02604215 -0.2367116 0.33686435 -0.74121990
[2,] -0.2402348 0.01589095 0.01272487 -1.1285366 0.36399265 -0.19820755
[3,] -0.6470032 1.14420768 0.97352742 -0.8948713 0.10062537 -0.57570915
[4,] -0.8760413 -0.22059179 -1.34896806 -1.2611718 -0.06204539 0.06817653
[5,] 0.2033776 0.31256786 -1.23194515 1.6987695 -1.71248001 1.30498581
11_1.7B.015 11_1.7B.016 11_1.7B.017 11_1.7B.018 11_1.7B.019 11_1.7B.020
[1,] 0.495959729 -0.1746219 0.1797239 0.7036316 -0.16213818 0.4067894
[2,] -0.003739179 0.2453268 -0.1621772 2.3024631 -0.07363043 0.7304520
[3,] 0.159801229 -0.4700611 -0.9515640 -0.4111921 -1.18104994 -1.2124029
[4,] 0.114155727 -0.3548972 0.2433237 -0.9400939 -1.42271526 -2.3694402
[5,] 0.544882076 -0.1736855 0.3748293 -0.5401609 -1.54493748 -2.1387979
11_1.7B.021 11_1.7B.022 11_1.7B.023 11_1.7B.024 11_1.7B.025 11_1.7B.026
[1,] 0.87601557 0.01696255 1.5156342 -0.1698067 0.2883991 -0.2841663
[2,] 1.13356017 0.66054567 1.7647670 -0.2842037 -0.7659591 -1.1996018
[3,] -0.50232181 0.27405068 -0.1089857 -0.2146920 -1.0162737 -0.9083534
[4,] -0.01466337 -0.34657287 -1.9505463 0.4416073 -1.4860429 -0.5330481
[5,] 2.27579475 2.72701260 -1.3792235 0.6699561 0.1794446 -0.4531982
11_1.7B.027 11_1.7B.028 11_1.7B.029 11_1.7B.030 11_1.7B.031 11_1.7B.032
[1,] 0.2316674 -1.6718436 -2.5984281 0.09607997 -0.4244763 1.7807719
[2,] 0.7481809 -0.1658066 0.6723337 -0.57179068 -0.9190142 0.7851527
[3,] 0.4386763 -0.5111595 -0.6678957 -0.85591202 -0.7804590 -0.8124523
[4,] 0.3238812 -1.2772746 -0.6445291 -1.46969652 -1.3270658 -1.7383684
[5,] 1.4530629 -0.6506754 1.1897330 -2.02066054 -0.0973254 0.4464960
11_1.7B.033 11_1.7B.034
[1,] 0.10719492 1.1977097
[2,] 0.68606341 0.6504811
[3,] 0.08184476 -0.4843391
[4,] -0.71939913 -1.6988968
[5,] 0.04671642 -0.5900561
32443 more rows ...
$A
11_1.7B.003 11_1.7B.004 11_1.7B.005 11_1.7B.006 11_1.7B.007 11_1.7B.008
[1,] 5.867874 5.795048 6.606571 5.203723 4.594767 5.611233
[2,] 6.077780 5.856446 6.165828 5.207372 4.983079 6.273711
[3,] 6.864595 6.964256 6.980932 5.510978 4.754364 5.671809
[4,] 6.116169 6.978315 6.171485 5.522281 5.728463 6.463469
[5,] 10.855069 11.316873 11.023288 9.124135 5.120124 5.851479
11_1.7B.009 11_1.7B.010 11_1.7B.011 11_1.7B.012 11_1.7B.013 11_1.7B.014
[1,] 5.730457 5.481935 4.769377 6.083786 5.007966 5.141382
[2,] 5.865751 8.588466 6.760794 7.065903 5.453762 6.706594
[3,] 5.710088 6.986815 6.362918 7.595231 5.448007 5.637921
[4,] 6.230352 6.397243 6.516190 7.086991 6.891454 6.854516
[5,] 6.227262 7.091886 8.738373 10.351816 9.945595 9.146608
11_1.7B.015 11_1.7B.016 11_1.7B.017 11_1.7B.018 11_1.7B.019 11_1.7B.020
[1,] 4.466604 5.249380 5.773108 4.728652 5.411685 3.853863
[2,] 4.929356 5.741409 6.388231 8.304058 5.217227 3.680880
[3,] 5.051200 6.007722 5.661640 6.647807 4.981389 4.680015
[4,] 4.650070 6.526112 6.767180 5.274246 5.715423 4.620214
[5,] 5.397292 6.021343 6.059574 6.737000 7.510173 10.783081
11_1.7B.021 11_1.7B.022 11_1.7B.023 11_1.7B.024 11_1.7B.025 11_1.7B.026
[1,] 7.050508 6.661605 6.715157 5.441985 4.906303 4.089464
[2,] 5.395864 6.549262 8.524508 5.449342 5.076816 5.204264
[3,] 6.318431 6.720648 5.547102 5.422083 5.247963 4.705592
[4,] 7.760107 6.975563 4.656751 6.334097 6.063947 5.693239
[5,] 8.760490 10.588693 7.961084 6.459167 10.086370 7.462502
11_1.7B.027 11_1.7B.028 11_1.7B.029 11_1.7B.030 11_1.7B.031 11_1.7B.032
[1,] 5.456981 6.002540 6.858067 5.221205 6.810400 5.971652
[2,] 6.286845 6.897648 5.487945 5.378415 9.072984 5.824060
[3,] 5.908124 6.712162 6.534923 5.714359 6.715101 5.066708
[4,] 6.463484 6.641324 5.985717 5.886168 6.048547 5.435426
[5,] 8.315183 9.846694 11.351338 9.069206 7.598162 6.237865
11_1.7B.033 11_1.7B.034
[1,] 5.203755 4.379203
[2,] 6.236316 4.191219
[3,] 5.174114 4.214278
[4,] 5.934155 5.716151
[5,] 6.986043 5.391660
32443 more rows ...
Thanks again for you sage advice,
Matt
On 6/13/06, Gordon K Smyth <smyth at wehi.edu.au> wrote:
>
> > Date: Mon, 12 Jun 2006 15:20:24 -0700
> > From: "Matthew Scholz" <schmatthew at gmail.com>
> > Subject: [BioC] rbind of MALists
> > To: bioconductor at stat.math.ethz.ch
> >
> > Hi all,
> >
> > I'm trying to combine two MALists, named RGAmodel and RGBmodel, using
> > rbind and am running into the following problem:
> >
> >> rbind(RGAmodel, RGBmodel)
> > Error in match.names(clabs, names(xi)) : names don't match previous names:
> > Name
> > In addition: Warning message:
> > longer object length
> > is not a multiple of shorter object length in: clabs == nmi
> >
> > I checked that the names were the same for each object and that the
> > classes and dimensions match:
> >
> >> names(RGAmodel)
> > [1] "weights" "targets" "genes" "source" "printer"
> > [6] "genesStatus" "M" "A"
> >> names(RGBmodel)
> > [1] "weights" "targets" "genes" "source" "printer"
> > [6] "genesStatus" "M" "A"
> >
> >> class(RGAmodel)
> > [1] "MAList"
> > attr(,"package")
> > [1] "limma"
> >
> >> class(RGBmodel)
> > [1] "MAList"
> > attr(,"package")
> > [1] "limma"
> >
> >> dim(RGAmodel)
> > [1] 32448 32
> >
> >> dim(RGBmodel)
> > [1] 32448 32
> >
> > What am I doing wrong? I'm using R2.3.0 and Bioconductor 1.7
> >
> > Thanks,
> >
> > Matt
> >
> > --
> > Matt Scholz
> > Senior Research Specialist
> > Department of Plant Sciences
> > University of Arizona
> > (520) 621-1695
>
> Dear Matt,
>
> Firstly, your MAList objects contain non-standard components "genesStatus" which are not
> understood by limma, so it will not be possible for rbind() to work correctly on your objects. Is
> it possible that you meant to follow the limma User's Guide advice on setting the control status
> of each probe (e.g., on page 18)
>
> RG$genes$Status <- controlStatus(spottypes, RG)
>
> but have missed out the second $-sign? If you did, that would produce the extra component in the
> data objects that we see above.
>
> You can remove the non-standard components by
>
> RGAmodel$genesStatus <- NULL
> RGBmodel$genesStatus <- NULL
>
> Do the objects rbind() correctly after removing these components? If the problem persists, can
> you please show the output from
>
> show(RGAmodel)
> show(RGBmodel)
>
> so we can see more information.
>
> Best wishes
> Gordon
>
>
>
--
Matt Scholz
Senior Research Specialist
Department of Plant Sciences
University of Arizona
(520) 621-1695
More information about the Bioconductor
mailing list