From 0a3e92e3ca693e786e12e3afcf2526923c436f34 Mon Sep 17 00:00:00 2001 From: Starlitnightly <41826060@xs.ustb.edu.cn> Date: Thu, 30 Nov 2023 15:56:21 +0800 Subject: [PATCH] Fixed an error in `pyDEG.deg_analysis` when `n_cpus` can not be set in `pyDeseq2(v0.4.3)` --- omicverse/bulk/_Deseq2.py | 12 +++++++++++- omicverse_guide/docs/Release_notes.md | 3 +++ pyproject.toml | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/omicverse/bulk/_Deseq2.py b/omicverse/bulk/_Deseq2.py index 4d9425ac..cd706ad2 100644 --- a/omicverse/bulk/_Deseq2.py +++ b/omicverse/bulk/_Deseq2.py @@ -492,7 +492,7 @@ def deg_analysis(self,group1:list,group2:list, refit_cooks=True, n_cpus=n_cpus, ) - else: + elif pydeseq2.__version__<='0.4.1': dds = DeseqDataSet( counts=counts_df, metadata=clinical_df, @@ -502,6 +502,16 @@ def deg_analysis(self,group1:list,group2:list, refit_cooks=True, n_cpus=n_cpus, ) + else: + from pydeseq2.default_inference import DefaultInference + inference = DefaultInference(n_cpus=n_cpus) + dds = DeseqDataSet( + counts=counts_df, + metadata=clinical_df, + design_factors="condition", # compare samples based on the "condition" + refit_cooks=True, + inference=inference, + ) dds.fit_size_factors() diff --git a/omicverse_guide/docs/Release_notes.md b/omicverse_guide/docs/Release_notes.md index 7a3e28b6..ee3b7b92 100644 --- a/omicverse_guide/docs/Release_notes.md +++ b/omicverse_guide/docs/Release_notes.md @@ -259,3 +259,6 @@ ### pp Module: - Added `doublets` argument of `ov.pp.qc` to control doublets('Default'=True) +## v 1.5.4 +### bulk Module: +- Fixed an error in `pyDEG.deg_analysis` when `n_cpus` can not be set in `pyDeseq2(v0.4.3)` \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f0ab65c1..894a9b05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi" [project] name = "omicverse" -version = "1.5.3" +version = "1.5.4" description = "OmicVerse: A single pipeline for exploring the entire transcriptome universe" readme = "README.md" requires-python = ">=3.8"