turonova / cryoCAT

Contextual Analysis Tools for cryoET and subtomogram averaging
GNU General Public License v3.0
19 stars 2 forks source link

suggestion: extract peaks #14

Closed shahpnmlab closed 4 months ago

shahpnmlab commented 4 months ago

Hi Beata, I am using gapstop to perform TM on tomograms and then using tmana in cryocat to extract peaks. However, in the current implementation of scores_extract_particles it appears that a star file is written out for every tomo analysed. I can see that the output of this function is a MOTL object and all necessary information for a big star file could be generated at the very end of a for loop for instance, but I wonder if this functionality could be directly included in the program itself?

Also, I am noticing that when one asks for relion output the star file is not correctly formatted eg. the MicrographName is essentially tomo_id and pixel size is NaN because there is no way to pass this information to the function from outset.

Best, Pranav

turonova commented 4 months ago

Dear Pranav,

thanks for the suggestions. Indeed, the scores_extract_particles is done only for one scores-map at the time. In other words, if you have multiple scores-maps you have to write the loop yourself anyway to loop over them and thus you can also easily concat the motive lists yourself. There is a function on merging provided:

https://cryocat.readthedocs.io/latest/generated/cryocat.cryomotl.Motl.html#cryocat.cryomotl.Motl.merge_and_renumber

We will add the peak extraction to gapstop and there it will be possible to extract peaks at once for all tomograms specified in the parameter file. As for cryocat we might provide a batch function to take care of multiple scores-maps and output single motive list in the future but I will not make any promises as on when it happens.

Finally - the default motive list we work with (also internally in cryocat) corresponds to the emmotl. In limited number of functions we provide the possibility to write out directly also relion starfile but there are limitations as to what one can specify (e.g. pixel size, tomogram paths etc.). We do not intend to extend those parameters in the near future. Instead, the preferred way is to generate emmotl file and convert it to the relion with emmotl2relion function or by creating a new RelionMotl instance and then using the write_out function. In both cases, one can specify all necessary information.