This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hamdist(str1, str2): | |
"""Count the # of differences between equal length strings str1 and str2""" | |
diffs = 0 | |
for ch1, ch2 in zip(str1, str2): | |
if ch1 != ch2: | |
diffs += 1 | |
return diffs | |
def remove_duplicates_round(df,hamm_thres=4,merge_counts=False): | |
seqs = list(df.Seq.values) |