gao-lab/Cell_BLAST

snakemake question help

caiquanyou opened this issue · 5 comments

when I Reproduce results as th page said by ran snakemake -prk
and iget an error like this:
Traceback (most recent call last):
File "/root/test_cb_repro/Cell_BLAST/Evaluation/.snakemake/scripts/tmpjl7pf7be.dimension_reduction_metrics.py", line 54, in
main()
File "/root/test_cb_repro/Cell_BLAST/Evaluation/.snakemake/scripts/tmpjl7pf7be.dimension_reduction_metrics.py", line 36, in main
y = y[~utils.na_mask(y)]
AttributeError: module 'utils' has no attribute 'na_mask'
How to fix and rerun?

Could you please verify that the na_mask function is defined in Evaluation/utils.py? (Should be in line 15 if you are using the latest version of the repo.)

If it is indeed defined, it is most likely caused by incorrect module being imported. Could you please insert a diagnostic line after the import section of Evaluations/dimension_reduction_metrics.py, like below:

import argparse
import json
import Cell_BLAST as cb
import utils
print(utils.__file__)  # Add this line

Rerun snakemake again and check the output?

If "/root/test_cb_repro/Cell_BLAST/Evaluation/utils.py" is the output of the diagnostic print statement, the imported module should be correct. So is the error about na_mask gone?

Okay great. Let me know if further issues were encountered.