-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError when running quick test after installation #83
Comments
Hi, v1.0.3 is in the main branch. We may have updated the test data. Can you install from the main branch and run the tests again? |
Same error with v1.0.3:
|
I've also tried scDRS v.1.0.3 with multiple versions of Python (3.8-3.12), and the test only passed with Python 3.8 for some reason:
|
Somewhat strangely, I couldn't replicate this error using either python 3.9 / 3.10. For example in https://colab.google/ (3.10) !python --version
!pip install git+https://github.com/martinjzhang/scDRS.git
import os
import pandas as pd
import scdrs
DATA_PATH = scdrs.__path__[0]
H5AD_FILE = os.path.join(DATA_PATH, "data/toydata_mouse.h5ad")
COV_FILE = os.path.join(DATA_PATH, "data/toydata_mouse.cov")
GS_FILE = os.path.join(DATA_PATH, "data/toydata_mouse.gs")
# Load .h5ad file, .cov file, and .gs file
adata = scdrs.util.load_h5ad(H5AD_FILE, flag_filter_data=False, flag_raw_count=False)
df_cov = pd.read_csv(COV_FILE, sep="\t", index_col=0)
df_gs = scdrs.util.load_gs(GS_FILE)
# Preproecssing .h5ad data compute scDRS score
scdrs.preprocess(adata, cov=df_cov)
gene_list = df_gs['toydata_gs_mouse'][0]
gene_weight = df_gs['toydata_gs_mouse'][1]
df_res = scdrs.score_cell(adata, gene_list, gene_weight=gene_weight, n_ctrl=20)
print(df_res.iloc[:4]) |
Strange indeed... Maybe something is wrong with my conda. But I can't think of any reason why only the Thanks for the efforts in pinpointing the issue. I'm closing this for now unless someone else runs into this. But I'd recommend updating the installation instructions in the tutorial to v.1.0.3. |
I replicated this issue (with the exact |
Fixed. The issue is due to a small discrepancy between different pandas versions. |
Dear scDRS devs,
Hi, I tried following the tutorial (https://martinjzhang.github.io/scDRS/index.html) and running the quick test after installing
scDRS
in a conda env:But then I ran into this error:
When I checked the output against the expected results listed on the tutorial page, indeed only the values
norm_score
column are not matched:I wonder what would be the reason causing this, and whether I should worry about this before I run scDRS on my real dataset. Did you guys update the ways you compute the
norm_score
? Also, I see in the manual and also the Github page you have the scDRS v.1.0.3 updated but I can't find this branch in the repo, and the version printed out from python also said v.1.0.2 (with some syntax warnings):Could this be the reason causing the inconsistency?
Here are the packages installed in my conda env for your information:
And the full error log when I ran the quick test:
The text was updated successfully, but these errors were encountered: