Skip to content

Commit cb58b68

Browse files
initial commit
0 parents  commit cb58b68

21 files changed

+6367
-0
lines changed

LICENSE.txt

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

cellcycle.ipynb

Lines changed: 983 additions & 0 deletions
Large diffs are not rendered by default.

data.zip

91.1 MB
Binary file not shown.

hematopoiesis.ipynb

Lines changed: 684 additions & 0 deletions
Large diffs are not rendered by default.

macrocyte_macrophage.ipynb

Lines changed: 838 additions & 0 deletions
Large diffs are not rendered by default.

pscs_cellcycle.h5ad

8.11 MB
Binary file not shown.

regev_lab_cell_cycle_genes.txt

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
MCM5
2+
PCNA
3+
TYMS
4+
FEN1
5+
MCM2
6+
MCM4
7+
RRM1
8+
UNG
9+
GINS2
10+
MCM6
11+
CDCA7
12+
DTL
13+
PRIM1
14+
UHRF1
15+
MLF1IP
16+
HELLS
17+
RFC2
18+
RPA2
19+
NASP
20+
RAD51AP1
21+
GMNN
22+
WDR76
23+
SLBP
24+
CCNE2
25+
UBR7
26+
POLD3
27+
MSH2
28+
ATAD2
29+
RAD51
30+
RRM2
31+
CDC45
32+
CDC6
33+
EXO1
34+
TIPIN
35+
DSCC1
36+
BLM
37+
CASP8AP2
38+
USP1
39+
CLSPN
40+
POLA1
41+
CHAF1B
42+
BRIP1
43+
E2F8
44+
HMGB2
45+
CDK1
46+
NUSAP1
47+
UBE2C
48+
BIRC5
49+
TPX2
50+
TOP2A
51+
NDC80
52+
CKS2
53+
NUF2
54+
CKS1B
55+
MKI67
56+
TMPO
57+
CENPF
58+
TACC3
59+
FAM64A
60+
SMC4
61+
CCNB2
62+
CKAP2L
63+
CKAP2
64+
AURKB
65+
BUB1
66+
KIF11
67+
ANP32E
68+
TUBB4B
69+
GTSE1
70+
KIF20B
71+
HJURP
72+
CDCA3
73+
HN1
74+
CDC20
75+
TTK
76+
CDC25C
77+
KIF2C
78+
RANGAP1
79+
NCAPD2
80+
DLGAP5
81+
CDCA2
82+
CDCA8
83+
ECT2
84+
KIF23
85+
HMMR
86+
AURKA
87+
PSRC1
88+
ANLN
89+
LBR
90+
CKAP5
91+
CENPE
92+
CTCF
93+
NEK2
94+
G2E3
95+
GAS2L3
96+
CBX5
97+
CENPA

