This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Generate AnnData fro DF or H5AD | |
""" | |
import scanpy as sc | |
import anndata | |
ad=anndata.AnnData(X=input.X, obs=input.obs, var=input.var) | |
ad.var_names_make_unique() | |
ad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Selection of useful jupyter notebook commands | |
""" | |
# control plot size | |
import matplotlib.pyplot as plt | |
plt.rcParams['figure.figsize'] = [10, 5] | |
# autoreload code dependencies with each run | |
%load_ext autoreload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The aim of this script is to test the significance of gene list overlap | |
""" | |
# load packages | |
import scipy.stats as stats | |
from decimal import Decimal as D | |
def overlap_sets(setA, setB): |