segmentation from movies

36 views
Skip to first unread message

cyanpku

unread,
Jul 19, 2016, 7:04:06 AM7/19/16
to emspring

Hi Carsten,

I'm trying to segment the helix particles from the movie stacks after running "segmentrefine3d". 

I provided the movie stacks matching the integrated image name with mrcs postfix; the spring.db and refinement.db from a completed segmentrefine3d and the same spring.db as the segment coordinates. Here's the error from the "segment":

------------------------------------

Traceback (most recent call last):

  File "/scicore/home/basler/wangji/src/spring/bin/segment_mpi", line 152, in <module>

    sys.exit(spring.segment2d.segment_mpi.main())

  File "/scicore/home/basler/wangji/src/spring/lib/python2.7/site-packages/emspring-0.84.1470-py2.7.egg/spring/segment2d/segment_mpi.py", line 110, in main

    stack.segment()

  File "/scicore/home/basler/wangji/src/spring/lib/python2.7/site-packages/emspring-0.84.1470-py2.7.egg/spring/segment2d/segment_mpi.py", line 96, in segment

    self.helices, self.tempdir, assigned_stack_ids, assigned_helix_ids = self.prepare_segmentation_mpi()

  File "/scicore/home/basler/wangji/src/spring/lib/python2.7/site-packages/emspring-0.84.1470-py2.7.egg/spring/segment2d/segment_mpi.py", line 16, in prepare_segmentation_mpi

    assigned_mics = self.validate_input()

  File "/scicore/home/basler/wangji/src/spring/lib/python2.7/site-packages/emspring-0.84.1470-py2.7.egg/spring/segment2d/segment_prep.py", line 814, in validate_input

    new_session = self.copy_micrograph_info_on_ctffind_and_ctftilt(assigned_mics, source_session, new_session)

  File "/scicore/home/basler/wangji/src/spring/lib/python2.7/site-packages/emspring-0.84.1470-py2.7.egg/spring/segment2d/segment.py", line 651, in copy_micrograph_info_on_ctffind_and_ctftilt

    matched_mic_find = source_session.query(CtfFindMicrographTable).get(matched_mic.id)


AttributeError: 'NoneType' object has no attribute 'id'

-------------------------------------

Do you have any clue what could be causing the error?


Thanks a lot!!!!


Jing

Carsten Sachse

unread,
Jul 19, 2016, 11:58:52 AM7/19/16
to emspring
Hi Jing,

Could you attach the input parameters as I want to understand the input better.

Thanks.

Best wishes,


Carsten 

cyanpku

unread,
Jul 19, 2016, 1:48:23 PM7/19/16
to emspring
Hi Carsten,

Thanks for looking into this. Enclosed is the input parameters for the segmentation. And I always get a warning by the end of the segmentrefine3d, something like this:

####################################################################################################
                    End of program segmentrefine3d: Tue, 19 Jul 2016 19:18:07
####################################################################################################
/scicore/home/basler/wangji/src/spring/lib/python2.7/site-packages/matplotlib-1.3.0-py2.7-linux-x86_64.egg/matplotlib/backends/backend_pdf.py:2181: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  different = bool(ours != theirs)
/scicore/home/basler/wangji/src/spring/lib/python2.7/site-packages/SQLAlchemy-1.0.11-py2.7-linux-x86_64.egg/sqlalchemy/sql/sqltypes.py:1270: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  return x == y

Does it mean the spring.db was not saved properly?

Cheers,

Jing
segment.par

Carsten Sachse

unread,
Jul 19, 2016, 3:52:18 PM7/19/16
to emspring
Hi Jing,

Based on your segment.par file, you have specified the input parameters correctly. I was wondering wether the problem may be related to the same naming convention of micrographs and the mrcs movie stack, e.g.
micrograph: mic_name.mrc
movie: mic_name.mrcs

Do you have them located in the same directory? This may cause issues too.

Best wishes,


Carsten

Carsten Sachse

unread,
Jul 19, 2016, 3:55:17 PM7/19/16
to emspring
Hi Jing,

You can ignore this warning message as it is raised by SQLAlchemy when some database matching are being compared. This warning message is being raised only in the latest versions of SQLAlchemy - nothing to be concerned about.

Best wishes,


Carsten
On Tuesday, July 19, 2016 at 7:48:23 PM UTC+2, cyanpku wrote:
Hi Carsten,

cyanpku

unread,
Jul 20, 2016, 5:01:42 AM7/20/16
to emspring
Hi Carsten,
Thanks for your suggestion! 
The sum mrc and the stack mrcs are in different folders, but I used symbolic links for the sum mrc. Maybe that confused the spring? I'll try to recreate the spring.db use the real path to the files and see if it makes a difference.
Cheers,
Jing

cyanpku

unread,
Jul 20, 2016, 5:05:16 AM7/20/16
to emspring
Hi Carsten,
One more thing to double check with you: does spring need the original movie stack or the drift-corrected stack? 
Thanks a lot,
Jing

Carsten Sachse

unread,
Jul 20, 2016, 5:37:40 AM7/20/16
to emspring
Hi Jing,

Please use the drift-corrected stack. Spring will do a segment based drift correction but the closer it is the finally moved position the easier it will be to find it.

Best wishes,


Carsten

cyanpku

unread,
Jul 21, 2016, 3:12:32 AM7/21/16
to emspring
Hi Carsten,
The segmentation from movie stack is working for me now!
 This time I provided the full path to the averaged mrc files instead of using symbolic links, redid everything from micctf to segmentrefine3d. Probably in one of the steps I messed up something in the previous run. 
Look forwards to a HUGE improvement of the resolution!
Cheers,
Jing
Reply all
Reply to author
Forward
0 new messages