Skip to content
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

Folder hierarchy not fully preserved for *_topazpicks.star #84

Open
zruan opened this issue Feb 21, 2021 · 5 comments · May be fixed by #85
Open

Folder hierarchy not fully preserved for *_topazpicks.star #84

zruan opened this issue Feb 21, 2021 · 5 comments · May be fixed by #85

Comments

@zruan
Copy link

zruan commented Feb 21, 2021

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

os.system(str('''relion_star_printtable ''')+inargsMics+str(''' data_micrographs _rlnMicrographName | awk -F"/" 'NR==1{print $(NF-1)}' > ''')+tmpfile)

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)

@tbepler
Copy link
Owner

tbepler commented Feb 21, 2021

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?

@alexjnoble
Copy link
Contributor

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

@tbepler
Copy link
Owner

tbepler commented Feb 23, 2021

@alexjnoble Ok, are you able to test this user contribution? #85

@alexjnoble
Copy link
Contributor

alexjnoble commented Feb 23, 2021

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?

@rfleiro
Copy link

rfleiro commented Feb 23, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants