Skip to content

Instantly share code, notes, and snippets.

@Alex-Rosenberg
Created March 21, 2018 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alex-Rosenberg/da2c34bbdeb4cf08305ed95e9e9fe1d2 to your computer and use it in GitHub Desktop.
Save Alex-Rosenberg/da2c34bbdeb4cf08305ed95e9e9fe1d2 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