-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in results[[elt]][[K_index, ll_index]] <- el(res, where = elt) : incompatible types (from NULL to list) in [[ assignment (aka NAs are not supported) #6
Comments
I have the sample problem as well. |
This error message is unspecific, merely indicating that the worker threads have failed in a multicore setting. To get the actual exception, try rerunning with NCORES=1. |
Could be a problem within a solver. Could you please share the dataset and/or your script? |
Regardless of decomposition, substituting NAs with zeroes is a bad idea anyway since 0 is one of the two extreme methylation values and will definitely lead to artefacts in your analysis. I would suggest to reduce the data set to something minimal (several thousands of rows) and try running on one core to identify the source of your problem. Did the test data set work fine for you? |
Yes, the test data set works just fine both on one core and multiple cores. I agree with what you said, that was a bad decision.
Sure, I could definitely try a subset of probes and go from there.
Thanks,
huihui
From: Pavlo Lutsik <[email protected]>
Reply-To: lutsik/MeDeCom <[email protected]>
Date: Monday, August 14, 2017 at 9:52 AM
To: lutsik/MeDeCom <[email protected]>
Cc: "Fan, Huihui" <[email protected]>, Comment <[email protected]>
Subject: Re: [lutsik/MeDeCom] Error in results[[elt]][[K_index, ll_index]] <- el(res, where = elt) : incompatible types (from NULL to list) in [[ assignment (#6)
Regardless of decomposition, substituting NAs with zeroes is a bad idea anyway since 0 is one of the two extreme methylation values and will definitely lead to artefacts in your analysis.
I would suggest to reduce the data set to something minimal (several thousands of rows) and try running on one core to identify the source of your problem.
Did the test data set work fine for you?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://secure-web.cisco.com/19h4WRRmkCBrZCzlMRBG_OBXQ8djWsutFPlPF4Ixb-PRKoxnGlaRMEUmXrdD9yOuB3aMp0kS-MpugXQMnN7mIolJk321_QmL-rOZD8pSM3E4lIwIG6uW9AR0QMyqrnSr-n4Nr7BR1m4Sm4AhYJ1HN1Zm_yJlpEW7rvtiJ_flJTzf7OfvIQ85sxV-tyAD_MApC8ZcMHW82cPeOieZTv14eriOQlcBMrotkfTv70e7xFCiIvLskF5V_lEnJbBqdGkJnvE_xSZdGkRBWAJMRXig0GA/https%3A%2F%2Fgithub.com%2Flutsik%2FMeDeCom%2Fissues%2F6#issuecomment-322195808>, or mute the thread<https://secure-web.cisco.com/1GLpwAdWq7-3Nx4Xpa2dGEQxaebhl3v8WgaDSRRNL6ofMk0Itx2GxINbxQIwKQocqx9xZZHUGbDxRgYVH876t9GyKVjen7xbNv7ITJ0yzgnZk5bTIzp2nrejfkwGIFxhS_TS6N4NOlFTSOUNd40xFJSw_d2Y84N5jAYILc3xvsH2xnFlE2rW9-VKOLnLfb1-jcmwrVQenjzywvyZo2rcSi_t24T1rUmPOLA6pt_6LjjQsPau9lw0G2oTijn6x0Q_hziLGP2WGyQG3HQY8t1O0ew/https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAQqqAn_nU66HUYVrJlxk17ljpV2kdycIks5sYFErgaJpZM4OuwBw>.
|
I also have problem with missing values and it is not even possible to get 1000 rows without NAs to run the test. Is there any solution for the NAs for example replacing them with 0.5? Or should I continue till the end of analysis with a small subset of my data (for example 500 rows)? ... |
What I am doing with NAs is first I substitute them with 0s, and then I masked them as before with NAs after I got the results. Probes with 0.5ish methylation levels are considered as proof showing multiple cell compositions. I don’t think that is a good idea either. Not sure how Lutsik thinks though.
Thanks,
huihui
From: RahelSh <[email protected]>
Reply-To: lutsik/MeDeCom <[email protected]>
Date: Monday, August 14, 2017 at 10:05 AM
To: lutsik/MeDeCom <[email protected]>
Cc: "Fan, Huihui" <[email protected]>, Comment <[email protected]>
Subject: Re: [lutsik/MeDeCom] Error in results[[elt]][[K_index, ll_index]] <- el(res, where = elt) : incompatible types (from NULL to list) in [[ assignment (#6)
I also have problem with missing values and it is not even possible to get 1000 rows without NAs to run the test. Is there any solution for the NAs for example replacing them with 0.5? Or should I continue till the end of analysis with a small subset of my data (for example 500 rows)? ...
Many thanks in advance,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://secure-web.cisco.com/1tcS8eQ8clzA9sfP-oHYsgMmVvRvArmx5PWpniMJTQSMSCrM5EjElz9FN67JkB5fddBK3Dx_xns9Mi5HBKGDWwnkBgrQDKgHD7Q2i7fWJacCpwaP1yx0JQYqebO_Cx7aK24lcGgR_j5WeHS4dTtRp9wxkpqUlRsc6s4EZ8Zc9YVRH4aWo7TEj8i1YhCfG-abEL1mfOoeMSemVM-gRa1gqI_wuk6rUNgTdmy2MFn12De9FZQQ07xBMRwrTd2n45KsBOQ4hen2KVL67Dhx8yoQZeQ/https%3A%2F%2Fgithub.com%2Flutsik%2FMeDeCom%2Fissues%2F6#issuecomment-322199265>, or mute the thread<https://secure-web.cisco.com/1A51D76miuIU--90raa1fcW9SHKZloNKqCQA1VwEXHD_7pk2SYExPXSMG_KtC7DYqAqnfGx6QJzzCAKww9nJEwdHWL29C4Goq9cLrsWgbMwtf1lZ5z_R0wjZeVOv4G-ihjecRa7h9nHOudUn6dVPa7GVohtyGd5RibJxmHEsExa_cVB3TXDJAACrRTcOGcMdxtK6LnvTYYl3nMRzbCAoUyjMniq_xLyRM0HixeAp94nBGfarhg8COBO1e2XBWJpx6kcTLeEJsy_Lb832u0rCujA/https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAQqqAjGE-ltdBB_85vo-BuczgmcsWw1wks5sYFQ6gaJpZM4OuwBw>.
|
The solver does not support NAs, that is for sure. |
For me, also when I replace the NAs value with some number, everything is working on MeDeCom, but I know that this is wrong. At the end there is no solution for NAs? If I continue with only a subset of my methylation values then is the analysis and output correct? |
No, NAs are not supported as of now. Shall we just ignore their contribution in the loss function? We will check how people solve the task of missing values, and, if it is not that much of a work, we will add this feature once we have a bit more time... But I certainly agree it is worth doing. |
As a temporary solution, I would recommend looking into the imputation methods in case removing all NAs seems like an overkill. In fact I started implementing something along these lines a while ago (see argument na.values and its usage in onerun.alternate, which is factorisations.R:445 and below). The idea was to disregard NAs when calculating the loss, and exclude NA-containing rows for the T and A updates. Not sure this was the right way, though. |
|
Dear Nikitaved and Dear Pavel, |
Well, the more you use, the better, but much slower =) It also depends on your problem - could be you loose no information after all the filtering. Unfortunately, MeDeCom is not designed to deal with missing data as of now, because the inference of unknown observations is a bit different task. |
Dear Nikitaved and Dear Pavlo, [Main:] finished all jobs. Creating the object
|
Dear Rahel, As already explained, in a multicore setting the exception pointing at the actual problem is not accessible. Please, rerun with NCORES=1. Best, Pavlo |
Dear Pavlo, Many thanks for your prompt reply. With this number of cores it took me more than 1 week to get this error. Then it will be slower, but I will do it, when it is the only solution. |
First check whether a small subset of your data runs without problems. Take 100 randomly selected rows and run with 1 core. |
Yes, I already did it and it worked well, that is why I imputed the NAs and did with all the data ... |
what is the total number of rows (CpGs)? |
1282369 CpGs and 44 samples |
Applying MeDeCom to over 1 mln CpGs makes little sense since the vast majority of them are not informative. Calculate row-wise variance and make a histogram of that. You will see that most of your rows have zero or very close to zero variance and have no benefit for the deconvolution. Find a reasonable cutoff and select 50-100k rows at most. |
OK, I am going to do that and continue with a subset of samples. But the last question (Sorry, if it is not related to the question above), Is it possible to extract the methylomes that reflect the underlying biology of constituent cell types after all? I mean when I continue with a subset of samples and the result showed that I have 5 different cell types, Can I only get the methylomes most related to Tumor cells to continue with differential methylome analysis (Please let me know if I am wrong and did not get the idea of MeDeCom)? |
If the method works as expected and reveals 5 underlying cell types, for each of them you will get proportions in each sample as well as an "average" methylation signature (but only in the rows that you have used for the deconvolution). For the differential methylation analysis you should include the obtained proportions as covariates. |
I am so grateful for your prompt reply. therefore, I will only continue with a subset of my data. What if I make several subset of CpGs and at the end merge all the proportions for each samples in tumor cells? I hope this is also correct. |
Hi,
I have RRBS data from 44 Lung cancer samples (Ctrl and diseases). There is high heterogeneity beside the tumor cells in the samples, that is why after pre-processing with RnBeads, I submitted the Beta value matrix to MeDeCom. Now, I got this error, Can you please help me. Many thanks in advance,
>medecom.result<-runMeDeCom(persites_betaValue, Ks=3:10, lambdas=c(0,10^(-5:-1)), NINIT=10, NFOLDS=10, ITERMAX=300, NCORES=9)
[Main:] checking inputs
[Main:] preparing data
[Main:] preparing jobs
[Main:] 2768 factorization runs in total
[Main:] finished all jobs. Creating the object
Error in results[[elt]][[K_index, ll_index]] <- el(res, where = elt) :
incompatible types (from NULL to list) in [[ assignment
In addition: Warning messages:
1: In mclapply(rev(concurr_indices), function(index_group) { :
80 function calls resulted in an error
2: In mclapply(rev(concurr_indices), function(index_group) { :
8 function calls resulted in an error
The text was updated successfully, but these errors were encountered: