You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Impossible to create de DeseqDataSet object with this version. This problem occurs even with the loaded_example_data
To Reproduce
inference = DefaultInference(n_cpus=8)
dds = DeseqDataSet(
counts=counts_df,
metadata=metadata,
design_factors="Condition",
refit_cooks=True,
inference=inference,
# n_cpus=8, # n_cpus can be specified here or in the inference object
)
Expected behavior
Generation of the DeseqDataset dds object
Additional context
KeyError Traceback (most recent call last)
Cell In[279], line 2
1 inference = DefaultInference(n_cpus=8)
----> 2 dds = DeseqDataSet(
3 counts=counts_df,
4 metadata=metadata,
5 design_factors="Condition",
6 refit_cooks=True,
7 inference=inference,
8 # n_cpus=8, # n_cpus can be specified here or in the inference object
9 )
File ~/miniconda3/envs/rnaseq/lib/python3.10/site-packages/pydeseq2/dds.py:216, in DeseqDataSet.init(self, adata, counts, metadata, design_factors, continuous_factors, ref_level, min_mu, min_disp, max_disp, refit_cooks, min_replicates, beta_tol, inference, quiet) 211 self.design_factors = ( 212 [design_factors] if isinstance(design_factors, str) else design_factors 213 ) 214 self.continuous_factors = continuous_factors
--> 216 if self.obs[self.design_factors].isna().any().any(): 217 raise ValueError("NaNs are not allowed in the design factors.") 218 self.obs[self.design_factors] = self.obs[self.design_factors].astype(str)
Indeed, in this instance, the issue stemmed from capitalization, but we explored the example due to problems we encountered while analyzing an RNA-seq dataset. Ultimately, the problem was traced back to a variable name error—frustrating, yet resolved! Sorry for bother you with this and thansk a lot for your patience and assistance.
Describe the bug
Impossible to create de DeseqDataSet object with this version. This problem occurs even with the loaded_example_data
To Reproduce
inference = DefaultInference(n_cpus=8)
dds = DeseqDataSet(
counts=counts_df,
metadata=metadata,
design_factors="Condition",
refit_cooks=True,
inference=inference,
# n_cpus=8, # n_cpus can be specified here or in the inference object
)
Expected behavior
Generation of the DeseqDataset dds object
Additional context
KeyError Traceback (most recent call last)
Cell In[279], line 2
1 inference = DefaultInference(n_cpus=8)
----> 2 dds = DeseqDataSet(
3 counts=counts_df,
4 metadata=metadata,
5 design_factors="Condition",
6 refit_cooks=True,
7 inference=inference,
8 # n_cpus=8, # n_cpus can be specified here or in the inference object
9 )
File ~/miniconda3/envs/rnaseq/lib/python3.10/site-packages/pydeseq2/dds.py:216, in DeseqDataSet.init(self, adata, counts, metadata, design_factors, continuous_factors, ref_level, min_mu, min_disp, max_disp, refit_cooks, min_replicates, beta_tol, inference, quiet)
211 self.design_factors = (
212 [design_factors] if isinstance(design_factors, str) else design_factors
213 )
214 self.continuous_factors = continuous_factors
--> 216 if self.obs[self.design_factors].isna().any().any():
217 raise ValueError("NaNs are not allowed in the design factors.")
218 self.obs[self.design_factors] = self.obs[self.design_factors].astype(str)
File ~/miniconda3/envs/rnaseq/lib/python3.10/site-packages/pandas/core/frame.py:4096, in DataFrame.getitem(self, key)
4094 if is_iterator(key):
4095 key = list(key)
...
-> 6248 raise KeyError(f"None of [{key}] are in the [{axis_name}]")
6250 not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique())
6251 raise KeyError(f"{not_found} not in index")
KeyError: "None of [Index(['Condition'], dtype='object')] are in the [columns]"
The text was updated successfully, but these errors were encountered: