3dem / relion

Image-processing software for cryo-electron microscopy
https://relion.readthedocs.io/en/latest/
GNU General Public License v2.0
453 stars 202 forks source link

MotionCor2 parser on Relion-2.0.1 open beta did not work correctly #132

Closed bforsbe closed 7 years ago

bforsbe commented 8 years ago

Originally reported by: Hideki Shigematsu (Bitbucket: hshigema, GitHub: hshigema)


I am trying to use MotionCor2 through Relion-2.0 GUI. When I used GUI to set the parameters like,

`which relion_run_motioncorr` --i Import/movies/movies.star --o MotionCorr/job103/ --first_frame_sum 2 --last_frame_sum 20 --bin_factor 2 --motioncorr_exe /Appl/local/bin/MotionCor2 --bfactor 150 --use_motioncor2 --angpix 1.283 --patch_x 5 --patch_y 5 --other_motioncorr_args " -Iter 10 -Tol 0.5 " --gpu  --dose_weighting --voltage 200 --dose_per_frame 1.35 --preexposure 1.35

It seems working fine as I can see run.job like,

job_type == 1
is_continue == false
Input movies STAR file: == Import/movies/movies.star
Save aligned movie stacks? == No
First frame for corrected sum: == 2
Last frame for corrected sum: == 20
Pixel size (A): == 1.283
MOTIONCORR executable: == /Appl/local/bin/MotionCor2
Is this MOTIONCOR2? == Yes
Gain-reference image: == 
Number of patches X: == 5
Number of patches Y: == 5
Group frames: == 1
Binning factor: == 2
Bfactor: == 150
Which GPUs to use:  == 
Other MOTIONCORR arguments == -Iter 10 -Tol 0.5
Use UNBLUR instead? == No
UNBLUR executable: == /Appl/local/bin/unblur
SUMMOVIE executable: == /Appl/local/bin/summovi
Do dose-weighting? == Yes
Voltage (kV): == 200
Dose per frame (e/A2): == 1.35
Pre-exposure (e/A2): == 1.35
Number of nodes: == 1
Number of MPI procs: == 1
Number of threads: == 1
Submit to queue? == Yes
Queue name:  == i
Queue submit command: == qsub
Standard submission script: == /Appl/relion-2.0.1-single/bin/qsub.sh
Additional arguments: == 

But it ends up to write the com file as,

/Appl/local/bin/MotionCor2  -InMrc Micrographs/sq03_1/Corrected_sq03_10000_movie.mrcs -OutMrc MotionCorr/job103/Micrographs/sq03_1/Corrected_sq03_10000.mrc -Patch 5 5 -Throw 1 -FtBin 2 -kV 200 -FmDose 1.35 -PixSize 1.283  -Iter 10 -Tol 0.5  -Gpu --dose_weighting >> MotionCorr/job103/Micrographs/sq03_1/Corrected_sq03_10000.out 2>> MotionCorr/job103/Micrographs/sq03_1/Corrected_sq03_10000.err

Which lacks options for -Trunc, -Bft, -InitDose. Actually, the out file shows options passed to MotionCor2 like,

-InMrc      Micrographs/sq03_1/Corrected_sq03_10000_movie.mrcs
-InTiff     
-InSuffix   
-OutMrc     MotionCorr/job103/Micrographs/sq03_1/Corrected_sq03_10000.mrc
-Gain       
-TmpFile    
-LogFile    
-Serial     0
-MaskCent   0.000000  0.000000
-MaskSize   1.000000  1.000000
-Patch      5  5
-Iter       10
-Tol        0.500000
-Bft        100.000000
-StackZ     0
-FtBin      2.000000
-InitDose   0.000000
-FmDose     1.350000
-PixSize    1.283000
-kV         200
-Throw      1
-Trunc      0
-Group      1
-FmRef      1
-OutStack   0
-RotGain    0
-FlipGain   0
-Align      1
-Tilt       0.000000  0.000000
-Crop       0  0
-Gpu        0

And something more troublesome to me is that there was no _DW file.

Is there anything I am missing to set in the GUI?

Thanks,

Hideki


bforsbe commented 8 years ago

Original comment by Hideki Shigematsu (Bitbucket: hshigema, GitHub: hshigema):


Thanks, I will give it a try later.

bforsbe commented 8 years ago

Original comment by Hideki Shigematsu (Bitbucket: hshigema, GitHub: hshigema):


Yes, -Trunk should be fine for now. Actually, even for -Bft and -InitDose we can put them into the additional arguments field.

For the --dose_weighting, I am sorry that must be our mistake. We are trying to do bug tracking by changing source code. But even before having this --dose_weighting at the end of options and having three options -kV, -FmDose, and -PixSize, there was no dose weighted sum, _DW.mrc written at the end of the process.

bforsbe commented 8 years ago

Original comment by Sjors Scheres (Bitbucket: scheres, GitHub: scheres):


Found the reason for the --dose_weighting, and also repaired the bug that was causing the program to ignore the last_frame option. All solved now, to be incorporated into beta repo soon.

bforsbe commented 8 years ago

Original comment by Sjors Scheres (Bitbucket: scheres, GitHub: scheres):


BTW: one could just add -Trunk to the additional arguments field. That should work. BTW2: is that --dose_weighting really present in the .com file for the MotionCor2 program? I have no clue where that is coming from...

bforsbe commented 8 years ago

Original comment by Sjors Scheres (Bitbucket: scheres, GitHub: scheres):


This indeed was a bug. I fixed -Bft and -InitDose for now. -Trunk is more tricky. Leave that for later. Changes still have to be incorporated into the beta repository...