requirements.txt

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
absl-py==2.1.0
2+
adjustText==1.3.0
3+
aiohappyeyeballs==2.4.8
4+
aiohttp==3.11.13
5+
aiosignal==1.3.2
6+
anndata==0.11.3
7+
anyio==4.8.0
8+
argon2-cffi==23.1.0
9+
argon2-cffi-bindings==21.2.0
10+
array_api_compat==1.10.0
11+
arrow==1.3.0
12+
asttokens==3.0.0
13+
async-lru==2.0.4
14+
attrs==25.1.0
15+
babel==2.17.0
16+
beautifulsoup4==4.13.1
17+
biothings_client==0.4.1
18+
bleach==6.2.0
19+
certifi==2025.1.31
20+
cffi==1.17.1
21+
charset-normalizer==3.4.1
22+
chex==0.1.89
23+
comm==0.2.2
24+
contourpy==1.3.1
25+
cycler==0.12.1
26+
debugpy==1.8.12
27+
decorator==5.1.1
28+
defusedxml==0.7.1
29+
docrep==0.3.2
30+
et_xmlfile==2.0.0
31+
etils==1.12.0
32+
executing==2.2.0
33+
fa2_modified==0.3.10
34+
fastjsonschema==2.21.1
35+
filelock==3.17.0
36+
flax==0.10.4
37+
fonttools==4.55.8
38+
fqdn==1.5.1
39+
frozenlist==1.5.0
40+
fsspec==2025.2.0
41+
gprofiler-official==1.0.0
42+
grpcio==1.70.0
43+
h11==0.14.0
44+
h5py==3.12.1
45+
httpcore==1.0.7
46+
httpx==0.28.1
47+
humanize==4.12.1
48+
idna==3.10
49+
igraph==0.11.8
50+
importlib_resources==6.5.2
51+
ipykernel==6.29.5
52+
ipython==8.32.0
53+
ipywidgets==8.1.5
54+
isoduration==20.11.0
55+
jax==0.4.35
56+
jaxlib==0.4.35
57+
jedi==0.19.2
58+
Jinja2==3.1.5
59+
joblib==1.4.2
60+
json5==0.10.0
61+
jsonpointer==3.0.0
62+
jsonschema==4.23.0
63+
jsonschema-specifications==2024.10.1
64+
jupyter==1.1.1
65+
jupyter-console==6.6.3
66+
jupyter-events==0.12.0
67+
jupyter-lsp==2.2.5
68+
jupyter_client==8.6.3
69+
jupyter_core==5.7.2
70+
jupyter_server==2.15.0
71+
jupyter_server_terminals==0.5.3
72+
jupyterlab==4.3.5
73+
jupyterlab_pygments==0.3.0
74+
jupyterlab_server==2.27.3
75+
jupyterlab_widgets==3.0.13
76+
kiwisolver==1.4.8
77+
legacy-api-wrap==1.4.1
78+
leidenalg==0.10.2
79+
lightning==2.5.0.post0
80+
lightning-utilities==0.13.1
81+
llvmlite==0.44.0
82+
Markdown==3.7
83+
markdown-it-py==3.0.0
84+
MarkupSafe==3.0.2
85+
matplotlib==3.10.0
86+
matplotlib-inline==0.1.7
87+
mdurl==0.1.2
88+
mistune==3.1.1
89+
ml_collections==1.0.0
90+
ml_dtypes==0.5.1
91+
mpmath==1.3.0
92+
msgpack==1.1.0
93+
mudata==0.3.1
94+
multidict==6.1.0
95+
multipledispatch==1.0.0
96+
mygene==3.2.2
97+
natsort==8.4.0
98+
nbclient==0.10.2
99+
nbconvert==7.16.6
100+
nbformat==5.10.4
101+
nest-asyncio==1.6.0
102+
networkx==3.4.2
103+
notebook==7.3.2
104+
notebook_shim==0.2.4
105+
numba==0.61.0
106+
numpy==1.26.4
107+
numpyro==0.17.0
108+
nvidia-cublas-cu12==12.4.5.8
109+
nvidia-cuda-cupti-cu12==12.4.127
110+
nvidia-cuda-nvrtc-cu12==12.4.127
111+
nvidia-cuda-runtime-cu12==12.4.127
112+
nvidia-cudnn-cu12==9.1.0.70
113+
nvidia-cufft-cu12==11.2.1.3
114+
nvidia-curand-cu12==10.3.5.147
115+
nvidia-cusolver-cu12==11.6.1.9
116+
nvidia-cusparse-cu12==12.3.1.170
117+
nvidia-cusparselt-cu12==0.6.2
118+
nvidia-nccl-cu12==2.21.5
119+
nvidia-nvjitlink-cu12==12.4.127
120+
nvidia-nvtx-cu12==12.4.127
121+
openpyxl==3.1.5
122+
opt_einsum==3.4.0
123+
optax==0.2.4
124+
orbax-checkpoint==0.11.5
125+
overrides==7.7.0
126+
packaging==24.2
127+
pandas==2.2.3
128+
pandocfilters==1.5.1
129+
parso==0.8.4
130+
patsy==1.0.1
131+
pexpect==4.9.0
132+
pillow==11.1.0
133+
platformdirs==4.3.6
134+
prometheus_client==0.21.1
135+
prompt_toolkit==3.0.50
136+
propcache==0.3.0
137+
protobuf==6.30.0
138+
psutil==6.1.1
139+
ptyprocess==0.7.0
140+
pure_eval==0.2.3
141+
pycparser==2.22
142+
Pygments==2.19.1
143+
pynndescent==0.5.13
144+
pyparsing==3.2.1
145+
pypsupertime @ git+https://github.com/claassenlab/pyPsupertime@5c076ba8efa78741dde9604075d0084e72a56c02
146+
pyro-api==0.1.2
147+
pyro-ppl==1.9.1
148+
python-dateutil==2.9.0.post0
149+
python-json-logger==3.2.1
150+
pytorch-lightning==2.5.0.post0
151+
pytz==2025.1
152+
PyWavelets==1.8.0
153+
PyYAML==6.0.2
154+
pyzmq==26.2.1
155+
referencing==0.36.2
156+
requests==2.32.3
157+
rfc3339-validator==0.1.4
158+
rfc3986-validator==0.1.1
159+
rich==13.9.4
160+
rpds-py==0.22.3
161+
scanpy==1.10.4
162+
scgen @ git+https://github.com/theislab/scgen.git@d79e1f04233c30f9a4eb5b8d57718127909807d7
163+
scikit-learn==1.3.0
164+
scipy==1.15.1
165+
scvi-tools==1.3.0
166+
seaborn==0.13.2
167+
Send2Trash==1.8.3
168+
session-info==1.0.0
169+
simplejson==3.20.1
170+
six==1.17.0
171+
sniffio==1.3.1
172+
soupsieve==2.6
173+
sparse==0.15.5
174+
stack-data==0.6.3
175+
statsmodels==0.14.4
176+
stdlib-list==0.11.0
177+
sympy==1.13.1
178+
tensorboard==2.19.0
179+
tensorboard-data-server==0.7.2
180+
tensorstore==0.1.72
181+
terminado==0.18.1
182+
texttable==1.7.0
183+
threadpoolctl==3.5.0
184+
tinycss2==1.4.0
185+
toolz==1.0.0
186+
torch==2.6.0
187+
torchmetrics==1.6.2
188+
tornado==6.4.2
189+
tqdm==4.67.1
190+
traitlets==5.14.3
191+
treescope==0.1.9
192+
triton==3.2.0
193+
types-python-dateutil==2.9.0.20241206
194+
typing_extensions==4.12.2
195+
tzdata==2025.1
196+
umap-learn==0.5.7
197+
uri-template==1.3.0
198+
urllib3==2.3.0
199+
wcwidth==0.2.13
200+
webcolors==24.11.1
201+
webencodings==0.5.1
202+
websocket-client==1.8.0
203+
Werkzeug==3.1.3
204+
widgetsnbextension==4.0.13
205+
xarray==2025.1.2
206+
yarl==1.18.3
207+
zipp==3.21.0

