m3h0w / protein-dihedral-angles-prediction

A hybrid approach to protein structure (dihedral / torsional angles) prediction using techniques from Mohammed AlQuraishi's work on End-to-end differentiable learning of protein structure and Gao et al. on RaptorX.
https://gacka.space/portfolio/protein-structure-prediction.html
8 stars 5 forks source link

Encoder files missing #2

Open n4ndoz opened 5 years ago

n4ndoz commented 5 years ago

PC setup: CPU: i9 GPU: GTX 1080 Memory: 32gb DDR4 Docker: 19.03.3 Tensorflow: 1.13.2

Issue: When trying to run the "Full pipeline - txt data" code it says there are some missing joblib files. Taking a look at your "Parsing txt", it says there's a need to extract those files together: training_50_dih.joblib validation_dih.joblib le.joblib ohe.joblib

Aside from le.joblib and ohe.joblib I could not find any of those. Is there any way I could work around those files or, eventually producing them myself? Or are you going to commit both?

Thank you in advance.

m3h0w commented 5 years ago

training_50_dih.joblib and validation_dih.joblib are constructed by transforming the primary structure into dihedral angles, thus are too large to be committed to the repository. I recommend working with the notebook based on the tensor data instead or recreating the files by uncommenting and running this cell in the Full pipeline - txt data notebook: image

Sorry for taking so long to respond - my notification settings or GitHub aren't exactly doing what I'd expect them to.

n4ndoz commented 5 years ago

Hi, Michal. I didnt uncommented the lines and followed the Tensor Data pipeline. THe problem is I'm getting an error.

`--------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last)

in 25 # they fall onto default coming from the queue if nothing is fed through feed_dict 26 true_dihedrals = tf.placeholder_with_default(true_dihedrals, shape=(None, None, n_angles)) ---> 27 true_vectors = Helpers.ang_to_vec_tf(true_dihedrals) 28 one_hot_primary = tf.placeholder_with_default(one_hot_primary, shape=(None, None, 20)) 29 evolutionary = tf.placeholder_with_default(evolutionary, shape=(None, None, 21)) /tf/fernando/storage/hibrido/protein-dihedral-angles-prediction-master/model/helpers.py in ang_to_vec_tf(angles) 72 angles_cos = tf.cos(angles[:,:,:,0]) 73 angles_sin = tf.sin(angles[:,:,:,1]) ---> 74 norm = tf.sqrt(np.square(angles_cos) + np.square(angles_sin)) 75 angles_sin, angles_cos = angles_sin / norm, angles_cos / norm 76 angles_stacked = tf.squeeze(tf.stack([angles_cos, angles_sin], axis=-1)) /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py in __array__(self) 734 def __array__(self): 735 raise NotImplementedError("Cannot convert a symbolic Tensor ({}) to a numpy" --> 736 " array.".format(self.name)) 737 738 def __len__(self): NotImplementedError: Cannot convert a symbolic Tensor (Cos:0) to a numpy array.` Do you know how to fix that? Which version of TF was you code written on? And no problem about the time. If anything, I could send you an e-mail.
m3h0w commented 5 years ago

Didn't give enough care to versioning at the time of creating this repository.

It looks like the error is related to mixing numpy with tensorflow. Did you try converting the np.square() calls to a TensorFlow equivalent?

n4ndoz commented 4 years ago

Yep! I have tried it. I ended up reimplementing several parts of the code, so in the end it was a good inspiration anyways. Sorry for the long delay in answering.