Open nataliesaini opened 7 years ago
Have you also checked the rows?
I also find this problem, it seems there is problem in
https://github.com/renozao/NMF/blob/e46bec199191766b863e221db79288cf4eb61028/R/nmf.R#L1964
I chop 20 rows of data.
structure(c(195.543881775748, 174.960315394228, 182.445248993188,
149.698666123964, 106.660299570561, 188.994565392692, 203.028814979973,
105.724683275706, 152.50551622563, 185.252098897487, 154.3767496706,
135.66441637221, 209.57813136303, 162.797299367048, 195.543881775748,
168.410998517754, 186.187715587077, 218.934298110908, 205.835664999403,
163.732915957955, 104.456118224252, 125.039684605772, 117.554751006812,
150.301333876036, 193.339700429439, 111.005434607308, 96.9711850200267,
194.275316724294, 147.49448377437, 114.747901102513, 145.6232503294,
164.33558362779, 90.4218686369702, 137.202700632952, 104.456118224252,
131.589001482246, 113.812284412923, 81.0657018890915, 94.1643350005972,
136.267084042045, 187.171458930515, 394.578560475603, 58.0326686614512,
140.170758252125, 77.3860574121742, 66.3865409452847, 108.432984905643,
582.327115255311, 84.4218422360848, 85.5213610463137, 82.3601311952335,
166.562552856049, 64.9017267201668, 162.65932538001, 93.6783238860735,
94.7096057469985, 172.748511829992, 72.3433557847872, 79.5261308134292,
327.571152699285, 239.828541069485, 21.4214395243967, 149.967331338549,
273.829241747875, 471.613942587826, 229.613459054715, 180.567015094357,
43.672884744689, 194.578157763915, 138.478638953686, 184.639868804766,
335.437447143951, 139.098273279833, 622.34067461999, 130.321676113926,
301.290394253002, 30.2514881700083, 141.656644215213, 138.473869186571,
17.4288473007151, 362.254087221155, 375.43624683783, 130.60158289838,
327.379289537622, 417.710475502803, 190.379891918887, 189.097238249838,
562.568521708061, 122.598214128007, 178.447276220984, 190.053253530103,
318.800557877777, 140.670569817882, 522.852068705163, 150.442146677065,
118.719913419774, 150.868471981321, 171.008226960061, 155.403246775294,
309.716757936419, 42.7459127788448, 18.5637531621703, 55.3984171016196,
64.6207104623783, 109.289524497197, 83.6201080811128, 77.9027617501617,
41.4314782919393, 134.401785871993, 23.5527237790163, 54.9467464698975,
161.199442122223, 41.329430182118, 240.147931294838, 51.5578533229352,
255.280086580226, 30.131528018679, 20.991773039939, 40.5967532247058,
13.283242063581, 4.13077989753233, 2.52436549293642, 2.06538994980728,
2.75385326606267, 1.14743886042565, 1.83590217980438, 3.44231658283861,
1.1474388609462, 1.83590217824271, 2.98334103866835, 1.14743886250788,
2.52436549345698, 3.44231658127694, 1.37692663511357, 2.52436549397754,
1.37692663251078, 2.52436549397754, 5.27821875899909, 3.90129212596776,
2.9833410381478, 4.15247127830174, 2.53762133673995, 2.0762356402869,
2.76831418667052, 1.15346424397271, 1.84554279376442, 3.46039273362216,
1.15346424454072, 1.84554279206038, 2.99900703603308, 1.15346424624477,
2.53762133730797, 3.46039273191812, 1.38415709560733, 2.53762133787598,
1.38415709276725, 2.53762133787598, 5.30593552341048, 3.92177843007521,
2.99900703546507, 3.44218070311759, 2.10355487412741, 1.72109035496545,
2.29478713881838, 0.956161306421552, 1.52985810049446, 2.86848392437464,
0.956161308124881, 1.52985809538447, 2.48601940180602, 0.956161313234868,
2.10355487583074, 2.86848391926466, 1.14739357622251, 2.10355487753407,
1.14739356770586, 2.10355487753407, 4.3983420129458, 3.25094844353661,
2.48601940010269, 3.33699344430454, 2.03927377151944, 1.66849672617437,
2.22466230022513, 0.926942623417928, 1.48310820953498, 2.78082787628693,
0.926942625428977, 1.48310820350183, 2.41005082691976, 0.926942631462123,
2.03927377353049, 2.78082787025378, 1.11233115815676, 2.03927377554154,
1.11233114810151, 2.03927377554154, 4.26393607174457, 3.151604921632,
2.41005082490871, 2.06106375500493, 1.2595389613919, 1.03053194195229,
1.37404256778645, 0.572517709723592, 0.916028528907229, 1.71755322584552,
0.572517741948507, 0.916028432232487, 1.48854614195608, 0.572517838623248,
1.25953899361682, 1.71755312917078, 0.687021412792879, 1.25953902584173,
0.687021251668311, 1.25953902584173, 2.63358152917835, 1.94656024528513,
1.48854610973117, 13.6870376229078, 16.9090843400435, 21.7662957124601,
11.4414422722073, 6.03120016085026, 21.0929171858895, 18.3022798513491,
10.0293548224004, 17.8684478154117, 18.0039111988179, 19.9318071878543,
12.3295963111244, 16.8677023346747, 20.9083054297964, 20.8687754072191,
13.6116384895055, 21.8654160776132, 13.1808486163249, 17.3911947275833,
14.7397597749292, 13.1894732988311, 16.6265612232413, 13.6719596743536,
21.1428982682295, 31.2122750951883, 15.2966430016051, 9.42814580568306,
27.2141203966103, 18.5211124831664, 13.6291243557988, 19.3116679200728,
21.2060492151326, 12.862723433441, 17.3838646923106, 12.66687008201,
24.6805318177407, 11.670229411616, 8.9391374873968, 10.43662110592,
16.8932758167154, 73.2148757200783, 70.4074536004546, 98.9359233176508,
184.352006060306, 305.144939540673, 143.388470271186, 93.1456829088874,
279.830000873684, 133.059776785945, 60.539057081942, 150.681564982193,
191.160685921634, 81.8563844672192, 377.945434082035, 71.276160883577,
132.017155769214, 79.4228323391613, 86.5633744839544, 76.5650392509839,
71.6075127994238, 20.7851242799217, 18.5925463995454, 5.06407668234918,
21.6479939396942, 18.8550604593266, 5.61152972881417, 11.8543170911126,
32.1699991263165, 6.94022321405522, 10.460942918058, 7.31843501780703,
19.8393140783662, 5.14361553278079, 33.0545659179647, 8.72383911642303,
19.9828442307864, 7.57716766083872, 7.43662551604562, 7.43496074901615,
18.3924872005762, 306.336617585352, 275.595939385529, 91.846330884886,
250.737436203211, 365.20192703782, 187.760017517165, 181.842099181271,
419.627659745836, 136.775433076627, 107.274226087569, 117.097964835946,
319.753859449797, 119.143788698009, 609.177488313164, 124.743509325161,
257.414121011625, 89.0056239064357, 126.529942622688, 119.728684306756,
202.25967701575, 81.4324388238832, 110.272650639051, 84.9482599668956,
135.71249042773, 169.522527165173, 72.6212149599909, 70.6461756352667,
194.067801272218, 118.928780647813, 87.1195421152286, 125.515009275226,
164.747620866177, 50.4942665038522, 149.429569603566, 60.925529875842,
113.248260413245, 81.9030986881338, 56.7687655956434, 64.3756256629276,
110.361613935735, 23.2091094831356, 20.2673864117644, 21.9708302487264,
22.1518579262177, 13.1816989892228, 24.5665121347732, 23.3989626720495,
12.0448675067771, 16.5347151747945, 16.1267833233626, 18.6375889039606,
13.4007776408089, 18.402254211589, 19.1677437101439, 26.5921385439932,
16.7328138421953, 19.8129633988032, 14.3177655673198, 17.0609211240349,
26.5690880411981, 13.4291210046035, 6.87055755010154, 6.23261657005573,
5.26810532814829, 1.0938467989779, 6.11491382748821, 8.03457481681421,
0.259671474515958, 4.2232637127506, 10.9405091246832, 5.74941903686175,
1.13697147160685, 8.80141190336945, 5.22864882331382, 9.19780541148547,
3.30937091570324, 9.27631198819461, 5.91518710084944, 12.2995073340416,
5.80371120219896, 1.38760914727631, 1.91198932001816, 1.77909796306924e-08,
0.0487690063771419, 5.43357952792342e-111, 0.886373145936838,
1.81255527998243, 3.48221861445528e-168, 0.421997712105163, 0.42199771366826,
2.63989795311371e-20, 1.8855412967728, 0.0424618633955544, 0.972484548357683,
0.421997876567686, 1.6256422782543, 1.93687333497911, 3.23949247279787,
1.38533428800725, 2.38754978246632e-06, 1.20230154684218, 1.08048878834477,
0.959998642691639, 0.0809261074144791, 2.3423596155782e-16, 1.15277042138724,
1.26440151661227, 2.55782997085317e-22, 0.171443053312762, 1.11518452898619,
1.21906359252684e-05, 1.07381923386548, 2.10050893687965, 0.0240277786979601,
1.10692102311908, 3.60054288555228, 0.0649356750928186, 4.20716128518015,
2.14212675754602, 0.00581188909305059, 0.00280240436455895, 0.000987903717199644,
2.04194796090908, 0.000415000124143722, 8.80603033755951e-09,
2.89815618814227, 2.00119577591618, 6.52907049746473e-10, 1.94435358646454,
1.00175310876009, 5.75735322221926e-06, 0.00141003887772676,
5.01501987951802, 0.99990579683964, 0.101813208531757, 0.0692485338362207,
1.00013321384322, 2.16056193478868, 1.00778790423436, 9.55282761160386e-05,
4.54279383782508e-09, 1.47450360843646e-09, 1.57080445049261e-05,
7.77056447686712e-10, 1.07908410781816e-13, 4.18051160130299e-05,
3.51220873288209e-05, 1.84019578203646e-14, 1.30361327595906e-05,
3.99774233258394e-06, 1.69331542085358e-11, 2.09422195428798e-09,
0.000288003387608627, 0.000131425916545821, 0.910284735299902,
1.19587889769127e-07, 5.97945175058139e-05, 0.861123420732594,
1.26224522809664e-05, 1.9907500964706e-10, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(20L, 24L), .Dimnames = list(
c("TCGA-2A-A8VX-01", "TCGA-2A-A8W1-01", "TCGA-4L-AA1F-01",
"TCGA-CH-5737-01", "TCGA-CH-5751-01", "TCGA-CH-5761-01",
"TCGA-CH-5767-01", "TCGA-CH-5788-01", "TCGA-CH-5791-01",
"TCGA-EJ-5504-01", "TCGA-EJ-5507-01", "TCGA-EJ-5509-01",
"TCGA-EJ-5516-01", "TCGA-EJ-5518-01", "TCGA-EJ-5521-01",
"TCGA-EJ-5524-01", "TCGA-EJ-5525-01", "TCGA-EJ-7123-01",
"TCGA-EJ-7218-01", "TCGA-EJ-7312-01"), c("bp10MB1", "bp10MB2",
"copynumber1", "copynumber2", "changepoint1", "changepoint2",
"bpchrarm1", "bpchrarm2", "bpchrarm3", "bpchrarm4", "bpchrarm5",
"bpchrarm6", "bpchrarm7", "osCN1", "osCN2", "segsize1", "segsize2",
"segsize3", "segsize4", "segsize5", "segsize6", "segsize7",
"segsize8", "segsize9")))
Hi,
Using the R NMF package I keep getting this error.
Error: NMF::nmf - Input matrix x contains at least one null or NA-filled row.
However, none of my columns are null or NA-filled.
Can you please let me know how to get around this problem?
The session info is > sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1
locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages: [1] ggplot2_2.2.1 SomaticSignatures_2.8.4 VariantAnnotation_1.18.7 Rsamtools_1.24.0 Biostrings_2.40.2
[6] XVector_0.12.1 SummarizedExperiment_1.2.3 Biobase_2.32.0 GenomicRanges_1.24.3 GenomeInfoDb_1.8.7
[11] IRanges_2.6.1 S4Vectors_0.10.3 BiocGenerics_0.18.0
loaded via a namespace (and not attached): [1] httr_1.2.1 foreach_1.4.3 AnnotationHub_2.4.2 splines_3.3.1 Formula_1.2-1
[6] shiny_1.0.0 assertthat_0.1 interactiveDisplayBase_1.10.3 latticeExtra_0.6-28 RBGL_1.48.1
[11] BSgenome_1.40.1 RSQLite_1.1-2 backports_1.0.5 lattice_0.20-34 biovizBase_1.20.0
[16] digest_0.6.12 RColorBrewer_1.1-2 checkmate_1.8.2 colorspace_1.3-2 ggbio_1.20.2
[21] htmltools_0.3.5 httpuv_1.3.3 Matrix_1.2-8 plyr_1.8.4 OrganismDbi_1.14.1
[26] XML_3.98-1.5 biomaRt_2.28.0 zlibbioc_1.18.0 xtable_1.8-2 scales_0.4.1
[31] BiocParallel_1.6.6 proxy_0.4-16 htmlTable_1.9 tibble_1.2 pkgmaker_0.22
[36] GenomicFeatures_1.24.5 nnet_7.3-12 lazyeval_0.2.0 survival_2.40-1 magrittr_1.5
[41] mime_0.5 memoise_1.0.0 GGally_1.3.0 doParallel_1.0.10 NMF_0.20.6
[46] foreign_0.8-67 graph_1.50.0 BiocInstaller_1.22.3 registry_0.3 tools_3.3.1
[51] data.table_1.10.4 gridBase_0.4-7 stringr_1.1.0 munsell_0.4.3 rngtools_1.2.4
[56] cluster_2.0.5 AnnotationDbi_1.34.4 ensembldb_1.4.7 pcaMethods_1.64.0 grid_3.3.1
[61] RCurl_1.95-4.8 iterators_1.0.8 dichromat_2.0-0 htmlwidgets_0.8 bitops_1.0-6
[66] base64enc_0.1-3 codetools_0.2-15 gtable_0.2.0 DBI_0.5-1 reshape_0.8.6
[71] reshape2_1.4.2 R6_2.2.0 GenomicAlignments_1.8.4 gridExtra_2.2.1 knitr_1.15.1
[76] rtracklayer_1.32.2 Hmisc_4.0-2 stringi_1.1.2 Rcpp_0.12.9 rpart_4.1-10
[81] acepack_1.4.1