You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Set `plt_df` to a data frame with scores. This will plot all scores in the data frame.
1310
-
2. Set `score_key` to a key of a score to plot. This will plot all combinations of this score with other scores (`^min.*{score_key}.*zscore_mad$`).
1311
-
`**kwargs` will be passed to `get_scores(**kwargs)`. If `query` is not in `kwargs`, it will be set to `f"{score_key}__pval < 0.05"`.
1319
+
2. Set `score_key` to a key of a score to plot. This will plot all combinations of this score with other scores.
1320
+
`**kwargs` will be passed to `get_scores(**kwargs)`. If `query` is not in `kwargs`, it will be set to `f"~index.str.startswith('chr') and {score_key}__pval < 0.05"`.
1321
+
If `regex` is not in `kwargs`, it will be set to `f"^min.*{score_key}.*zscore_mad$`.
1322
+
1323
+
E.g. `regex="^min.*{score_key}.*zscore_mad$"` means that only combinations of score `score_key` with any other scores will be plotted.
1324
+
If this score has been combined with DE scores, for example, this will be the combinations for all cell types.
1325
+
Here `min(...,...)__zscore_mad` means the combined score is the minimum of the two scores, normalized as a robust z-score.
1326
+
The complicated column names are simplified by extracting the cell type names with `row_pattern`, to use for the x-axis of the plot.
1312
1327
1313
1328
Parameters
1314
1329
----------
@@ -1317,8 +1332,12 @@ def plot_group_heatmap(
1317
1332
plt_df : Optional[pd.DataFrame], optional
1318
1333
Data frame with scores to plot (as retrieved by `snp2cell.get_scores()`), by default None.
1319
1334
If not set, scores in the object will be plotted.
1320
-
topn : int, optional
1321
-
Number of top scores to plot, by default 5.
1335
+
genes_per_score : int
1336
+
Number of top genes to plot per score, by default 5.
1337
+
n_col : int, optional
1338
+
Number of top scores / columns to plot, by default 30.
1339
+
asinh_transform : bool
1340
+
Whether to apply an arcsinh transformation to the scores to reduce the effect of outliers, by default False.
1322
1341
row_pattern : str, optional
1323
1342
Regex for extracting names for plotting from the score names, by default ".*DE_(?P<rowname>.+?)__".
0 commit comments