Opened 6 years ago

Closed 6 years ago

#2883 closed defect (fixed)

"seg colors" command traceback if specifying surface model with map keyword

Reported by: Elaine Meng Owned by: Tom Goddard
Priority: normal Milestone:
Component: Volume Data Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Darwin-18.7.0-x86_64-i386-64bit
ChimeraX Version: 0.92 (2020-02-25)
Description
segmentation colors traceback if specifying surface model with map keyword

Yeah, user error, but I was thinking that if a map was shown as a surface, lots of people would think it was OK to specify it with the map keyword and I wanted to see whether that would work.

Log:
> open /Users/meng/Desktop/startup.cxc

> alias reset view orient; view initial

> alias start tool show $*

executed startup.cxc  
UCSF ChimeraX version: 0.92 (2020-02-25)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open /Users/meng/Desktop/segtest.cxs format session

opened ChimeraX session  

> usage segmentation

segmentation colors segmentations [color] [map a density map specifier]
[surface a surface specifier] [byAttribute a text string] [outsideColor a
color] [maxSegmentId an integer] [step map step]  
— Set segmentation to use random colors, or apply segmentation coloring to a
volume  
color: a color

segmentation surfaces segmentations [where where] [each a text string] [region
map region] [step map step] [color a color]  
— Create surfaces for a segmentation regions.  
where: a text string, repeatable  

segmentation surfaces

Missing or invalid "segmentations" argument: invalid density maps specifier  

segmentation surfaces #3

Expected a keyword  

> segmentation surfaces #3 region all color blue

Created 1 segmentation surfaces, 850360 triangles, subsampled 1  

> segmentation surfaces #3 region all

Created 1 segmentation surfaces, 850360 triangles, subsampled 1  

> close #4

> hide #!3 models

> close #5

> segmentation surfaces #3

Created 1 segmentation surfaces, 850360 triangles, subsampled 1  

> segmentation surfaces #3 each segment

Created 7 segmentation surfaces, 850360 triangles, subsampled 1  

> close #4

> hide #!5 models

> show #!5 models

> hide #5.1 models

> hide #5.3 models

> show #5.1 models

> show #5.3 models

> close #5

> segmentation surfaces #3

Created 1 segmentation surfaces, 850360 triangles, subsampled 1  

> volume #3 level 0.5877

> hide #!3 models

> toolshed show "Side View"

> close #4

> segmentation surfaces #3 each segment

Created 7 segmentation surfaces, 850360 triangles, subsampled 1  

> hide #4.7 models

> hide #4.5 models

> hide #4.4 models

> hide #4.1 models

> hide #4.2 models

> hide #4.3 models

> show #4.1 models

> show #4.4 models

> show #4.2 models

> show #4.3 models

> show #4.5 models

> show #4.7 models

> close #4

> segmentation surfaces #3 each segment color blue

Created 7 segmentation surfaces, 850360 triangles, subsampled 1  

> close #4

> segmentation surfaces #3 where 5

Created 1 segmentation surfaces, 2740 triangles, subsampled 1  

> segmentation surfaces #3 where 2 color hot pink

Created 1 segmentation surfaces, 227980 triangles, subsampled 1  

> usage seg surf

segmentation surfaces segmentations [where where] [each a text string] [region
map region] [step map step] [color a color]  
— Create surfaces for a segmentation regions.  
where: a text string, repeatable  

> close #4-5

> segmentation surfaces #3 color blue

Created 1 segmentation surfaces, 850360 triangles, subsampled 1  

> segmentation colors #3 surface #4

Colored surface emdb 0557 thresholded scaled 7 segments (#4) with 7 segments  

> close #4

> open 2gbp

2gbp title:  
Sugar and signal-transducer binding sites of the escherichia coli galactose
chemoreceptor protein [more info...]  
  
Chain information for 2gbp #4  
---  
Chain | Description  
A | D-galactose/D-glucose binding protein  
  
Non-standard residues in 2gbp #4  
---  
BGC — β-D-glucose  
CA — calcium ion  
  
  

> molmap ligand 20

> view

> show #!3 models

> hide #!4 models

> select #5

2 models selected  
Drag select of 3 emdb 0557 thresholded scaled , 5 2gbp map 20  

> select clear

> select #5

2 models selected  

> ui mousemode rightMode "translate selected models"

> view

> hide #!3 models

> segmentation colors #3 map #5

Traceback (most recent call last):  
File
"/Users/meng/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/cmd_line/tool.py", line 258, in execute  
cmd.run(cmd_text)  
File
"/Users/meng/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/commands/cli.py", line 2837, in run  
result = ci.function(session, **kw_args)  
File
"/Users/meng/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/segment/segment.py", line 51, in segmentation_colors  
raise UserError('segmentation colors: Volume size %s' % tuple(map.data.size) +  
TypeError: not all arguments converted during string formatting  
  
TypeError: not all arguments converted during string formatting  
  
File
"/Users/meng/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/segment/segment.py", line 51, in segmentation_colors  
raise UserError('segmentation colors: Volume size %s' % tuple(map.data.size) +  
  
See log for complete Python traceback.  
  

> segmentation colors #3 surface #5

Colored surface surface (#5.1) with 4 segments  




OpenGL version: 4.1 INTEL-12.10.16
OpenGL renderer: Intel Iris Pro OpenGL Engine
OpenGL vendor: Intel Inc.

Change History (2)

comment:1 by Elaine Meng, 6 years ago

Component: UnassignedVolume Data
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submission"seg colors" command traceback if specifying surface model with map keyword

comment:2 by Tom Goddard, 6 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

The segmentation colors command was trying to give an error saying the segmentation and map sizes don't match, for example,

segmentation colors: Volume size 100,100,100 does not match segmentation size 1374,2108,1653

but the error message code had a problem. Fixed now.

Note: See TracTickets for help on using tickets.