Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ All functions have been rewritten to follow the new API, errors when running pre
- `viper` now correctly estimates shadow regulons when network weights are values other than -1 or +1
- `wsum` and `wmean` are deprecated, instead now the method `waggr` allows to run both methods and any custom function. This makes it easier to quickly test new enrichment methods without having to deal with `decoupler`'s implementation
- Databases from Omnipath can now be accessed through the new `op` module
- Use `decoupler.op.<resource_name>` to access a database
- Use `decoupler.op.<resource_name>` to access a database
- Removed the `omnipath` package as a dependancy
- Fixed `collectri` to the publication version instead of the OmniPath one
- Made `progeny` only return significant genes by default instead of the top N genes per pathway
Expand Down Expand Up @@ -63,7 +63,7 @@ All functions have been rewritten to follow the new API, errors when running pre
- Added `obsbar` to plot size of metadata columns in `anndata.AnnData.obs`
- Added `order` to plot sources or features along a continous process such as a trajectory
- Added `order_targets` to plot the targets of a given source along a continous process
-
-
- New preprocessing functions in the `pp` module
- Added two functions to format networks, `adjmat` to return an adjacency matrix, and `idxmax` to return a list of sets
- Added `filter_samples` to filter pseudobulk profiles after running `pseudobulk`
Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# decoupler - Ensemble of methods to infer enrichment scores
<img src="https://github.com/saezlab/decoupleR/blob/master/inst/figures/logo.svg?raw=1" align="right" width="120" class="no-scaled-link" />


[![Tests][badge-tests]][tests]
[![Documentation][badge-docs]][documentation]
Expand All @@ -27,13 +27,24 @@
[badge-adown]: https://static.pepy.tech/badge/decoupler
[badge-stars]: https://img.shields.io/github/stars/scverse/decoupler?style=flat&logo=github&color=yellow

