topaz icon indicating copy to clipboard operation
topaz copied to clipboard

Folder hierarchy not fully preserved for *_topazpicks.star

Open zruan opened this issue 5 years ago • 5 comments

I usually organize my cryo-EM data based on relion recommendations. See section 2.1 of Link.

For example, I put my tif files under Movies/10Feb2021 and import the movies into relion for the rest of the data analysis.

However, the relion wrapper of topaz only recognizes the last folder element in the hierarchy. In this case, 10Feb2021. This causes the picking result not able to display from relion gui.

The solution is to manually make a Movies folder under the External/jobXXX/ and move all the 10Feb2021/*_topazpicks.star files into it. However, it would be nice to recognize the folder hierarchy directly by the topaz wrapper.

This can be fixed by changing the following code https://github.com/tbepler/topaz/blob/617547c39d29eceb38de36eaf832432e08f0997d/relion_run_topaz/run_topaz_pick.py#L96 to something like os.system(str('''relion_star_printtable ''')+inargsMics+str(''' data_micrographs _rlnMicrographName | awk -F'job[0-9]*/' '{print $2}' | sed 's|/[^/]*.mrc||' > ''')+tmpfile)

zruan avatar Feb 21 '21 03:02 zruan

This should be addressed by the "--per-micrograph" flag that I added to Topaz a few months ago. It causes the commands to write star files directly to the same location as the input files for better RELION compatibility and should simplify this issue dramatically.

If you'd like to make a pull request updating the RELION scripts, I'm happy to accept it. @alexjnoble do you have any plans to update the RELION scripts?

tbepler avatar Feb 21 '21 04:02 tbepler

I anticipate that the current Relion scripts will be superseded by Topaz integration in the next official Relion release, version 3.2. So the current scripts will likely not be updated further, unless by user contribution.

-Alex

alexjnoble avatar Feb 22 '21 17:02 alexjnoble

@alexjnoble Ok, are you able to test this user contribution? https://github.com/tbepler/topaz/pull/85

tbepler avatar Feb 23 '21 03:02 tbepler

I have very little experience with Relion so I don't have a proper test case for this or other contributions. Perhaps @rfleiro can help with this?

alexjnoble avatar Feb 23 '21 03:02 alexjnoble

Hi, agree with Alex, these scripts will be soon superseded by the new integration in Relion. I will test the new code

rfleiro avatar Feb 23 '21 06:02 rfleiro