plotting gene expression

This example shows you some of the different plots you can use to plot gene expression.

import besca as bc
import pytest

# pytest.skip('Test is only for here as example and should not be executed')
# import data
adata = bc.datasets.Haber2017_processed()

compare two conditions

You can use the split violin plot to compare gene expression for two different conditions.

bc.pl.gene_expr_split(adata, genes=["Defa24", "Gm15284"], split_variable="donor")
  • plot split gene expression
  • plot split gene expression

use a stacked split violin plot to compare this for several genes at the same time

bc.pl.gene_expr_split_stacked(
    adata=adata,
    genes=["Defa24", "Gm15284"],
    split_variable="donor",
    subset_variable="region_x",
    inner=None,
)
plot split gene expression
merging a total of  3  datasubset

<Figure size 800x1500 with 2 Axes>

Total running time of the script: ( 0 minutes 1.534 seconds)

Gallery generated by Sphinx-Gallery