broadinstitute / CellBender

CellBender is a software package for eliminating technical artifacts from high-throughput single-cell RNA sequencing (scRNA-seq) data.
https://cellbender.rtfd.io
BSD 3-Clause "New" or "Revised" License
297 stars 54 forks source link

generate tiny dataset syntax error #282

Open ryao-mdanderson opened 1 year ago

ryao-mdanderson commented 1 year ago

Dear CellBender support,

Following https://cellbender.readthedocs.io/en/latest/tutorial/index.html I hit an error message to generate a tiny test data:

$ cd examples/remove_background $ python generate_tiny_10x_dataset.py File "generate_tiny_10x_dataset.py", line 14 num_empty_barcodes_to_keep = 50_000 ^ SyntaxError: invalid syntax

Which python version is compatible with the script?

Thanks, Rong Yao

sjfleming commented 1 year ago

Hi @ryao-mdanderson , it should be compatible with python 3.7

I've tested on Mac and Linux. It looks like it doesn't like the underscore in the number... but I think this is still allowed? https://peps.python.org/pep-0515/

What is your software setup? Windows/Linux? Python version?

ryao-mdanderson commented 1 year ago

Hi @sjfleming thank you very much for a reply.

1, Using python 3.7.3 it appears not seeing the syntax I reported, in line14 of the file.

2, I set up cellbender gpu container on RHEL 7.9 HPC cluster, it works.

To have a mini test input, I git clone CellBener, $ python --version Python 3.7.3 $ gcc --version gcc (GCC) 7.1.0

$ cd examples/remove_background/ $ python generate_tiny_10x_dataset.py Traceback (most recent call last): File "generate_tiny_10x_dataset.py", line 6, in from cellbender.remove_background.downstream import load_anndata_from_input ModuleNotFoundError: No module named 'cellbender'

This time, an error happens earlier, in line6 of the file. Any idea?

sjfleming commented 1 year ago

I think after you git clone cellbender, you need to do

$ cd CellBender
$ pip install -e .

(which should install cellbender)

Then try

$ cd examples/remove_background/
$ python generate_tiny_10x_dataset.py