Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature.sh does not generate .pkl or .tfrec file from T1019s2.seq #10

Open
sean-lin-tw opened this issue May 18, 2020 · 13 comments
Open

Comments

@sean-lin-tw
Copy link

Hi,
I ran feature.sh with T1019s2.seq as input. It generated the files as follows:
image
But there wasn't T1019s2.pkl or T1019s2.tfrec.
Can you tell me how to correctly generate those files?
Thank you!

@NicolasBelloy
Copy link

Hi,
I have the same issue on my own sequence. After plmDCA and the last python feature.py -s $TARGET_SEQ -f, no pkl nor tfrec file is generated.

@nicolasfredesfranco
Copy link

Hi,
I have the same problem and output files. I don't understand if I need to merge these files and convert them to .npy (if this is the answer, I don't know what will happen to the text in the files). Probably, I suspect that this is our mistake. It seems that the code has been intended to produce only these files, and that is it. So is another step necessary? Do we need to copy the text from each file and paste it into another larger file or something? Is the code incomplete? I couldn't understand if the author of this code wrote it like this because he thinks it's obvious what to do next (something I don't see) if there is an explanation for this in the original alpha folding code (an element I don't see either), because he doesn't understand what do after these calculation steps to produce the final features or if we don't see something. In any case, I would be very congratulations if someone could help us. Perhaps with the help of the author, we can be helpful to each other.

@nicolasfredesfranco
Copy link

nicolasfredesfranco commented Nov 19, 2020

I got it !! I added a line to the beginning of the feature.sh
OUTPUT = "${TARGET_DIR}/${TARGET} _out"
then replace line 20 and 30 with
python feature.py -s $TARGET_SEQ -f -o $OUTPUT
With this you get the final numpy that you can use as the network input, If you want it as tfrec or as pkl, just convert this file.

@nicolasfredesfranco
Copy link

nicolasfredesfranco commented Jan 11, 2021

After a deeply study of the code i believe the line 164 of feature.py has to be change for a "continue", like this:
else:
----------aln, aln_id = read_aln(fas_file)
----------aln = aln[:, aln[0] != '-']
----------write_aln(aln, aln_id, aln_file)
----------continue
the "exit" produce problems and because of this, in some cases, the code doesn't save a npy

@ibr1996
Copy link

ibr1996 commented Jan 15, 2021

I have the same issue, and I can't figure it out yet. The things that nicolasfredesfranco said didn't work :(

@tokiinan5
Copy link

@nicolasfredesfranco How can I convert a .npy file to tfrec? I want to use the generated feature file with the alphafold-implementation. Thus I need to convert it to tfrec

@ibr1996
Copy link

ibr1996 commented Feb 13, 2021

@nicolasfredesfranco How can I convert a .npy file to tfrec? I want to use the generated feature file with the alphafold-implementation. Thus I need to convert it to tfrec

You don't need the tfrec file, you can use the .npy, just rename the extension to .pkl to not change anything in the code and that's it.

@tokiinan5
Copy link

@nicolasfredesfranco How can I convert a .npy file to tfrec? I want to use the generated feature file with the alphafold-implementation. Thus I need to convert it to tfrec

You don't need the tfrec file, you can use the .npy, just rename the extension to .pkl to not change anything in the code and that's it.

So the generated feature file (as .npy) I can use it directly as an input of the original alpha-fold CASP-13 by just changing the extension to .pkl?

@ibr1996
Copy link

ibr1996 commented Feb 14, 2021

@nicolasfredesfranco How can I convert a .npy file to tfrec? I want to use the generated feature file with the alphafold-implementation. Thus I need to convert it to tfrec

You don't need the tfrec file, you can use the .npy, just rename the extension to .pkl to not change anything in the code and that's it.

So the generated feature file (as .npy) I can use it directly as an input of the original alpha-fold CASP-13 by just changing the extension to .pkl?

Yeah, at least for me worked well, and then with the .rr file that you will get from the alphafold.sh script, you can getthe structure using 3DFuzz, a web server for structure prediction

@tokiinan5
Copy link

@nicolasfredesfranco How can I convert a .npy file to tfrec? I want to use the generated feature file with the alphafold-implementation. Thus I need to convert it to tfrec

You don't need the tfrec file, you can use the .npy, just rename the extension to .pkl to not change anything in the code and that's it.

So the generated feature file (as .npy) I can use it directly as an input of the original alpha-fold CASP-13 by just changing the extension to .pkl?

Yeah, at least for me worked well, and then with the .rr file that you will get from the alphafold.sh script, you can getthe structure using 3DFuzz, a web server for structure prediction

Thank you for your reply. What I wanted actually the generated feature from this project and use that https://github.com/deepmind/deepmind-research/tree/master/alphafold_casp13 in this project as the input. That's why I needed the .tfrec I guess

@ibr1996
Copy link

ibr1996 commented Feb 22, 2021

@nicolasfredesfranco How can I convert a .npy file to tfrec? I want to use the generated feature file with the alphafold-implementation. Thus I need to convert it to tfrec

You don't need the tfrec file, you can use the .npy, just rename the extension to .pkl to not change anything in the code and that's it.

So the generated feature file (as .npy) I can use it directly as an input of the original alpha-fold CASP-13 by just changing the extension to .pkl?

Yeah, at least for me worked well, and then with the .rr file that you will get from the alphafold.sh script, you can getthe structure using 3DFuzz, a web server for structure prediction

Thank you for your reply. What I wanted actually the generated feature from this project and use that https://github.com/deepmind/deepmind-research/tree/master/alphafold_casp13 in this project as the input. That's why I needed the .tfrec I guess

The problem with that project is that you can use it only for the structures used in CASP13, so I don't know how to work with it (I didn't try for that limitation)

@Geraldene
Copy link

@nicolasfredesfranco when running the alphafold.py script did you to change the input channels that was specific to your input data.
I have generated the .npy file, but when running alphafold.py I am getting the following error:
RuntimeError: Given groups=1, weight of size [240, 1878, 3, 3], expected input[1, 1880, 64, 64] to have 1878 channels, but got 1880 channels instead

I am not too familiar with Pytorch so I am not sure how to resolve it, do you have any suggestions?

@pauldog
Copy link

pauldog commented Nov 2, 2023

I got it !! I added a line to the beginning of the feature.sh OUTPUT = "${TARGET_DIR}/${TARGET} _out" then replace line 20 and 30 with python feature.py -s $TARGET_SEQ -f -o $OUTPUT With this you get the final numpy that you can use as the network input, If you want it as tfrec or as pkl, just convert this file.

@nicolasfredesfranco Hi, were you able to make pkl files for different proteins? I am currently implementing this model in Unity but I need some additional example pkl files. Do you have any pkl files for some small proteins that you would be prepared to share? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants