Closed twoneu closed 2 years ago
/Users/user/opt/anaconda3/lib/python3.9/site-packages/scdrs/pp.py:323: RuntimeWarning: invalid value encountered in log10
x = np.log10(df_gene["ct_mean"].values[not_const])
looks like there is a log(0)
problem (which is quite strange). Somehow I am not able to read h5ad file. Could you send a raw text file (perhaps .csv)?
ordovas_immune_downsampled.zip Hopefully this works! I'm very sorry if it ends up being a data format issue - I really appreciate your time and patience.
@twoneu I was being confusing. I was referring to the expression matrix in .csv format (rows are cell, columns are genes). I can not open the h5ad matrix somehow.
Using df = pd.DataFrame(data=adata.X, index=adata.obs_names, column=adata.var_names)
should work.
PS. within scdrs, there is a step for calculating the ct_mean (gene-wise count matrix average) where scdrs
transform your data in log-transformed space to count space using np.expm1
. One thing to check is to make sure your log-transformed expression values are all >= 0.
Thank you so much - it turns out there was one NaN within my matrix that was throwing the error. This package is great and so are you!
that's great! we will do some more checking on the input matrix in next version (including NaN, expression values >= 0 for log-transformed matrix).
Hi scDRS team,
I am encountering a loess error when trying to run a subsampled, lognormalized h5ad file through
scdrds compute-score
:I used the following code to generate the subsampled dataset from the original data:
The subsampled dataset is attached here: ordovas_immune_downsampled_250.h5ad.zip
Thanks for all your time and help!