Skip to content
Open
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
104 changes: 104 additions & 0 deletions envs/scmgca_pip_req_freeze.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
absl-py==0.15.0
# anndata==0.9.2
astunparse==1.6.3
backcall==0.2.0
cached-property==1.5.2
cachetools==4.2.4
certifi==2021.10.8
charset-normalizer==2.0.12
cloudpickle==1.3.0
cycler==0.11.0
#dataclasses==0.8
decorator==4.4.2
dm-tree==0.1.7
flatbuffers==1.12
future==0.18.2
gast==0.3.3
get_version==2.1
google-auth==1.28.0
google-auth-oauthlib==0.4.4
google-pasta==0.2.0
grpcio==1.34.1
# h5py==3.11.0
hyperopt==0.2.5
idna==3.3
igraph==0.9.11
importlib-metadata==4.8.3
ipython==7.16.3
ipython-genutils==0.2.0
jedi==0.17.2
jgraph==0.2.1
joblib==1.1.0
keras-nightly==2.5.0.dev2021032900
Keras-Preprocessing==1.1.2
kiwisolver==1.3.1
legacy-api-wrap==1.2
leidenalg==0.8.8
llvmlite==0.34.0
lxml==4.8.0
Markdown==3.3.6
matplotlib==3.3.4
natsort==8.1.0
networkx==2.5.1
numba==0.51.2
numexpr==2.7.3
numpy==1.18.1
oauthlib==3.1.0
opt-einsum==3.3.0
packaging==21.3
pandas==1.1.5
parso==0.7.1
patsy==0.5.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.4.0
prompt-toolkit==3.0.29
protobuf==3.19.4
ptyprocess==0.7.0
py4j==0.10.9.7
pyasn1==0.4.8
pyasn1-modules==0.2.8
Pygments==2.12.0
pynndescent==0.5.6
pyparsing==3.0.8
python-dateutil==2.8.2
python-igraph==0.9.11
pytz==2022.1
requests==2.27.1
requests-oauthlib==1.3.1
rsa==4.8
scanpy==1.6.0
scikit-learn==0.24.2
scipy==1.4.1
seaborn==0.11.1
setuptools-scm==6.4.2
sinfo==0.3.4
six==1.15.0
spektral==0.6.1
statsmodels==0.12.2
stdlib-list==0.8.0
tables==3.6.1
tensorboard==2.4.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.3.0
tensorflow-estimator==2.3.0
tensorflow-gpu==2.3.0
tensorflow-probability==0.11.0
termcolor==1.1.0
texttable==1.6.4
threadpoolctl==3.1.0
tomli==1.2.3
tqdm==4.41.1
traitlets==4.3.3
typing-extensions==3.7.4.3
umap-learn==0.4.2
urllib3==1.26.9
wcwidth==0.2.5
Werkzeug==2.0.3
wrapt==1.12.1
xlrd==1.2.0
zipp==3.6.0

seml
#scib-metrics==0.5.1
scMGCA==1.0.7
44 changes: 44 additions & 0 deletions envs/update_requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

# Check if the requirements file is provided
if [ -z "$1" ]; then
echo "Usage: $0 <path_to_requirements.txt>"
exit 1
fi

REQUIREMENTS_FILE=$1

# Check if the file exists
if [ ! -f "$REQUIREMENTS_FILE" ]; then
echo "Error: File $REQUIREMENTS_FILE does not exist."
exit 1
fi

# Create a temporary file to store updated requirements
UPDATED_FILE=$(mktemp)

# Get the list of installed packages with versions
PIP_FREEZE=$(pip freeze)

