replacing binned stack with unbinned stack

10 posts / 0 new
Last post
Jrai
replacing binned stack with unbinned stack

Hi all,

I have done my refinement at binned data. Now, I would like to use the conditions from binned data to unbinned data. Is there any easy way to do it? Also, the final particles number will be differnt from the parent stack. I wouild like to use the particles from last round/last refinement.

Thanks

Jrai

timgrant
Hi Jrai,

Hi Jrai,

There is not really an easy way to do this.  cisTEM does a lot of binning on the fly, so in general you will probaly find that you don't get an extreme speed boost from using a pre-binned stack. I tend to resample my movies upon import to the physical pixel size, or 1A per pixel if the physical pixel size is less than that, then use them for everything afterwards.

Is this data that you imported from elsewhere?  have you done classifications now, and so have new stacks? In general you may be able to do this in a slightly "hacking" way via direct access to the database, but it depends on exactly what you have done to this point?  If you have the unbinned stack, you can just export the current refinement, then import again using the parameter file, and new stack with the unbinned pixel size

Tim

Jrai
Yes, I imported the stack

Yes, I imported the stack from relion which contain 100000 particles. I did some classifications. And now, I am interested in the model which contain only 25000 particles. When I created the new refine assets, it created a new stack at directory ParticleStack. All of this processing so far I have done using a binned stack. Now, I would like to use those 25000 particles with eulers angels from .par files. I have an unbinned stack from relion. I can see that the new stack after particles sorting from classification is different from  the parent stack. So, is there any way to use those .par files on uninned parent stack.

Thanks

Jrai
Thank you, Tim,

Thank you, Tim,

Regarding direct access to a database file, I think if I change the pixel size from binned to unbinned one in the database file, would do the trick ( Then rename my unbinned stack named as the binned stack). But which line should I change?  If this work then I think I can create a new refinement package then do refinement. This would save a lot of time for me.

 

timgrant
Hi Jrai,

Hi Jrai,

That sounds reasonable, if you want to try it do this :-

1. Backup your .db file somewhere in case it gets screwed up.

2. work out the id of the refinement package you want to change, by running the following.

sqlite3 my_database.db "select * from refinement_package_assets;"

This will list all your refinement packages, find the correct one, and take note of the number in the first column, this is the id. 

3. run :-

sqlite3 my_database.db "update refinement_package_contained_particles_$id set pixel_size=$unbinned_pixel_size;" 

obviously, you need to replace $id with the id for your refinement package, and $unbinned_pixel_size with the pixel size you want. 

4. The refinement packages store their box size, so you need to update that :-

sqlite3 my_database.db "update refinement_package_assets set stack_box_size=$unbinned_box_size where refinement_package_asset_id=$id;"

obviously replacing $unbinned_box_size with the correct box size, and $id with the id.

Then copy the stack over.  I have not tested this myself, and it may lead to unexpected problems, but it could be worth a try - if it works, please let us know here. 

Tim

 

 

Jrai
Thank you Tim.

Thank you Tim.

But I am confuss with the second comand

sqlite3 my_database.db "update refinement_package_contained_particles_$id set pixel_size=$unbinned_pixel_size;"

at my_database.db, I used my owndatabase jrai.db

Do I need to change refinement_package_contained_particles_  with my own refinement package eg, Refinement_Package

I put $3 in place of $id and write $2.57 in place of $unbinned_pixel_size. It says there is no such file as Refinement_Package.

Am I doing something wrong

Jrai

Jrai
There is no such table called

There is no such table called refinement_package_contained_particles_ 

when I  just copy and paste the command with my desire project.db and pixel size

timgrant
you need to add the id of the

you need to add the id of the correct refinement package on the end.. you can find out the id by running :-

sqlite3 my_database.db "select * from refinement_package_assets;"

find the refinement package you want (based on the name), the number in the first column is the id.  When you replace $id and $pixel_size etc also replace the $.  e.g if you refinemnet_package id is 3 and your unbinned pixel size is 2.57 do :-

sqlite3 my_database.db "update refinement_package_contained_particles_3 set pixel_size=2.57;"

Cheers,

Tim

Jrai
Thanks a lot.

Thanks a lot.

It changed. Now I am trying to work on it. And, let you know about the progress

Jrai

Jrai
Hi Tim,

Hi Tim,

It is running smoothly so far. No compalin...

THanks

Log in or register to post comments