filter_rank_genes_groups fold change calculation
See original GitHub issuefilter_rank_genes_groups
handles log values differently than the rank_genes_groups
function. The discrepancy gives different DE gene lists when filtering genes based on log2fc_min=1
with get.rank_genes_groups_df
vs min_fold_change=2
with tl.filter_rank_genes_groups
In rank_genes_groups, np.expm1
is used:
foldchanges = (np.expm1(means[imask]) + 1e-9) / (np.expm1(mean_rest) + 1e-9)
rankings_gene_logfoldchanges.append(np.log2(foldchanges[global_indices]))
In filter_rank_genes_groups, np.exp
is used:
if log:
fold_change_matrix.loc[:, cluster] = (np.exp(mean_obs.loc[True]) / np.exp(mean_obs.loc[False])).values
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Moderated estimation of fold change and dispersion for ... - NCBI
Ranking by fold change, on the other hand, is complicated by the noisiness of LFC estimates for genes with low counts. Furthermore, the...
Read more >Filtering by fold change
I am performing differential gene expression using DESeq2 but will be subsetting transcripts based on a pre-determined criterion. Does this… selection of probes ......
Read more >scanpy.tl.filter_rank_genes_groups - Read the Docs
Filters out genes based on log fold change and fraction of genes expressing the gene within and outside the groupby categories. See rank_genes_groups()...
Read more >filter_rank_genes_groups fold change calculation #863
filter_rank_genes_groups handles log values differently than the rank_genes_groups function. The discrepancy gives different DE gene lists ...
Read more >GFOLD: a generalized fold change for ranking differentially ...
Results: We present the GFOLD (generalized fold change) algorithm to produce biologically meaningful rankings of differentially expressed genes from RNA-seq ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ivirshup yes, i’ll check.
Looks like this has been fixed. There is an option now to compare absolute fold changes if you set
compare_abs=True
.