Open jackgisby opened 4 years ago
Working on TCGA data , I am getting the same error:
Error in `.rowNamesDF<-`(x, value = value) :
duplicate 'row.names' are not allowed
Trying what @Jack mentioned- trimming sample ID initiate with a unique character string, error turned to :
Error in `[.data.frame`(df, neworder2) : undefined columns selected
> traceback()
5: stop("undefined columns selected")
4: `[.data.frame`(df, neworder2)
3: df[neworder2]
2: M3Creal(as.matrix(mydata), maxK = maxK, reps = repsreal, pItem = pItem,
pFeature = 1, clusterAlg = clusteralg, distance = distance,
title = "/home/christopher/Desktop/", des = des, lthick = lthick,
dotsize = dotsize, x1 = pacx1, x2 = pacx2, seed = seed, removeplots = removeplots,
silent = silent, fsize = fsize, method = method, objective = objective)
1: M3C(pro.vst, des = clin, removeplots = FALSE, iters = 25, objective = "PAC",
fsize = 8, lthick = 1, dotsize = 1.25)
I got the same error as @hamidghaedi while running M3C. I managed to track it down to the following line of code (line 476 on the M3C.R file):
df <- data.frame(m_matrix)
Many of my sample names (column names) started with a number and the data.frame() function added an "X" to the beginning of each name that started with a number ("1" becomes "X1"). This caused a mismatch with the names listed in neworder2.
To get around this problem, I changed all of my sample names to start with a letter and M3C is now running correctly.
Edit: This workaround can be easily applied by using the data.frame() function on your input dataset before running M3C.
Cool. I will try this solution. If you mind, please post your solution on StackOverflow entry also: https://stackoverflow.com/questions/65010759/clustering-by-m3c-package-error-in-data-framedf-neworder2-undefined-c
Originally posted as a stackoverflow question
Whilst attempting to run consensus clustering using M3C, I get an error - my console output (actual row names changed for example code):
I ran the equivalent of the following using M3C:
I assumed the issue is caused by the fact the first four characters of each of these features are equal ("ABCD"). I therefore temporarily changed their respective names prior to running M3C:
M3C then runs correctly. This works as a solution, but was wondering if I had missed something or if this is a bug?