CellAnalyst cannot run given database


#1

Hi!

I’m trying to run Cell Analyst but have thus far been unsucessful. I can run the Cell Analyst example file just fine but when I try Cell Analyst with my CellProfiler generated database, it doesn’t work. I’m attaching my setup script, preferences (without username or password), and data files generated by CellPofiler as well as the java output file. It seems like I can connect to the database, but nothing happens when I open the preference file. One problem I can see myself having is with the CPcreatesql and the CPcreateCPAProperties subfunctions. In CellPofiler, I take nuclei and then find cells. Then I clear the border of cells found and also of the nuclei those cells were associated with (this takes care of the case in which the nuclei does not touch the border but the cell does). I then consequently do measurements on the border cleared cells (labeled BCell and BNuc - I had to shorten the names because of the matlab character limitation thing). However, this leaves a nucleus data set and a borderclearednucleus data set. The export function doesn’t seem to match these datasets up - I think it assumes that the first data point of each object type is the first data point of every other object type - this does not seem to take advantage of the parent protperties of each obejct (even though they’re calculated). I guess I was wondering if you all also precieve this problem to be the root cause of Cell Analyst failing as well, and if you guys had any suggestions to solve this. I was thinking of going through and editing the aforementioned CPsubfunctions, but I wasn’t sure if I could get it to behave intelligently enough (maybe just write something in to get it to ignore certain object types so I wouldn’t need to export them?). I guess the other thing I could do would be to merge the identifyprimaryobject and identifysecondaryobject modules in to one large module that would be able to do the border clearing without the need to then write the non-border cleared objects to the handles structure. Anyways, if you’d like to see the actuale handles file, please let me know (as it’s just a tad over the upload limit) and I can email it to you. Well, thanks so much for the work thus far. Any help that can be provided would be very much appreciated.

Cheers,

Peter

P.S. - The more I think about the problem, the more I think it probably originates in my creative use of Cell Profiler, so I was wondering if it would be better for me to also cross-list this problem in the Cell Profiler help section?
SQL.zip (1.08 MB)


#2

So I think I only need to change a couple of lines in CPconvertSQL and CPcreateCPAProperties to make things work (bascially use the

if any(strcmp(ObjectName, {‘Experiment’, ‘Neighbors’})) || isfield(handles.Measurements.(ObjectName), ‘SubObjectFlag’),
continue;
end

(above near line 40 of CPconvertSQL)

line to check and not export the measurements I don’t want. One quick question is what is the SUbObjectFlag and in which objectnames is it envoked?

Cheers,

Peter


#3

All right, perhaps, it might be better if this post was moved in to CellPofiler territory, but I have another question about CPconvertSQL.

The following sanity check:

%%% 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)))])
end

gives an error when the ObjectNames strings are different from the per_object_name strings, but the objectnames thing is made up outside of the:

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

test thing. So this will give an error anytime you have things like Experiment or Neighbors in your ObjectNames table. Is there a reason for this test? Won’t it always fail if you have experiement or neighbors measurements?

-Peter

P.S. - I’m going to cross-post this one to the CellProfiler forums.


#4

Woops! I just noticed that you all do another check at line 334 - fair enough. Well that solves the latest problem.

Cheers,

Peter


#5

Okay, so I was able to get CellAnalyst working (I’m attaching my latest SQL preferences, etc). I took out some of the data set by editing the CPconvertsql function and I think that makes things simpler. My question now is that the route I take to get Analyst working seems cirquitous. If I open CA and run my preference file, nothing works. However, if I reopen CA and then open the exaple.preference file first and then open my preference file things seem to work (I can open images, access my database numbers, etc.). Is there any reason this might be the case? It seems like the example.preference file triggers something that my preference file does not, but I can’t figure out what that would be. If you have any advice on making this more stable (so I could just run my own preference files) that would be very much appreciated.

Cheers,

Peter
SQL.zip (1.05 MB)


#6

All right. I finally figured things out. CA must have a cell size value in the preferences file. It seems like this was getting inherited when I opened the example file first, but wouldn’t work when I opened my file first. Anyways, I believe that problem’s been solved. Also, to summarize, I believe that the difference in cell inheritance would not have mattered to CA (but might have given me wrong results). Anyways, it might be nice to post as the CP exporttodatabase module doesn’t append one or ask for one, and it seemed optional at first.

Cheers,

Peter