transfer boxed particle coordinates between "en" and "en-a" presets
Added by Rui Zhang over 11 years ago
Hi,
I previously boxed particles using the "en" preset images, but later on I got the drift-correction to work (finally!) and generated the "en-a" preset images.
However, I found I cannot use the box coordinates I picked from "en" images to generate particle stack for "en-a" images.
I wonder is there an easy way to transfer those coordinates?
Thanks!
Replies (9)
RE: transfer boxed particle coordinates between "en" and "en-a" presets - Added by Anchi Cheng over 11 years ago
The way to do this is download the picks and then make them into what is required for the "en-a" presets, and then upload the picks.
- Goto http://your_myamiweb/processing/prtlreport.php?expId=your_session_id
- Download coordinates of the particles that you picked in "en"
- Edit this file:
- The aligned images are cropped to center square. Therefore, there is an offset in the coordinates. For example, Newer Gatan K2 Summit Counted image have a dimension of 3710 x 3838. The aligned images have a dimension of 3710 x 3710. The offset to apply is therefore (0, -(3838-3710) / 2 ). In other words, a pick that used to be at (100,100) on en should now be at (100, 36) on en-a
- Filename at the last column need to be modified to that with "en-a". This is straight forward if only one alignment run is done. If more than one was done and only the later ones are good, then the version of the image will need to be added to match the filename that the picks are to applied.
- Goto http://your_myamiweb/processing/uploadParticles.php?expId=your_session_id and follow the instruction in Upload_Particles
RE: transfer boxed particle coordinates between "en" and "en-a" presets - Added by Rui Zhang over 11 years ago
Hi, Anchi,
By modifying the apDDprocess.py code as you suggested, I managed to generate a new set of drift-corrected images using different "dosefgpu_driftcorr" options, and store them under "en-b" preset.
Since they have the same dimension, I guess I can simply transfer the coordinates from "en-a" to "en-b" by download/upload.
However, I notice the image order under "en-a" and "en-b" presets are not the same in the myami web interface. I wonder if I run makestack2.py for both "en-a" and "en-b", will the particle register be the same?
Thanks!
RE: transfer boxed particle coordinates between "en" and "en-a" presets - Added by Anchi Cheng over 11 years ago
It depends on how different the alignments are between the two sets. en-a and en-b for the same original image are different by only a few pixels so that the boxed particle is still fully included in the box you intend to use, the particles will register.
The order in myamiweb is just the database inserting order. The upload is based on the filename.
RE: transfer boxed particle coordinates between "en" and "en-a" presets - Added by Rui Zhang over 11 years ago
Thanks!
What order is used by makestack2.py, the inserting order, or the filenames?
RE: transfer boxed particle coordinates between "en" and "en-a" presets - Added by Anchi Cheng over 11 years ago
Insertion order. I see where this question come from. I assume that you want to make comparison in the future. There is a way to match them through database table ApDDAlignImagePairData, but I won't be able to implement it now. Need to work on other high priority matters.
RE: transfer boxed particle coordinates between "en" and "en-a" presets - Added by Anchi Cheng over 11 years ago
To be specific, AppionLoop like makestack2 go through images based on insertion order. You control the sort order by specify Forward/Reverse.
Within the image, it extracts particles based on the insertion order of the particle picks, the sort order is always reverse(newest first).
For example, if we insert images 1,2,3 (3 is the last to insert), and we pick particles a,b,c,d in each image.
If I ask makestack2 to make a particle stack in Forward order, here is what I get:
1d
1c
1b
1a
2d
2c
2b
2a
3d
3c
3b
3a
RE: transfer boxed particle coordinates between "en" and "en-a" presets - Added by Rui Zhang over 11 years ago
Yes, I already did structural refinement for "en-a", and I want to directly transfer the alignment parameters of "en-a" to "en-b" data without re-running the refinement.
Please take your time. I personally think it makes more sense to use filenames rather than inserting order for makestack2.py.
RE: transfer boxed particle coordinates between "en" and "en-a" presets - Added by Rui Zhang over 11 years ago
In the meanwhile, I guess I can hack the leginon/ folder to rename "en-b" to be "en-a" (of course move the original "en-a" to somewhere else), and rerun the makestack2.py for "en-a".
RE: transfer boxed particle coordinates between "en" and "en-a" presets - Added by Anchi Cheng over 11 years ago
Yes, it is a hack, but it should work.
Regarding not using filename in AppionLoop, the program is designed to allow running while data is being collected. There is no guarantee that files come in in the order of the filename, especially with queuing. It would be just as confusing.