# Process each line in the requirements file
while read -r PACKAGE; do
if [[ -z "$PACKAGE" || "$PACKAGE" == \#* ]]; then
# Keep comments and empty lines unchanged
echo "$PACKAGE" >> "$UPDATED_FILE"
else
# Extract the package version from pip freeze
VERSION=$(echo "$PIP_FREEZE" | grep "^${PACKAGE}==" || true)
if [ -n "$VERSION" ]; then
echo "$VERSION" >> "$UPDATED_FILE"
else
echo "# $PACKAGE (not found)" >> "$UPDATED_FILE"
fi
fi
done < "$REQUIREMENTS_FILE"

# Overwrite the original file with the updated content
mv "$UPDATED_FILE" "$REQUIREMENTS_FILE"

echo "Updated $REQUIREMENTS_FILE with versions from pip freeze."


45 changes: 30 additions & 15 deletions notebooks/eval/cleaned/eval_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,19 @@ def get_top_runs(res,param_opt_vals=param_opt_vals,params_opt_map=params_opt_map
# Parse param that was optimised
res = prepare_results(res)

# %%
res['params_opt']

# %%
with open("/home/moinfar/io/csi/tmp/pancreas_metrics.pkl", "wb") as f:
pkl.dump(res, f)

# %%
for path in path_integration + res[res.params_opt.replace(params_opt_map).astype(str).isin(['sysvi', 'sysvi_stable'])].index:
print(path + "/args.pkl", end=" ")
print(path + "/loss*", end=" ")
print(path + "/scib*", end=" ")
print(path, end=" ")
# print(path + "/args.pkl", end=" ")
# print(path + "/loss*", end=" ")
# print(path + "/scib*", end=" ")

# %% [markdown]
# ### Best runs
Expand Down Expand Up @@ -231,9 +235,10 @@ def get_top_runs(res,param_opt_vals=param_opt_vals,params_opt_map=params_opt_map

# %%
for path in path_integration + res[res.params_opt.replace(params_opt_map).astype(str).isin(['vamp_cycle', 'sysvi', 'sysvi_stable'])].index:
print(path + "/args.pkl", end=" ")
print(path + "/loss*", end=" ")
print(path + "/scib*", end=" ")
print(path, end=" ")
# print(path + "/args.pkl", end=" ")
# print(path + "/loss*", end=" ")
# print(path + "/scib*", end=" ")

# %% [markdown]
# ### Best runs
Expand Down Expand Up @@ -288,9 +293,10 @@ def get_top_runs(res,param_opt_vals=param_opt_vals,params_opt_map=params_opt_map

# %%
for path in path_integration + res[res.params_opt.replace(params_opt_map).astype(str).isin(['vamp_cycle', 'sysvi', 'sysvi_stable'])].index:
print(path + "/args.pkl", end=" ")
print(path + "/loss*", end=" ")
print(path + "/scib*", end=" ")
print(path, end=" ")
# print(path + "/args.pkl", end=" ")
# print(path + "/loss*", end=" ")
# print(path + "/scib*", end=" ")

# %% [markdown]
# ### Best runs
Expand Down Expand Up @@ -337,6 +343,13 @@ def get_top_runs(res,param_opt_vals=param_opt_vals,params_opt_map=params_opt_map
with open("/home/moinfar/io/csi/tmp/retatlas_metrics.pkl", "wb") as f:
pkl.dump(res, f)

# %%
for path in path_integration + res[res.params_opt.replace(params_opt_map).astype(str).isin(['sysvi', 'sysvi_stable'])].index:
print(path, end=" ")
# print(path + "/args.pkl", end=" ")
# print(path + "/loss*", end=" ")
# print(path + "/scib*", end=" ")

# %% [markdown]
# ### Best runs

Expand Down Expand Up @@ -384,9 +397,10 @@ def get_top_runs(res,param_opt_vals=param_opt_vals,params_opt_map=params_opt_map

# %%
for path in path_integration + res[res.params_opt.replace(params_opt_map).astype(str).isin(['vamp_cycle', 'sysvi', 'sysvi_stable'])].index:
print(path + "/args.pkl", end=" ")
print(path + "/loss*", end=" ")
print(path + "/scib*", end=" ")
print(path, end=" ")
# print(path + "/args.pkl", end=" ")
# print(path + "/loss*", end=" ")
# print(path + "/scib*", end=" ")

# %% [markdown]
# ### Best runs
Expand Down Expand Up @@ -439,9 +453,10 @@ def get_top_runs(res,param_opt_vals=param_opt_vals,params_opt_map=params_opt_map

# %%
for path in path_integration + res[res.params_opt.replace(params_opt_map).astype(str).isin(['vamp_cycle', 'sysvi', 'sysvi_stable'])].index:
print(path + "/args.pkl", end=" ")
print(path + "/loss*", end=" ")
print(path + "/scib*", end=" ")
print(path, end=" ")
# print(path + "/args.pkl", end=" ")
# print(path + "/loss*", end=" ")
# print(path + "/scib*", end=" ")

# %% [markdown]
# ### Best runs
Expand Down
2 changes: 2 additions & 0 deletions notebooks/eval/cleaned/params_opt_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
'harmonypy_theta':'harmonypy_theta',
'sysvi_vamp_cyc_z_distance_cycle_weight_2': 'z_distance_cycle_weight',
'sysvi_vamp_cyc_z_distance_cycle_weight_2_stable': 'z_distance_cycle_weight',
'adv_kappa': 'kappa',
'scmgca_w_a': 'scmgca_w_a',
}


Loading