Question: Question About Use Of Samr
gravatar for Layla
7.0 years ago by
Layla50 wrote:

Hi: I have the following table in csv format in Excel:

enter image description here

I have been using SAM for getting a list of up and down regulated genes. For that purpose there is an Excel plugin that does the task with the above mentioned file. The problem that I have is that I need to use R for analizing this data, for that there is a package called SAMR. I want to get the list of up and down regulated genes with the names that are in the first column, but no success at all. The manual is available here: The small program that I made was:

y<-c(1,1,1,2,2,2)           //I have to do this in this way, but I will extract the  
                            //first row from the csv file later
samfit<-SAM(t,y,resp.type="Two class unpaired")

when I put


I got the following data:

Genes down
    Gene ID Gene Name Score(d) Numerator(r) Denominator(s+s0) Fold Change
[1,] g1753   1753      -2.025   -707.725     349.446           0.582      
[2,] g1375   1375      -1.038   -272.583     262.7             0.797      
[3,] g1302   1302      -0.955   -296.733     310.685           0.739      
[4,] g1598   1598      -0.923   -352.725     382.068           0.722      
[5,] g1500   1500      -0.913   -442.142     484.177           0.352

but I need the gene names and not that gene ID in the list of genes up and genes down any help? Thanks

R bioconductor sam • 3.2k views
ADD COMMENTlink modified 5.9 years ago by Biostar ♦♦ 20 • written 7.0 years ago by Layla50

It would help to know (1) which organism and (2) what is the source of these gene IDs/names - are they Entrez Gene IDs, for example? Then we can address the topic of ID conversion.

ADD REPLYlink written 7.0 years ago by Neilfws48k
gravatar for Sukhdeep Singh
7.0 years ago by
Sukhdeep Singh9.9k
Sukhdeep Singh9.9k wrote:

I tried this, when you convert the data.frame to matrix it should ideally convert it as a character matrix but it converts to numerics, so your first column which contains the gene names are also converted to numeric. Try typeof(t[,1]) and I am sure its not character. So, the problem is not with package but with the data transformation. Also, try as.numeric(m[,1]) to get the gene names converted to numeric form and see if they match the Gene Names in the samfit object. Then, you can use %in% to check which gene names corresponds to what. I am not able to think of a simple solution yet.

ADD COMMENTlink written 7.0 years ago by Sukhdeep Singh9.9k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1265 users visited in the last hour