CPconvertsql sanity check error



Hi all,

I’m in the process of trying to make my code compatible with Cell Analysis (please see the Cell Analysis Help forum under my post for continued discussion). I was rooting around CPconvertsql and found the following:

line 379:

%%% Sanity check
if ~ strcmp(per_object_names{feature_idx}, cleanup(CPtruncatefeaturename(CPjoinstrings(ObjectName, FeatureName)))),
error(‘Mismatched feature names #’, int2str(feature_idx), ’ ', per_object_names{feature_idx}, ‘!=’, cleanup(CPtruncatefeaturename(CPjoinstrings(ObjectName, FeatureName)))])

However, because per_object_names and ObjectName (from ObjectNames) are differently constructed (ObjectNames is made first and contains all fieldnames under the measurements in handles, while per_object_names excludes fieldnames under the below condition), this check will seemingly always fail whenever a field satisfies the condition below and is excluded from per_object_names.

%%% Some objects are not exported: experiments, subobjects, neighbors
if any(strcmp(ObjectName, {‘Experiment’, ‘Neighbors’, ‘Nuc’, ‘Cell’})) || isfield(handles.Measurements.(ObjectName), ‘SubObjectFlag’),

(I added in the two other cases of Nuc and Cell)

Anyways, I was wondering if you guys have run in to this problem or if since you’re not creating Experiment or Neighbor measurements, it runs fine…


Woops! I just noticed that you all do another check at line 334 - fair enough. If you have any more thoughts on Cell Analysis - Cell Profiler compatibilities (see Cell Analyst help forum), that would be greatly appreciated.