pachterlab / kb_python

A wrapper for the kallisto | bustools workflow for single-cell RNA-seq pre-processing
https://www.kallistobus.tools/
BSD 2-Clause "Simplified" License
141 stars 23 forks source link

Tutorial question on expected_num_cells #211

Closed ScienceComputing closed 11 months ago

ScienceComputing commented 11 months ago

Describe the issue Hi. I wondered if anyone knows what the variable "expected_num_cells" refers to, when filtering the empty drop in the kb-python tutorial (https://www.kallistobus.tools/tutorials/kb_getting_started/python/kb_intro_2_python/)? Thank you so much for your help in advance!

What is the exact command that was run?

# These are the Python codes.
# Filter the cells according to the threshold determined from the knee plot
sc.pp.filter_cells(adata, min_genes=200)
sc.pp.filter_cells(adata, min_counts=knee[expected_num_cells])

Command output (with --verbose flag)

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[48], line 1
----> 1 sc.pp.filter_cells(adata, min_counts=knee[expected_num_cells])

NameError: name 'expected_num_cells' is not defined
Yenaled commented 11 months ago

It's the number of barcodes you think you should keep based on the knee plot, or it's the number of barcodes that's described in the publication (which you can verify is reasonable by, again, inspecting the knee plot).

ScienceComputing commented 11 months ago

It's the number of barcodes you think you should keep based on the knee plot, or it's the number of barcodes that's described in the publication (which you can verify is reasonable by, again, inspecting the knee plot).

Got it. Thank you for your explanation.