text_plain_output_2.png text_plain_output_1.png image_output_1.png
!pip install opentsne
from openTSNE import TSNE
if str_data_inf != 'Medulloblastoma Intergrated GSE124814': # Fail in that case by unclear reason 
    from openTSNE import TSNE
    reducer = TSNE(
        perplexity=30,
        metric="euclidean",
        n_jobs=8,
        random_state=42,
        verbose=True,
    )
    r = reducer.fit(X)
    for (i,j) in [(0,1)]:#,(0,2),(1,2),(2,3),(2,4),(3,4)]:
        fig = plt.figure(figsize = (20,12) ); c = 0
        ax = sns.scatterplot(x = r[:,i],y=r[:,j], hue = v4color,  palette = palette1 , marker =  marker1 , alpha = alpha1 )
        if 1:
            plt.setp(ax.get_legend().get_texts(), fontsize=12) # for legend text
            plt.setp(ax.get_legend().get_title(), fontsize=12) # for legend title        
        plt.title(' openTSNE '+ str_data_inf + ' n_samples='+str(len(r)), fontsize = 20)
        plt.show()