Closed Elhl93 closed 2 years ago
Hi, thanks for using scCODA! This is an issue we have not encountered previously, but is definitely not intended. Unfortunately I can't tell the cause of it from the information you provide.
Could you please share:
CCM_GMEAN_SUB.X
, a description of your covariate CCM_GMEAN_SUB.obs["TREATMENT_COLNAME"]
Please also make sure that your reference cell type is actually in the data.
Thanks!
Here the package versions anndata==0.7.6 scCODA==0.1.4 tensorflow==2.6.0 tensorflow-estimator==2.6.0 tensorflow-probability==0.14.1 arviz==0.11.4
Shape of CCM_GMEAN_SUB.X CCM_GMEAN_SUB.X.shape (38,7) and (38,3) for .obs.shape .var.shape is (38,1) In total I have 38 Samples with 7 celltypes. (celltype GMean included)
CCM_GMEAN_SUB.obs['TREATMENT_COLNAME'].value_counts() dtype of TREATMENT_COLNAME is 'category' with 3 levels. REFERENCE 18 TREATMENT1 12 TREATMENT2 8
Thanks for sharing this information!
The tensorflow and tensorflow-probability versions that you have installed were not tested with scCODA yet, and might have introduced breaking changes. Reverting to tensorflow 2.4.x
and tensorflow-probability 0.12.x
could possibly fix the problem
Excellent, the warnings disappeared. I assume it is expected that mu and tau are not in the final arviz object - ?
Exactly, there are no parameters named "mu" and "tau" used in scCODA. You can see the list of printable parameters in the result object by looking at result.posterior
Hi,
many thanks for the package! After running ".sample_hmc()" I receive a warning:
WARNING:tensorflow:@custom_gradient grad_fn has 'variables' in signature, but no ResourceVariables were used on the forward pass.
After investigating the results with arviz, I observed that sample-stats -> chain only contains level 0 (I have multiple conditions, but I tried with 2 and 3, one being the reference), I furthermore could not find a 'mu' and 'tau' in the results with az.summary(all_results, var_names=['mu', 'tau'], filter_vars="regex"). Previously I ran:
mod.CompositionalAnalysis(CCM_GMEAN_SUB, formula="C(TREATMENT_COLNAME, Treatment('ELEMENT1_IN_TREATMENT_COLNAME'))", reference_cell_type="CELL_TYPE_REFERENCE").
Thanks for your thoughts.