builab / subtomo2Chimera

18 stars 2 forks source link

Sort based on MicrographName #3

Closed hamid13r closed 2 years ago

hamid13r commented 2 years ago

Hi,

I have enjoyed using your program to make sense of my results and make beautiful sessions. I just noticed that the code seems to assume that the star file is sorted based on the rlnMicrographName?

Not sure if this qualifies as an "issue", I thought this might be something to consider for the next versions. Some of my relion outputs are not sorted by micrographname, and the code only runs when I sort them myself.

builab commented 2 years ago

Hi Hamidreza,

Are you doing this for Relion 3.1 or 4.0? In my lab, we do relion 4.0 exclusively so we don't even have any star file/avg to test with Relion 3.1. The line in the code for Relion 3.1 is only from my guess by looking at the star file but never tested extensively.

For Relion 4.0, the tag will be rlnTomoName not rlnMicrographName. To be honest, my output is always sorted by rlnTomoName. I can mix them up and test them at some points to see. If there is a problem, should be a quite easy fix. Thanks a lot.

Thanks, Huy

hamid13r commented 2 years ago

I am using relion3.1 format since the subtomos are extracted in Warp (so even if I refine in relion4 the format is 3.1). I just uncommented the relion3.1 lines in the code and it ran without any trouble.

At the moment I just sort my star file using awk and it works, but it would be a nice fix if I didn't have to worry about it.

I have certainly enjoyed using your code though, thank you very much!

builab commented 2 years ago

Do you have the star files that didn't work and then worked after sorting for me to test? I don't need your average. I just need the two star files to see what is the ChimeraX output to fix it. You can send it to me at huy.bui@mcgill.ca

builab commented 2 years ago

I fixed the problem. It is actually a very easy fix. Also, I implemented a flag for relion3.1 so you don't need to modify the code now. Just pull the new version and run:

python relionsubtomo2ChimeraX.py --i vlpj2cls1_unsorted.star --o load_tomo_unsorted.cxc --avgAngpix 10 --avgBoxSize "64,64,64" --tomoname ts-11.mrc_10.00Apx.mrc --relion31 1