SCA-IRCM / SingleCellSignalR_v1

R package
26 stars 17 forks source link

Error in "inter.net" function #18

Open torumatsuura opened 4 years ago

torumatsuura commented 4 years ago

Dear whom it may concern,

When I run "inter.net" function, R always show an error message saying that "object 'genes' not found". The original message is:

inter.net <- inter_network(data = data$complete.dataset, signal = signal, genes = genes, cluster = cluster) Error in inter_network(data = data$complete.dataset, signal = signal, : object 'genes' not found

It would be great if you could give some advices about this issue.

Sincerely,

Toru

SCA-IRCM commented 4 years ago

Hi, First can I ask you which version of SingleCellSignalR are you using? Then is genes a character vector? Is length(genes) == nrow(data$complete.dataset)? It's a error no one has pointed yet, I look at the code to see where it could come from. Yours,

SCA

torumatsuura commented 4 years ago

Hello, Sorry for the delayed reply. The version is 1.0.0. I downloaded from Bioconductor.

Then is genes a character vector? Is length(genes) == nrow(data$complete.dataset)?

I'm a beginner of R. I don't understand your questions, but I always see the error when I analyze the sample data you provided and also other downloaded data. Today, I find the same error when I run "signal" function also. That was for analysis of the sample data.

clust.ana <- cluster_analysis(data = data, genes = rownames(data), cluster = cluster, c.names = c.names, write = FALSE) edgeR differential gene expression (dge) processing: Looking for differentially expressed genes in T-cells Looking for differentially expressed genes in B-cells Looking for differentially expressed genes in Macrophages Looking for differentially expressed genes in Cytotoxic cells Looking for differentially expressed genes in Neutrophils Looking for differentially expressed genes in Treg signal <- cell_signaling(data = data, genes = genes, cluster = cluster, c.names = c.names, write = FALSE) Error in cell_signaling(data = data, genes = genes, cluster = cluster, : object 'genes' not found inter.net <- inter_network(data = data, signal = signal, genes = genes, cluster = cluster, write = FALSE) Error in inter_network(data = data, signal = signal, genes = genes, cluster = cluster, : object 'genes' not found

SCA-IRCM commented 4 years ago

Hello, genes must be a character vector, if you type typeof(genes) it must return "character", and if you type is.vector(genes) it must return TRUE. Then make sure that length(genes) and nrow(data$complete.dataset) give the same number. If everything above is respected it should work fine. Yours, SCA

torumatsuura commented 4 years ago

Thank you for your advices. I will try soon. Best,