ebecht / MCPcounter

52 stars 43 forks source link

Error in get("HUGO symbols") #13

Closed IrisWong closed 4 years ago

IrisWong commented 4 years ago

Hello @ebecht,

Before I tried to get reulsts on my own microarray data, I've followed the exemplary code to get outcome smoothly. However, after I've loaded a matrix like MCPcounterExampleData, I met "Error in get("HUGO symbols") : object 'HUGO symbols' not found" in use of MCPcounter.estimate function.

Following is the code. library(devtools) library(MCPcounter) data<-read.csv("C:\\Users\\79896\\Desktop\\MCP.csv",header = TRUE,sep = ",",row.names = 1) matrix=as.matrix(data) genes=read.table("C:\\Users\\79896\\Desktop\\genes.txt",header = TRUE,sep = "\t",row.names = 1) result<-MCPcounter.estimate(matrix,featuresType="HUGO_symbols", genes=genes) There is a snapshot of MCP.csv. image

Frankly I'm a beginner of learning R, owning to this, the way I ask may be disturbing in some degree. If you need more information, I am ready anytime.

Thanks for your generosity! Iris

ebecht commented 4 years ago

Hello @IrisWong

I guess that the issue is in genes. Could you post head(genes) ? In particular for your use genes requires at least two columns, one named HUGO symbols and one named Cell population.

Also could you let me know what class(genes) returns? It should be data.frame

Thanks Etienne

IrisWong commented 4 years ago

Thanks for your prompt reply! @ebecht

I have checked there is four columns in genes and ensured class(genes) returning data.frame.And then I have another try to run, but still get the same confusing result. result for head(genes) and class(genes) genes.txt

Thanks for your patience, Iris

ebecht commented 4 years ago

Thanks for posting this information,

As you can see the column names in the genes data.frame are slightly different from the ones found here

I suggest that you do either of the following:

or

This should fix your problem

Thank you Etienne

IrisWong commented 4 years ago

I really appreciate your specific reply.

Although a new erro showed up in first method, which is “schannel: failed to receive handshake, SSL/TLS connection failed”, I am still trying to figure it out by learning https://github.com/desktop/desktop/issues/2920.

Also, after checking over in the second (self-customized-genes) way, the error is remerging. Quite confused and discouraged. 20200223-genes

Much thanks for your help again, Iris

ebecht commented 4 years ago

@IrisWong programming can be a bit frustrating at first, but the more you do it the easiest it becomes. It's great that you're doing this!

It looks like the genes data.frame you posted does not have column names. Maybe header = TRUE was forgotten in genes=read.table("C:\\Users\\79896\\Desktop\\genes.txt",header = TRUE,sep = "\t",row.names = 1, check.names = FALSE) ?

Otherwise, maybe the easiest is to change the column names of the genes data.frame after it is loaded.

colnames(genes) <- c("ENTREZID", "HUGO symbols", "Cell population")

Then call MCPcounter.estimate

IrisWong commented 4 years ago

@ebecht Finally, the easiest method changing the column names worked! I can't express how thrilled I feel when there are not more errors.

Please accept my heartfelt thanks for both the heartwarming encouragement and useful helps!

Gratefully, Iris

ebecht commented 4 years ago

Happy to hear it worked. You're very welcome. Thank you for using our package.

Etienne