Hi Stefan! This is Lydia :) (hope you are the one getting the message, or else it's a little awkward)
I'm been experiencing the following error when running DPClust. I run DPClust through the dpc.R script at the dpclust-smchet-docker github page. When I call
DPClust:::DirichletProcessClustering
I get the following error:
Error in apply(mutation.preferences, 1, max) : dim(X) must have a positive length Calls: <Anonymous> -> oneDimensionalClustering -> apply Execution halted
After investigating the function, I realized that this occurs when
tumour_optimaInfo.txt
has only 1 row that is not 0 in column 3 (no.of.mutations)
Like this:
The error is due to the code in
DPClust:::oneDimensionalClustering
Line 99-100
# Obtain likelyhood of most likely cluster assignmentsmost.likely.cluster.likelihood = apply(mutation.preferences, 1, max)
Because there is only 1 column of mutation.preferences that was selected through non_empty_clusters, it actually condenses down to a vector so apply no longer works. A simple fix would be to force mutation.preferences back into a data.table.
Also this error is not 100% reproducible. Since the Dirichlet process clustering is a stochastic process, sometimes the error goes away because there are mutations assigned to other local optimals.
Hi Stefan! This is Lydia :) (hope you are the one getting the message, or else it's a little awkward)
I'm been experiencing the following error when running DPClust. I run DPClust through the dpc.R script at the dpclust-smchet-docker github page. When I call
DPClust:::DirichletProcessClustering
I get the following error:Error in apply(mutation.preferences, 1, max) : dim(X) must have a positive length Calls: <Anonymous> -> oneDimensionalClustering -> apply Execution halted
After investigating the function, I realized that this occurs when
has only 1 row that is not 0 in column 3 (no.of.mutations) Like this:
The error is due to the code in
DPClust:::oneDimensionalClustering
Line 99-100# Obtain likelyhood of most likely cluster assignments
most.likely.cluster.likelihood = apply(mutation.preferences, 1, max)
Because there is only 1 column of
mutation.preferences
that was selected throughnon_empty_clusters
, it actually condenses down to a vector so apply no longer works. A simple fix would be to forcemutation.preferences
back into a data.table.Also this error is not 100% reproducible. Since the Dirichlet process clustering is a stochastic process, sometimes the error goes away because there are mutations assigned to other local optimals.
Thanks, Lydia