Multinucleated cells and export to database (nulcei are not

Dear Cellprofiler Forum,

I have a pipeline/cpproj file that will read multinucleated cells and collected information about counts etc… However, I am unable to elucidate a suitable means to produce SQL outputs with similar output format to previous CP2 results. I use a pythons script to generate large formatted text files for objects and images and then use Matlab for analysis. I do not understand how to overcome the problem ‘Nuclei is not a 1:1 relationship with other objects that may cause downstream problems.’ Another object container?
cp2macrofag2.cppipe (19.7 KB)

Hi,

Perhaps you can clarify: What sort of SQL output did you get for your prior CP results?

Re: the 1:1 warning in ExportToDatabase - This is a warning, and not an error; the pipeline will still run anyway. If a user is expecting each row in the per-object table to correspond to a unique nucleus/cellbodyorange/secondaryorange set of objects, this is not necessarily the case since there may be differing numbers of each of them; you may have noticed this yourself. However, if you are performing the down-stream analysis with MATLAB, it may be that you already have a solution to this issue in your code…?
-Mark

Hi,

Perhaps you can clarify: What sort of SQL output did you get for your prior CP results, and how exactly does the 2.1 results differ?

Re: the 1:1 warning in ExportToDatabase - This is a warning, and not an error; the pipeline will still run anyway. If a user is expecting each row in the per-object table to correspond to a unique nucleus/cellbodyorange/secondaryorange set of objects, this is not necessarily the case since there may be differing numbers of each of them; you may have noticed this yourself. However, if you are performing the down-stream analysis with MATLAB, it may be that you already have a solution to this issue in your code…?
-Mark

Hi mark,

I can get the database export to run and it provide files with suitable format and data that work with the python scripts and matlab used for analysising the results - but I have to exclude the Nuclei count - just including the cellbody and secondaryorange information. My problem really relates to providing the correct SQL format to the python code that creates text files for OBJECT and IMAGE information from SQL_1_4356_image.CSV and SQL_1_4356.CSV (reading 4356 images for a test…)…ummm…unless I save all the information as spreadsheets and work out a way to write the SQL inputs from that information… so it is not a problem with CP2… formatting… My initial posting was to see if there was a weird setting in the database module I could tweak…

I think it is best Mark, if for now, I try to work out how to format the data rather than worrying about whether CP2 can generate the data for me in the correct format…the information is there in the spreadsheets…so scripting time… if I am still struggling with the problem Mark, I will get in-touch early next week. Thank you very much for your help…

James

NaF_jjr_18aug2014.cppipe (21.7 KB)

Hi Mark,

I have run a pipeline which identifies primary objects nuclei, then another primary and a secondary object, cells… I can analyse the results from the SQL_Image and SQL_Object files…but I do not not understand the information in the SQL_Relationship.CSV files. The intent of the pipeline is to count how many cells have multiple nuclei, I also want to be sure that a cellbody with only one nuclei does not get counted or that I can differentiate between cells with multiple nuclei and cells with only a single nucleus.

Is there a way to combine the information of SQL_Object with SQL_Relationship CSV files? Eventhough the cellprofile contains a warning, it does run…but I just want to check with you, an expert compared to my humble self, that the pipeline does what it is supposed to do… I have uploaded a pipeline .

Does the SQL_Relationship CSV file only contain information about how many multinucleated cells have been counted?

Thank you for your help, Marc.

Hi Mark,

Having gone through some images and looking at the results, I am a little more concerned that the count of the nuclei from the Dapi channel does not actually correspond with the nuclei I can actually count. The number of cell bodies seems okay, and the OBJECT information does contain a column that is related to multinucleated cells. I will continue to try and work out why the count of nuclei is erroneous.

Thank you for your support and advice.

Hi Mark,

The pipeline to count multiple nuclei associated with cells does appear to work. The warning is correct, ‘may cause downstrown problems’ is certainly true! I have the infomation required but is it proving difficult to read in a coherent fashion.

Kind regards, James

Hi James,

The relationship file would tell you the following:

  • Which secondary object (secondaryorange) goes with which primary object (cellbodyorange, which is a 1:1 relationship anyway with secondaryorange by definition)
  • Which child object (nuclei) goes with which parent object (secondaryorange), and vice-versa.

So parents (secondaryorange) with more than one child (nuclei) are multi-nucleated. This information is both in the relationship table and in the per-object table; which you use using your MATLAB scripts is a matter of preference.

But I imagine you could also do the same in an easier way by inserting a FIlterObjects module to filter the secondaryorange objects based on a Children>Nuclei_Count > 1 (i.e, more than one child). The count of the filtered objects is included in the per-image table.

Regards,
-Mark