Mfuzz: fill.NA - Warning messages: argument is not numeric or logical: returning NA
1
0
Entering edit mode
@under-waterworld-9789
Last seen 8.8 years ago

Hello, I try to fill my missing identified value (NA) with mean between 7 time course experiment. I have .txt file which contains first row as row name, and the first column as label. I could not fill NA value by both coding in R or using Mfuzzgui. The first 5 row from my text file is something like this.

LABEL 0min 15min 30min 60min 180min 360min 720min
1787 0 41502 72899 138534 NA 442429 NA
1763 0 NA NA 136066 636121 716105 335477
5621 0 545547 368032 483010 NA 311054 NA
1644 0 NA NA 194737 646673 1087661 1398481
6720 0 NA 287277 643511 NA NA 1590612

What I did in R (version 3.2.3) and got the error has shown here below

> exprsFile<-"C:/Users/filename.txt"
> PKA <- read.table(exprsFile, sep="\t")
> eset<-new("ExpressionSet",exprs=as.matrix(PKA));
> eset.f<-fill.NA(eset,mode="mean")
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In mean.default(data[i, ], na.rm = TRUE) :
  argument is not numeric or logical: returning NA

By command PKA, I got

>PKA
        V1   V2       V3        V4        V5        V6        V7        V8
1    LABEL 0min    15min     30min     60min    180min    360min    720min
2  1787    0    41502     72899    138534      <NA>    442429      <NA>
3  1763    0     <NA>      <NA>    136066    636121    716105    335477
4  5621    0   545547    368032    483010      <NA>    311054      <NA>
5  1644    0     <NA>      <NA>    194737    646673   1087661   1398481

Could you advice what should I correct here to replace NA with mean between the identified values please? Thank you very much.

ps. I post sessioninfo() information here below, as well.

> sessionInfo() 
R version 3.2.3 (2015-12-10)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 8.1 x64 (build 9600)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] tcltk     parallel  stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] Mfuzz_2.30.0         DynDoc_1.48.0        widgetTools_1.48.0  
[4] e1071_1.6-7          Biobase_2.30.0       BiocGenerics_0.16.1 
[7] BiocInstaller_1.20.1

loaded via a namespace (and not attached):
[1] class_7.3-14     tools_3.2.3      tkWidgets_1.48.0

mfuzz clustering bioinformatics proteomics timecourse • 5.7k views
ADD COMMENT
1
Entering edit mode
@laurent-gatto-5645
Last seen 9 weeks ago
Belgium

You seem to have the header and row names (LABEL) are part of the data. Try

PKA <- read.table(exprsFile, sep="\t", header = TRUE, row.names = 1)

An alternative would be

library("MSnbase")
x <- readMSnSet2("C:/Users/filename.txt", ecol = 2:8, sep = "\t")
x <- impute(x, "knn")

See ?impute for other imputation methods.

ADD COMMENT

Login before adding your answer.

Traffic: 847 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6