Question: in GOplot binary matrix chord_dat gives error
0
gravatar for manibalanbt
9 months ago by
manibalanbt0 wrote:

i have all necessary files as per toy examples, i made circle with my data but when comes to chord_data it shows error. the error i have got is
Error in [<-(*tmp*, g, p, value = ifelse(M[g] %in% sub2$genes, 1, : subscript out of bounds

as per my search(web), in the above lines it should be sub2$genes, 1,0, but zero is missing in this error. i am new to R and i could not understand the source they given bellow is, if(is.vector(genes)){ M <- genes[genes%in%unique(subData$genes)] mat <- matrix(0, ncol = length(process), nrow = length(M)) rownames(mat) <- M colnames(mat) <- process for (p in 1:length(process)){ sub2 <- subset(subData, BPprocess == process[p]) for (g in 1:length(M)) mat[g, p] <- ifelse(M[g]%in%sub2$genes, 1, 0) } }else{ genes <- subset(genes, genes %in% unique(subData$genes)) N <- length(process) + 1 M <- genes[,1] mat <- matrix(0, ncol = N, nrow = length(M)) rownames(mat) <- M colnames(mat) <- c(process, 'logFC') mat[,N] <- genes[,2] for (p in 1:(N-1)){ sub2 <- subset(subData, BPprocess == process[p]) for (g in 1:length(M)) mat[g, p] <- ifelse(M[g]%in%sub2$genes, 1, 0)

can anyone understand the codes, kindly help me to solve this, thanks in advance

software error R genome • 359 views
ADD COMMENTlink modified 4 months ago by Aspie960 • written 9 months ago by manibalanbt0
0
gravatar for Aspie96
4 months ago by
Aspie960
Italy
Aspie960 wrote:

The function takes three arguments: data, genes and process. The error you mentioned can happen if there are no data lines with an appropriate process. This can happen, for instance, if the process parameter is null. Try to check the value of the parameters and maybe post your own code.

ADD COMMENTlink written 4 months ago by Aspie960
Please log in to add an answer.

Help
Access

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