-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
application and visualization #11
Comments
Thanks for your attention. SEVtras has provided the visualization of UMAP in the output of |
I am still in the exploratory phase of understanding how to utilize the output from the ESAI_recognizer, and since I haven't had much experience with Python before (having conducted most of my analyses in R), I am also trying to figure out how to use the ESAI_calculator. Could you please provide the code used to generate Figure 4-C? Additionally, could you clarify the meaning of the ev_genes.csv generated in the output of the ESAI_recognizer? Thank you very much! |
The code corresponding to Figure 4-C is copied as follows: ## for the left UMAP
import scanpy as sc
sc.pl.umap(adata, color = ['clusters'], legend_loc='on data', ax = ax, frameon = False,
palette = sns.color_palette(['#97bfa4', '#766187']), size = 200, show = False)
## for the right GSEA
import gseapy as gp
###generate gsea_res from gseapy
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import colors
import numpy as np
import pandas as pd
### MITOTIC_SPINDLE
sns.set(style="ticks", font_scale=2)
fig, (ax) = plt.subplots(1, 1, figsize = (6, 3))
res = gsea_res[0][1]
term = 'HALLMARK_MITOTIC_SPINDLE'
line_color = '#97bfa4'
sns.lineplot(x = np.arange(len(res.ranking)), y = res.results[term]['RES'], linewidth=4, color = line_color, ax = ax)
ax.set_ylabel("Enrichment score")
ax.set(xticklabels=[])
ax.set(xticks=[])
ax.set_title('Mitotic spindle')
ax1 = fig.add_axes([0.124,0.07,0.776,0.08])# change for different size
import matplotlib.transforms as transforms
trans2 = transforms.blended_transform_factory(ax1.transData, ax1.transAxes)
ax1.vlines(res.results[term]['hit_indices'], 0, 1, linewidth=.5, transform=trans2, color ='black')
ax1.spines['bottom'].set_visible(False)
ax1.spines['top'].set_visible(False)
ax1.spines['right'].set_visible(False)
ax1.spines['left'].set_visible(False)
ax1.tick_params(axis='y',
bottom=False, top=False,
right=False, left=False,
labelbottom=False, labelleft=False)
ax1.set_xlabel("Gene position")
sns.despine()
plt.savefig('../figures/fig4_gsea_0.pdf', dpi = 300, transparent=True, format = 'pdf', bbox_inches='tight')
### PI3K_AKT_MTOR_SIGNALING
sns.set(style="ticks", font_scale=2)
fig, (ax) = plt.subplots(1, 1, figsize = (6, 3))
res = gsea_res[0][1]
term = 'HALLMARK_PI3K_AKT_MTOR_SIGNALING'
line_color = '#766187'
sns.lineplot(x = np.arange(len(res.ranking)), y = res.results[term]['RES'], linewidth=4, color = line_color, ax = ax)
ax.set_ylabel("Enrichment score")
ax.set(xticklabels=[])
ax.set(xticks=[])
ax.set_title('PI3K/Akt/mTOR signaling')
ax1 = fig.add_axes([0.124,0.07,0.776,0.08])# change for different size
import matplotlib.transforms as transforms
trans2 = transforms.blended_transform_factory(ax1.transData, ax1.transAxes)
ax1.vlines(res.results[term]['hit_indices'], 0, 1, linewidth=.5, transform=trans2, color ='black')
ax1.spines['bottom'].set_visible(False)
ax1.spines['top'].set_visible(False)
ax1.spines['right'].set_visible(False)
ax1.spines['left'].set_visible(False)
ax1.tick_params(axis='y',
bottom=False, top=False,
right=False, left=False,
labelbottom=False, labelleft=False)
ax1.set_xlabel("Gene position")
sns.despine()
plt.savefig('../figures/fig3_gsea_1.pdf', dpi = 300, transparent=True, format = 'pdf', bbox_inches='tight') And the ev_genes.csv file represents sEV-characterized genes enriched during EM iterations in SEVtras. This is a data-driven process, and these genes are used to identify sEV-containing droplets in your single-cell data. |
Thank you for developing the algorithm!
I would like to ask, if it's not too much trouble, could you provide us with the visualization code? I am particularly interested in attempting to replicate the figures involving tumor samples that were presented in the article. Could you provide the visualization code for that purpose?
The text was updated successfully, but these errors were encountered: