Skip to content

Commit

Permalink
Fixed an error in pyDEG.deg_analysis when n_cpus can not be set i…
Browse files Browse the repository at this point in the history
…n `pyDeseq2(v0.4.3)`
  • Loading branch information
Starlitnightly committed Nov 30, 2023
1 parent df687ee commit 0a3e92e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
12 changes: 11 additions & 1 deletion omicverse/bulk/_Deseq2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions omicverse_guide/docs/Release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0a3e92e

Please sign in to comment.