-
Notifications
You must be signed in to change notification settings - Fork 2
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
PDB dimensionality reduction improvements #115
Conversation
mms29
commented
Apr 21, 2022
- Add a trajectory viewer to the PDB dimensionality reduction protocol.
- Add the possibility to input PDBs from scipion object SetOfPDBs and from DCD trajectory files
- Reduction methods are limited to sklearn PCA (because xmipp methods were too slow)
- Replace the private reading of PDB by a PDB handler (protocols/utilities/pdb_handler.py) called ContinuousFlexPDBHandler designed to read/write/align/compare PDBs.
@@ -64,7 +51,7 @@ def _defineParams(self, form): | |||
form.addSection(label='Input') | |||
form.addParam('pdbSource', EnumParam, default=0, | |||
label='Source of PDBs', | |||
choices=['Used for subtomogram synthesis', 'File pattern'], | |||
choices=['Used for subtomogram synthesis', 'File pattern', 'Object', 'Trajectory Files'], | |||
help='Use the file pattern as file location with /*.pdb') | |||
form.addParam('pdbs', params.PointerParam, pointerClass='FlexProtSynthesizeSubtomo', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can add another pointerClass and let this work for synthesized images not only subtomograms right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it would be good, we can put that as an issue for later as I won't have time to do it right away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets first try to do that:
pointerClass='FlexProtSynthesizeSubtomo, FlexProtSynthesizeImages',
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I understand now what you said. Actually, wouldn't it be even better to output a set of pdbs from these synthesize protocols?
What I understood at the beginning was to allow synthesizing from the same input that pdb dimred (pdb object, dcd trajectory, etc.) That would be also helpful (e.g. generate a MD simulation, then synthesize images/subtomograms)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a good idea to output the set of PDBs from the synthesize protocols. An exception can be made if the user does not have a lot of space, and we can finally delete them to save disk space.
label="Alignement Reference PDB", | ||
help='Reference PDB to align the PDBs with') | ||
form.addParam('matchingType', params.EnumParam, label="Match structures ?", default=0, | ||
choices=['Both structures are the same', 'Match chain name/residue num/atom name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Both" -> "All"
"same" -> ?
For same, we need to find a smart word. Maybe something like "have 1-1 correspondence between the atoms in the same order"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about "All structures are matching", and in the help I say "Method to find atomic coordinates correspondence between the trajectory coordinates and the reference PDB. The method will select the matching atoms and sort them in the corresponding order. If the structures in the files are already matching, choose "All structures are matching"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Good job in the a pdb handler, I hope it is not buggy haha! |
The way I read and write PDB line is copied from biopython. Also I used this reader/writer for a long time on many PDBs so It should be fine (It should ...)
You are right, I did the same and I have these two lines. It seems that one PC is good and not the other, I will investigate
That is great, I wanted to do that but I faced that I need to change different files so I left that for later. If you have something that does it please share.
I removed it since it seemed doing the same thing as the trajectory tool |
Actually, I did several tests but everything looks fine, I observe these two lines only on C-alpha AK and actually the PC of these two lines is extremely small compare to the first PC. When looking the trajectory, everything looks fine. I noticed that I don't have these two lines when generating the PDBs myself, so it might come from the synthesize protocol |
Hmm.. interesting. What about the animation? it is flashing for me and is not showing the movement |
Is it a visualization problem ? Or the trajectory does not correspond ? |
I have just tried to give it a file pattern and it does not allow me to execute. I think it's a problem of "allowsNull". Are you sure you don't have some unpushed commits? lol |
Okay that is very strange. Can you share the PDBs you used for this plot ? |
I generated them using the volume synthesis protocol, I can send them of course. I commented up that I could not give a file pattern as input, can you? |
Hey Remi.. I tested again and didn't notice any problem. Let me know if you are working on something here or we can merge these changes. |