We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug KeyError from outlier replacement
To Reproduce
import pydeseq2 from pydeseq2.utils import load_example_data from pydeseq2.dds import DeseqDataSet from pydeseq2.ds import DeseqStats print(f'version == {pydeseq2.__version__}') counts_df = load_example_data( modality="raw_counts", dataset="synthetic", debug=False, ) metadata = load_example_data( modality="metadata", dataset="synthetic", debug=False, ) metadata=metadata.loc[[f'sample{i}' for i in [*range(1,11),*range(91,101)]]] counts_df=counts_df.loc[metadata.index] counts_df.loc[:,'geneX']=0 counts_df.loc['sample100','geneX']=100 dds = DeseqDataSet( counts=counts_df, metadata=metadata, design_factors="condition", refit_cooks=True, ) dds.deseq2() stat_res = DeseqStats(dds) stat_res.summary()
version == 0.4.4
...[snipped traceback] 583 cooks_outlier = ( --> 584 (self.dds[use_for_max, :].layers["replace_cooks"] > cooks_cutoff) 585 .any(axis=0) 586 .copy() 587 ) 589 else: 590 cooks_outlier = ( 591 (self.dds[use_for_max, :].layers["cooks"] > cooks_cutoff) 592 .any(axis=0) 593 .copy() 594 ) KeyError: 'replace_cooks'
...[snipped traceback] 583 cooks_outlier = ( --> 584 (self.dds[use_for_max, :].layers["replace_cooks"] > cooks_cutoff) 585 .any(axis=0) 586 .copy() 587 ) 589 else: 590 cooks_outlier = ( 591 (self.dds[use_for_max, :].layers["cooks"] > cooks_cutoff) 592 .any(axis=0) 593 .copy() 594 )
KeyError: 'replace_cooks'
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
KeyError from outlier replacement
To Reproduce
The text was updated successfully, but these errors were encountered: