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

Is it necessary to specify `n_genes` in box 35 #70

Closed yugeji closed 3 years ago

yugeji commented 3 years ago

In block [35]:

#Calculate marker genes
sc.tl.rank_genes_groups(adata, groupby='louvain_r0.5', key_added='rank_genes_r0.5')

no n_genes parameter is specified, yet sc.tl.marker_gene_overlap(adata, marker_genes, key='rank_genes_r0.5') in the following code block works as intended, instead of finding overlap with all genes - is this because the n_genes of rank_genes_groups was set elsewhere, or bc the default behavior has since changed?

Thank you, Yuge

LuckyMD commented 3 years ago

I amended the default behaviour to be top 100 genes when the default in rank_genes_groups was changed. This should be in the function documentation as well though, no?