<jupyter_start><jupyter_text>Preprocessing and Visualization<jupyter_code>cd D:\Dropbox\data\proj\PE_HYZ\BuidingCode\ready_SWAPLINE
import SWAPLINEmain
dfcellclusumap1, dfcellclusumap2=SWAPLINEmain.SWAPLINE_dist(n_pcs=30,dfnn=dfnn, n_neighbors=len(dfnn.index),  metric='euclidean', dfposi=dfposi)
dfcellclusumap1.to_csv("%s_50270Final_Couturier2020_DevGBM_NewRef_NN20_rd_dfcellclusumap1.tab"%today,sep="\t")
dfcellclusumap2.to_csv("%s_50270Final_Couturier2020_DevGBM_NewRef_NN20_rd_dfcellclusumap2.tab"%today,sep="\t")
cd D:\Dropbox\data\proj\PE_HYZ\PublicDataSet\GBM_Couturier2020_DevGBM
dfprobCL=pd.read_table("2021-08-16_17-03_Probability_Reliable_Couturier2020_DevGBM_Vs_SL_devMouseBrain_Reference_count.tab",index_col=0,header=0,sep="\t")
dfprobCL.shape
negtest=dfpermutation.values
negtest
n= len(set(dfposi["Cluster"]))
n
nodelist=[['Neural_crest', 'Neural_tube',  'Ectoderm'],['Neural_crest','Pericyte/SMC',  'VLMC'],['Neural_crest', 'Ectoderm','VLMC'],
['Rgl','Neural_tube',  'Ectoderm'],['Rgl','Neural_tube',  'Glia'],['Rgl','Neural_tube',  'OPCs'],['Rgl','Neural_tube',  'Neuron'],
['Rgl','OPCs',  'Neuron'],['Rgl','Glia', 'Neuron'],['Rgl','Glia', 'OPCs']]
cd D:\Dropbox\data\proj\PE_HYZ\BuidingCode\ready_SWAPLINE
import SWAPLINEmainR6
dfnewumapX=SWAPLINEmainR6.SWAPLINE_assign(dfprobCL=dfprobCL, dfcellclusumap1=dfcellclusumap1,dfcellclusumap2=dfcellclusumap2,
                                          negtest=negtest, n=len(set(dfposi["Cluster"])), nodelist=nodelist)
#plot...<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1623931623931624, 'fraction_numerical': 0.0381328073635766, 'mean_word_length': 10.274074074074074, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '546912', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 713, 'n_tokens_neox': 647, 'n_words': 46, 'path': '_SWAPLINEassignment_Couturier2020_DevGBM_Vs_SL_devMouseBrain.ipynb', 'repo_name': 'ernforslab/Hu-et-al._GBMlineage2022', 'size': '1521'}