`decoupler` is a python package containing different enrichment statistical
methods to extract biologically driven scores
from omics data within a unified framework. This is its faster and memory efficient Python implementation,
`decoupler` is a scverse core package containing different enrichment statistical
methods to extract biologically driven scores from omics data within a unified framework.
This is its faster and memory efficient Python implementation,
a deprecated version in R can be found [here](https://github.com/saezlab/decoupler).

It is a package from the [scverse][] ecosystem {cite:p}`scverse`,
designed for easy interoperability with `anndata`, `scanpy` {cite:p}`scanpy` and other related packages.
[//]: # (numfocus-fiscal-sponsor-attribution)

decoupler is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
If you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.

<div align="center">
<a href="https://numfocus.org/project/scverse">
<img
src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
width="200"
>
</a>
</div>

## Getting started

Expand Down
4 changes: 2 additions & 2 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ div.cell_output table.dataframe {

/* Adjust the logo size */
.logo img {
width: 50%; /* or any percentage you want */
width: 50%; /* or any percentage you want */
height: auto; /* maintain aspect ratio */
}

img.no-scaled-link {
background: transparent !important;
}
}
2 changes: 1 addition & 1 deletion docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ pp

pl
tl
```
```
2 changes: 1 addition & 1 deletion docs/api/mt.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@

mt.decouple
mt.consensus
```
```
2 changes: 1 addition & 1 deletion docs/api/op.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
op.show_resources
op.show_organisms
op.translate
```
```
2 changes: 1 addition & 1 deletion docs/api/pl.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
pl.order
pl.source_targets
pl.volcano
```
```
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"scanpy": ("https://scanpy.readthedocs.io/en/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
}

# List of patterns, relative to source directory, that match files and
Expand All @@ -115,8 +115,8 @@
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]
html_title = project_name
html_logo = '_static/images/logo.png'
html_favicon = '_static/images/logo.png'
html_logo = "_static/images/logo.png"
html_favicon = "_static/images/logo.png"

html_theme_options = {
"repository_url": repository_url,
Expand Down
55 changes: 25 additions & 30 deletions docs/notebooks/bench/rna.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -408,16 +408,11 @@
"def random(x, w):\n",
" return np.random.rand(1)[0]\n",
"\n",
"\n",
"df = dc.bm.benchmark(\n",
" adata=adata,\n",
" net=net,\n",
" kws_decouple={\n",
" 'cons': True,\n",
" 'tmin': 3,\n",
" 'args':{\n",
" 'waggr': {'fun': random}\n",
" }\n",
" },\n",
" kws_decouple={\"cons\": True, \"tmin\": 3, \"args\": {\"waggr\": {\"fun\": random}}},\n",
")"
]
},
Expand Down Expand Up @@ -578,7 +573,7 @@
}
],
"source": [
"dc.bm.pl.auc(df, hue='method')"
"dc.bm.pl.auc(df, hue=\"method\")"
]
},
{
Expand Down Expand Up @@ -614,7 +609,7 @@
}
],
"source": [
"dc.bm.pl.fscore(df, hue='method')"
"dc.bm.pl.fscore(df, hue=\"method\")"
]
},
{
Expand Down Expand Up @@ -650,7 +645,7 @@
}
],
"source": [
"dc.bm.pl.qrank(df, hue='method')"
"dc.bm.pl.qrank(df, hue=\"method\")"
]
},
{
Expand Down Expand Up @@ -968,9 +963,9 @@
}
],
"source": [
"dc.bm.pl.bar(df=hdf, x='H(auroc, auprc)', y='method', hue='method')\n",
"dc.bm.pl.bar(df=hdf, x='F-score', y='method', hue='method')\n",
"dc.bm.pl.bar(df=hdf, x='H(1-qrank, -log10(pval))', y='method', hue='method')"
"dc.bm.pl.bar(df=hdf, x=\"H(auroc, auprc)\", y=\"method\", hue=\"method\")\n",
"dc.bm.pl.bar(df=hdf, x=\"F-score\", y=\"method\", hue=\"method\")\n",
"dc.bm.pl.bar(df=hdf, x=\"H(1-qrank, -log10(pval))\", y=\"method\", hue=\"method\")"
]
},
{
Expand Down Expand Up @@ -1000,7 +995,7 @@
}
],
"source": [
"dc.bm.pl.summary(df=hdf, y='method', figsize=(6, 3))"
"dc.bm.pl.summary(df=hdf, y=\"method\", figsize=(6, 3))"
]
},
{
Expand Down Expand Up @@ -1644,8 +1639,8 @@
"metadata": {},
"outputs": [],
"source": [
"unw_ct = ct.drop(columns='weight')\n",
"unw_do = do.drop(columns='weight')"
"unw_ct = ct.drop(columns=\"weight\")\n",
"unw_do = do.drop(columns=\"weight\")"
]
},
{
Expand All @@ -1667,15 +1662,15 @@
"df = dc.bm.benchmark(\n",
" adata=adata,\n",
" net={\n",
" 'collectri': ct,\n",
" 'dorothea': do,\n",
" 'unw_collectri': unw_ct,\n",
" 'unw_dorothea': unw_do,\n",
" 'r_collectri': rct,\n",
" 'r_dorothea': rdo,\n",
" \"collectri\": ct,\n",
" \"dorothea\": do,\n",
" \"unw_collectri\": unw_ct,\n",
" \"unw_dorothea\": unw_do,\n",
" \"r_collectri\": rct,\n",
" \"r_dorothea\": rdo,\n",
" },\n",
" kws_decouple={\n",
" 'methods': 'ulm',\n",
" \"methods\": \"ulm\",\n",
" },\n",
")"
]
Expand Down Expand Up @@ -1897,7 +1892,7 @@
}
],
"source": [
"dc.bm.pl.auc(df, hue='net')"
"dc.bm.pl.auc(df, hue=\"net\")"
]
},
{
Expand Down Expand Up @@ -1926,7 +1921,7 @@
}
],
"source": [
"dc.bm.pl.fscore(df, hue='net')"
"dc.bm.pl.fscore(df, hue=\"net\")"
]
},
{
Expand Down Expand Up @@ -1955,7 +1950,7 @@
}
],
"source": [
"dc.bm.pl.qrank(df, hue='net')"
"dc.bm.pl.qrank(df, hue=\"net\")"
]
},
{
Expand Down Expand Up @@ -2172,9 +2167,9 @@
}
],
"source": [
"dc.bm.pl.bar(df=hdf, x='H(auroc, auprc)', y='net', hue='net')\n",
"dc.bm.pl.bar(df=hdf, x='F-score', y='net', hue='net')\n",
"dc.bm.pl.bar(df=hdf, x='H(1-qrank, -log10(pval))', y='net', hue='net')"
"dc.bm.pl.bar(df=hdf, x=\"H(auroc, auprc)\", y=\"net\", hue=\"net\")\n",
"dc.bm.pl.bar(df=hdf, x=\"F-score\", y=\"net\", hue=\"net\")\n",
"dc.bm.pl.bar(df=hdf, x=\"H(1-qrank, -log10(pval))\", y=\"net\", hue=\"net\")"
]
},
{
Expand Down Expand Up @@ -2204,7 +2199,7 @@
}
],
"source": [
"dc.bm.pl.summary(df=hdf, y='net', figsize=(7, 3))"
"dc.bm.pl.summary(df=hdf, y=\"net\", figsize=(7, 3))"
]
},
{
Expand Down
Loading
Loading