Entering edit mode
                    7.8 years ago
        Tania
        
    
        ▴
    
    180
    Hello Everyone
I have some expression results from GeneChip Human Genome U133 Plus 2.0 Array. They are already generated, I need to read them and do some pathway analysis using gage and path view.
I am stuck at these errors in my code is below,
'select()' returned 1:1 mapping between keys and columns Error in
names(foldchanges) = res$entrez : attempt to set an attribute on NULL
data <- read.csv(file="affy.csv", header=TRUE, sep=",", row.names =1)
res <- as.data.frame(data)
res$symbol <- mapIds(org.Hs.eg.db,
                     keys=row.names(res),
                     column="SYMBOL",
                     keytype="SYMBOL",
                     multiVals="first")
res$entrez <- mapIds(org.Hs.eg.db,
                     keys=row.names(res),
                     column="ENTREZID",
                     keytype="SYMBOL",
                     multiVals="first")
If I print res it will look like this now:
                 logfc        adjpv       symbol    entrez
HLA-DRB4      5.196415 0.0237606990     HLA-DRB4      3126
SCGB1A1       4.269985 0.0186166347      SCGB1A1      7356
Thanks
Those mapping are correct. Do you have a blank cell in one of the columns in your file?
There are some "NA" like this:
Those
NAseem to be causing the error you are seeing. Are you able to filter those out? Are there many of them?They are 135 out of 700 ? I should take them off? And do you know how to take them off?
How to use that? I tried :
but still the cols have NA.
You can use like this :
Example :
or
Finally works ! Thank you all :)