Question: Undefined columns selected in codelink R package.
gravatar for Agaz Hussain Wani
4.4 years ago by
Agaz Hussain Wani260 wrote:

I am trying to use raw data sample to generate expression values and SNR. I used GSM240525 raw file, which goes very smooth. I tried to use other sample GSM718640 to get expression and SNR.

Error in `[.data.frame`(data, , "Spot_mean") : undefined columns selected


I am not sure what is going wrong .I guess that some information is missing. If Its not a valid codelink file, why not an understandable error message??.



codelink R txt • 979 views
ADD COMMENTlink modified 4.4 years ago • written 4.4 years ago by Agaz Hussain Wani260

The error is a standard R error message and is self-explanatory: you have tried to access a column called "Spot_mean" in a data.frame and the column does not exists. Now, why did you get that error I cannot tell, since you did not provide the code and conditions necessary to reproduce your error. Basically, I have no idea what you did so can't help you. So, please, provide, as usual, a reproducible example with the code that triggers this error and I might be able to figure out what went wrong.

ADD REPLYlink written 4.4 years ago by Diego Diez750

You are right about the standard R error message but here i am using codelink package to process the raw data . Out of the two sample files pasted above, only one is valid codelink output file while the other is missing some information. It should display a message that file is not a valid codelink file other than throwing a general error message which is some times frustrating.

I am not sure which information is needed to process the raw codelink files but as per the error message Spot_mean is a must. Your can compare the two sample files and check out.

The code

codset = readCodelinkSet(filename)

throws an error with the second sample.
ADD REPLYlink written 4.4 years ago by Agaz Hussain Wani260


I may consider improving the error message in such situations, but please, alway include the relevant information when posting a problem. Otherwise it is hard to understand what the problem is. Since you have been using codelink and GEOquery in some other posts there is not explicit reason why I should "know" what you did.

Regarding your particular problem, some Codelink files do not contain all the information, as we have discussed before. In this case it is missing Spot_mean. You can use instead Raw_intensity (pass type =  "Raw") or Normalized_intensity (pass type = "Norm") to load the data (this is briefly mentioned in the vignette). But right now this fails due to the weight function that I added last year.

The problem, as usual, is the inconsistency in the Codelink file format. So far I have not had any reports of this because no one had used files for different studies before. So you get to be my testing subject. Thank you for the report- I will add this to the list of fixes and will let you know when it is solved.

ADD REPLYlink modified 4.4 years ago • written 4.4 years ago by Diego Diez750
Please log in to add an answer.


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