<jupyter_start><jupyter_text>Visualize Markers * This tutorial shows how to visualize selected markers with the **scmags** package.First, the markers need to be selected.Let's start with the marker selection process.<jupyter_code>import scmags as mg
baron_h1 = mg.datasets.baron_h1()
baron_h1.filter_genes()
baron_h1.sel_clust_marker()<jupyter_output>-> Eliminating low expression genes
-> Selecting cluster-specific candidate marker genes
-> Selecting  markers for each cluster<jupyter_text>After making a marker selection, you can visualize markers in 3 ways. You can also perform k-NN classification with selected markers and visualize the normalized confusion matrix.\Let's start with the heatmap  Heatmap In this heatmap, the selected markers for each cluster are visualized sequentially.\On the right, the cluster labels are colored so that it can be seen how distinctive the markers are.<jupyter_code>baron_h1.markers_heatmap()<jupyter_output><empty_output><jupyter_text>t-SNEThe t-SNE plot shown below is plotted as a result of the t-SNE calculated from the selected markers. If the selected markers are dissociative, their clusters are expected to be differentiated in the t-SNE plot.<jupyter_code>baron_h1.markers_tSNE()<jupyter_output><empty_output><jupyter_text>DotplotIt was prepared using the dotplot [scanpy](https://github.com/theislab/scanpy) library.\In dotplot, on the other hand, it is desired that the markers selected for the cluster are in dark color within the cluster, which means that the expression within the cluster has a high mean. In addition, the drawn rings should still be larger within the cluster, with larger rings representing higher expression.<jupyter_code>baron_h1.dot_plot(largest_dot=50)<jupyter_output><empty_output><jupyter_text>Confusion MatrixHere, we first perform k-NN clustering and visualize the results with a normalized confusion matrix.<jupyter_code>baron_h1.knn_classifier()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.061766207248596224, 'fraction_numerical': 0.005615109749872384, 'mean_word_length': 6.509578544061303, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 23, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '461334', 'license': 'Apache-2.0', 'n_tokens_mistral': 573, 'n_tokens_neox': 544, 'n_words': 216, 'path': 'docs/source/visualization.ipynb', 'repo_name': 'doganlab/scmags', 'size': '1959'}