I2PC / scipion

Scipion is an image processing framework to obtain 3D models of macromolecular complexes using Electron Microscopy (3DEM)
http://scipion.i2pc.es
Other
77 stars 47 forks source link

xmipp_image_assignment_tilt_pair input particle coordinate files #456

Closed mcianfrocco closed 8 years ago

mcianfrocco commented 8 years ago

Hello,

I am trying to run _xmipp_image_assignment_tiltpair outside of Scipion, and I cannot find information regarding the formatting for the particle coordinate files. Could you provide the expected column positions and the particle coordinate convention (center of box , top left , etc.)?

Thank you! Mike

mcianfrocco commented 8 years ago

Update to this question: I tried assuming that the coordinate files were 'SPIDER' coordinate convention with the following input text file:

1 4 1 312.000000 2750.000000 1 2 4 2 3198.000000 2872.000000 1 3 4 3 3015.000000 3725.000000 1 4 4 4 403.000000 1698.000000 1 5 4 5 715.000000 3504.000000 1 6 4 6 3436.000000 3147.000000 1 7 4 7 1409.000000 1760.000000 1 ......

However, when I try to run this command:

xmipp_image_assignment_tilt_pair --untiltcoor 16may23a_e6b_00028gr_00011sq_v02_00005hl_00_00010en_00_picks.spi --tiltcoor 16may23a_e6b_00028gr_00011sq_v02_00005hl_01_00010en_01_picks.spi --tiltmicsize 16may23a_e6b_00028gr_00011sq_v02_00005hl_01_00010en_01.spi --odir test --tiltangle 0

I get this error:

Starting...
XMIPP_ERROR 22:  It is not a file
Invalid Spider file:  16may23a_e6b_00028gr_00011sq_v02_00005hl_00_00010en_00_picks.spi
File: software/em/xmipp/libraries/data/rwSPIDER.cpp line: 158

I'm not sure where the problem could be coming from - could you offer any advice?

delarosatrevin commented 8 years ago

Dear Michael, I would recommend that you use at least once the particles pairs assignment from the Scipion protocol. The added value of the protocols (apart from the GUI and other stuff) is that they could combine several programs and pre/post processing to produce some results. (Scipion protocols could also be launched from command line through some Python scripting) You may find want to take a look at the protocol code here: https://github.com/I2PC/scipion/blob/c2abbbeaee06c54c15886a0dcf80f5d14a6a7a07/pyworkflow/em/packages/xmipp3/protocol_assignment_tilt_pair.py This could give you some hints about how to execute this program and related ones. I you execute the protocol inside Scipion, you also have the log file containing the command executed and outputs. This could also be very useful to help extracting the behavior out of Scipion.

Regarding coordinates files, this program use the Xmipp convention. We store the coordinates (from Xmipp3 and later) in .pos files, which are star files (positions refer to box center). They may look like:

XMIPP_STAR_1 *

dataheader loop _pickingMicrographState _autopickPercent Manual 90

dataparticles loop _xcoor _ycoor _itemId 591 727 1 746 719 2 900 718 3 959 572 4 705 518 5 509 921 6 692 980 7 819 888 8 1017 1022 9 1196 1036 10

You could download some test data: scipion testdata --download xmipp_tutorial and you will have some .pos files there. The error you are having is because we try to read unknown formats (to cover spider variety of extension) as Spider image file by default.

Hope this helps. Bests, Jose Miguel.

delarosatrevin commented 8 years ago

Ups, we had some markdown syntax. The example .pos file is:

# XMIPP_STAR_1 * 
# 
data_header
loop_
 _pickingMicrographState
 _autopickPercent
Manual         90 

data_particles
loop_
 _xcoor
 _ycoor
 _itemId
       591        727          1 
       746        719          2 
       900        718          3 
       959        572          4 
       705        518          5 
       509        921          6 
       692        980          7 
       819        888          8 
      1017       1022          9 
      1196       1036         10
delarosatrevin commented 8 years ago

I forgot to mention that the automatic tilt pairs assignment is covered in the RCT section of the following tutorial: https://github.com/biocompwebs/scipion/wiki/tutorials/scipion_tutorial_initialvolume.pdf

Moreover, from the Xmipp picking GUI you could import coordinates files from Eman and Relion coordinates.

mcianfrocco commented 8 years ago

Dear Jose Miguel,

Thank you for your response - these are great resources that I will use to investigate further.

Thank you! Michael