theislab / single-cell-tutorial

Single cell current best practices tutorial case study for the paper:Luecken and Theis, "Current best practices in single-cell RNA-seq analysis: a tutorial"
1.39k stars 458 forks source link

Add fixes for 2021 container #77

Open Zethson opened 3 years ago

Zethson commented 3 years ago

Hey,

this is part of the effort to bring the tutorial update to @le-ander 2021 container standards. We will of course be making more adjustments to the content and interpretations, but this is just to get the syntax right. Using Scanpy 1.6.1 now, but we should go even further and update to the latest version.

  1. Added adata.var_names_make_unique() when reading the single file or we run into naming issues.
  2. calculate_qc_metrics returns n_genes_by_counts and not total_genes_by_counts
  3. adata = adata[adata.obs['pct_counts_mt'] < 20] and not adata = adata[adata.obs['pct_counts_mt'] < 0.2]
  4. calculateSumFactors and not computeSumFactors

What currently confuses me is that the marker_overlap is total bonkers

image

The only difference is that the louvain clustering (which should be leiden anyways) returns 10 instead of 9 clusters. Everything else is also very similar. Will have to look into this when integrating all of this into the 2.0 book.

CC @AnnaChristina @danielStrobl should help as starting point.

Signed-off-by: zethson lukas.heumos@posteo.net

review-notebook-app[bot] commented 3 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

LuckyMD commented 3 years ago

Hey! This is awesome :). Did you see #58? The marker gene overlap just needs an n_top_genes=100 argument. Although I thought I made that default in scanpy...

Zethson commented 3 years ago

Hey! This is awesome :). Did you see #58? The marker gene overlap just needs an n_top_genes=100 argument. Although I thought I made that default in scanpy...

Yeah, this PR is against your PR in #58 :)

Ohh, yeah I forgot about that. Maybe it became a default post 1.6.1. Another reason to update Scanpy. But we will likely create our own containers in the not so distant future anyways.

LuckyMD commented 3 years ago

Ah, now I'm paying attention ^^. Thanks :). agreed scanpy update would be good... no reason not to as things should work pretty out of the box as well...