Skip to content

Instantly share code, notes, and snippets.

@Alex-Rosenberg
Created March 21, 2018 16:46
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Alex-Rosenberg/5ee8b14ea580144facad9c2b87cebf10 to your computer and use it in GitHub Desktop.
Save Alex-Rosenberg/5ee8b14ea580144facad9c2b87cebf10 to your computer and use it in GitHub Desktop.
import scipy.io as sio
import pandas as pd
#Load Data
data = sio.loadmat('<your path>/GSM3017261_150000_CNS_nuclei.mat')
#Digital Expression Matrix
DGE = data['DGE']
#Genes
genes = pd.Series(data['genes']).str.strip(' ')
#Sample types
sample_type = pd.Series(data['sample_type']).str.strip(' ')
#Main cluster assignment
cluster_assignment = pd.Series(data['cluster_assignment']).str.strip(' ')
#Spinal cluster assignment
spinal_cluster_assignment = pd.Series(data['spinal_cluster_assignment']).str.strip(' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment