Visualization and Results
Use this sub-skill after a CellTypist annotation already produced an AnnotationResult and the user needs summaries, exported tables, AnnData metadata, UMAP figures, or prediction-vs-reference dotplots.
Route Here When
- The user asks what is inside
predictions.predicted_labels,predictions.decision_matrix,predictions.probability_matrix, orpredictions.adata. - The task is to export CSV or Excel tables with
AnnotationResult.to_table(). - The task is to insert labels, confidence scores, decision scores, or probabilities into AnnData with
AnnotationResult.to_adata(). - The task is to create CellTypist UMAP plots with
AnnotationResult.to_plots()or compare predictions against manual labels/clusters withcelltypist.dotplot(). - The task is to debug missing
majority_voting, missingconf_score, dotplot reference mismatches, output folder errors, or slow UMAP computation.
Route Elsewhere
- Generate the
AnnotationResultwithcelltypist.annotate()in annotation-workflows. - Download, inspect, subset, convert, or extract markers from models in model-management.
- Interpret training artifacts or custom model outputs in training-and-custom-models.
Working Pattern
- Inspect the result shape first:
predictions,predictions.predicted_labels.head(), andpredictions.summary_frequency(by="predicted_labels"). - Choose the output form:
to_table()for files,to_adata()for downstream Scanpy workflows,to_plots()for quick UMAP files, orcelltypist.dotplot()for comparing predictions to manual labels/clusters. - Decide whether the workflow uses raw labels (
predicted_labels) or majority-voted labels (majority_voting); do not request majority-voting confidence or dotplots unless that column exists. - Validate exported artifacts with scripts/result_shape_check.py before plotting or handing files downstream.
- Use references/troubleshooting.md when an output folder, majority-voting column, reference labels, order lists, or UMAP step fails.
References
- Result objects and exports:
AnnotationResultattributes,summary_frequency(),to_table(), andto_adata(). - Plotting and dotplots:
to_plots()UMAP behavior,celltypist.dotplot()semantics, order/filter behavior, and interpretation. - Troubleshooting: focused fixes for output folders, majority voting, UMAP compute, dotplot label mismatches, and shape validation.