wavelet_pseudotime/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import graph_traversal, plotting, process, tools, wavelets, load_data, windowing

wavelet_pseudotime/binning.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import numpy as np
2+
import pandas as pd
3+
import scanpy as sc
4+
5+
6+
def quantile_binning(x, y, num_bins=50,
7+
exclude_minimum: bool = False):
8+
if isinstance(x, pd.Series):
9+
x = x.values
10+
data = pd.DataFrame(y, dtype=np.float32)
11+
data["_xbins"], bins = pd.qcut(x, q=num_bins, duplicates="drop", retbins=True)
12+
if exclude_minimum:
13+
binned = data.groupby("_xbins", observed=True).apply(
14+
lambda df: df.drop(columns="_xbins").apply(
15+
lambda col: col[col != col.min()].mean()
16+
)
17+
).reset_index()
18+
return binned, bins
19+
return data.groupby("_xbins", observed=True).mean().reset_index(), bins
20+
21+
22+
def quantile_binning_anndata(adata,
23+
pseudotime_key: str = "dpt_pseudotime",
24+
num_bins=50,
25+
exclude_minimum: bool = False):
26+
binned, bins = quantile_binning(adata.obs[pseudotime_key].values,
27+
adata.X,
28+
num_bins=num_bins,
29+
exclude_minimum=exclude_minimum)
30+
remap = {}
31+
for idx, v in enumerate(adata.var_names):
32+
remap[idx] = v
33+
binned.rename(columns=remap, inplace=True)
34+
return binned, bins

0 commit comments

Comments
 (0)