sidhomj / DeepTCR

Deep Learning Methods for Parsing T-Cell Receptor Sequencing (TCRSeq) Data
https://sidhomj.github.io/DeepTCR/
MIT License
113 stars 40 forks source link

Clustering by phenograph error #1

Closed hejing3283 closed 5 years ago

hejing3283 commented 5 years ago

Hi I was trying to run the clustering tutorial and I got an error after running through the commands below:

DTCRU = DeepTCR_U('Tutorial')

Load Data from directories

DTCRU.Get_Data(directory='github/DeepTCR/Data/Murine_Antigens',Load_Prev_Data=False,aggregate_by_aa=True,aa_column_beta=0,count_column=1,v_beta_column=2,j_beta_column=3) DTCRU.Train_VAE(Load_Prev_Data=False, suppress_output=False) features = DTCRU.features DTCRU.Cluster(clustering_method='phenograph')

OUTPUT

Finding 30 nearest neighbors using minkowski metric and 'auto' algorithm Neighbors computed in 3.018752098083496 seconds Jaccard graph constructed in 1.022472858428955 seconds Wrote graph to binary file in 0.31229281425476074 seconds Running Louvain modularity optimization After 1 runs, maximum modularity is Q = 0.883528 After 2 runs, maximum modularity is Q = 0.88486 Louvain completed 22 runs in 1.1757018566131592 seconds PhenoGraph complete in 5.551486968994141 seconds

TypeError Traceback (most recent call last)

in 1 # cluster using phenograph ----> 2 DTCRU.Cluster(clustering_method='phenograph') ~/anaconda3/envs/dl/lib/python3.7/site-packages/DeepTCR/DeepTCR.py in Cluster(self, set, clustering_method, t, criterion, linkage_method, write_to_sheets, sample, n_jobs) 1051 df['D_beta'] = d_beta[sel] 1052 df['J_beta'] = j_beta[sel] -> 1053 df['HLA'] = list(map(list,hla_data_seq[sel].tolist())) 1054 1055 df_sum = df.groupby(by='Sample', sort=False).agg({'Frequency': 'sum'}) TypeError: 'float' object is not iterable #### OUTPUT #################### I am running using macos, python 3.7
sidhomj commented 5 years ago

I just ran the jupyter notebook myself and I did not receive that error.

hejing3283 commented 5 years ago

Thanks! I used the 2nd way of loading data at the first time, after changing back to the first method, it works now!