Starlitnightly / omicverse

A python library for multi omics included bulk, single cell and spatial RNA-seq analysis.
https://starlitnightly.github.io/omicverse/
GNU General Public License v3.0
277 stars 32 forks source link

Bulk Analysis about DiffAnalysis using Omicverse #43

Closed GrazieT closed 2 months ago

GrazieT commented 6 months ago

Hi, When I using omicverse to analysis, I met a problem. Below is my Codes:

d1 = ov.utils.read("gene_count_matrix.csv", sep = ",", index_col = 0, header = 0)
dds = ov.bulk.pyDEG(d1)
treatment_groups = ['g-1', 'g-2', 'g-3']
control_groups = ['c-1', 'c-2', 'c-3']
result = dds.deg_analysis(treatment_groups, control_groups, method = "DEseq2")

But met a Error about CPU:

File [~/Micromamba/envs/rnaseq/lib/python3.11/site-packages/omicverse/bulk/_Deseq2.py:496](https://vscode-remote+ssh-002dremote-002b7b22686f73744e616d65223a2251645f6d753031227d.vscode-resource.vscode-cdn.net~/Micromamba/envs/rnaseq/lib/python3.11/site-packages/omicverse/bulk/_Deseq2.py:496), in pyDEG.deg_analysis(self, group1, group2, method, alpha, multipletests_method, n_cpus, cooks_filter, independent_filter)
...
TypeError: DeseqDataSet.__init__() got an unexpected keyword argument 'n_cpus'

I would like to know how to solve this problem. Could you help me out? Much appreciate!

Starlitnightly commented 6 months ago

You may need to update both OmicVerse and pyDEseq2 to the latest versions, especially OmicVerse, check that the version is 1.5.4!

Zehua

GrazieT commented 6 months ago

Hi, I have solved this problem since update omicverse's version to 1.5.4. Thank You Very Much!

user-tq commented 6 months ago

For anyone who still cannot work with the latest version of OmicVerse and pyDESeq2 PyDESeq2 introduces a refactoring in version 0.4.3, which makes it impossible to directly use n_ CPU parameters. To solve this problem, the author of this project started from 1.5.4 and used if to determine the pyDESeq2 version, thus using different options. To be honest, this may not necessarily be a good idea, but it seems necessary for the development of scientific research. Additionally, currently Conda can only obtain omniverse=1.5.3, and omniverse 1.5.5 seems to introduce more features,and rely on more packages. In short, if you don't have any requirements for the software version, you can try limiting it to version omiverse=1.5.4 and pydiseq2=0.4.4. Currently, it works well with me.