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

DeepTCR_WF object has no attribute 'Y' #5

Closed hejing3283 closed 5 years ago

hejing3283 commented 5 years ago

Just re-run it in jupyter notebook, I am getting the same error. Version: 1.2.18

sidhomj commented 5 years ago

which jupyter notebook and line is causing problems?

hejing3283 commented 5 years ago

I think it might has something to do with the system setting. I copied the script from local to a cluster, with the same setting of conda virtual environment, the local one run without a problem, but the hpc one give me error.

hejing3283 commented 5 years ago

Now I am getting error from loading data:

DTCR_WF.Get_Data(directory=input_dir, Load_Prev_Data=False, aggregate_by_aa=True, count_column=6, aa_column_beta=1,v_beta_column=3,d_beta_column=4,j_beta_column=5,sep=",")

Loading Data...

TypeError Traceback (most recent call last)

in 26 27 DTCR_WF.Get_Data(directory=input_dir, Load_Prev_Data=False, aggregate_by_aa=True, count_column=6, ---> 28 aa_column_beta=1,v_beta_column=3,d_beta_column=4,j_beta_column=5,sep=",") 29 /data4/users/jing.he/tools/anaconda3/envs/dl/lib/python3.6/site-packages/DeepTCR/DeepTCR.py in Get_Data(self, directory, Load_Prev_Data, classes, type_of_data_cut, data_cut, n_jobs, aa_column_alpha, aa_column_beta, count_column, sep, aggregate_by_aa, v_alpha_column, j_alpha_column, v_beta_column, j_beta_column, d_beta_column, p, hla) 314 315 Y = self.lb.transform(label_id) --> 316 OH = OneHotEncoder(sparse=False,categories='auto') 317 Y = OH.fit_transform(Y.reshape(-1,1)) 318 TypeError: __init__() got an unexpected keyword argument 'categories'
sidhomj commented 5 years ago

make sure you are using sklearn 0.20

hejing3283 commented 5 years ago

Yes, you were right! Now I check all the modules and their versions are exactly as specific. I am getting new errors....

DTCR_WF.Monte_Carlo_CrossVal(folds=20,test_size=0.5,stop_criterion=0.25, epochs_min=100,suppress_output = False)

File "/data4/users/jing.he/tools/anaconda3/envs/dl/lib/python3.6/site-packages/DeepTCR/DeepTCR.py", line 3384, in Monte_Carlo_CrossVal embedding_dim_genes=embedding_dim_genes,embedding_dim_hla=embedding_dim_hla) File "/data4/users/jing.he/tools/anaconda3/envs/dl/lib/python3.6/site-packages/DeepTCR/DeepTCR.py", line 3109, in Train num_fc_layers,units_fc) File "/data4/users/jing.he/tools/anaconda3/envs/dl/lib/python3.6/site-packages/DeepTCR/functions/Layers.py", line 136, in Conv_Model GO.sp = tf.sparse.placeholder(dtype=tf.float32, shape=[None, None],name='sp') AttributeError: module 'tensorflow.sparse' has no attribute 'placeholder'

sidhomj commented 5 years ago

what version of tensorflow are you using?

hejing3283 commented 5 years ago

1.11.0

sidhomj commented 5 years ago

update to 1.13.1 and let me know if that fixes it

hejing3283 commented 5 years ago

1.13.1 works. Thanks!