pelkmanslab / iBRAIN_BRUTUS

A version of canonical iBRAIN (2015) deployed on BRUTUS cluster
0 stars 0 forks source link

Bug in "RelateObjects" module #26

Open ewiger opened 9 years ago

ewiger commented 9 years ago

Find out what is source of the problem (see below). Test if the problem arise from too ambitions assumptions in the code of the module, i.e. in the undocumented behavior or settings.

CPCluster - 11:11:53:   01: LoadImages 
CPCluster - 11:11:55:     Image set 1062 = 150314_HCT116_DS1_Ab_D09_T0001F018L01A01Z01C01.png
CPCluster - 11:11:55:   02: IlluminationCorrectionPelkmans 
Applying illumination correction on channel number: 1
CPCluster - 11:11:58:   03: IlluminationCorrectionPelkmans 
Applying illumination correction on channel number: 2
CPCluster - 11:12:00:   04: IlluminationCorrectionPelkmans 
Applying illumination correction on channel number: 3
CPCluster - 11:12:03:   05: IlluminationCorrectionPelkmans 
Applying illumination correction on channel number: 4
CPCluster - 11:12:05:   06: Smooth 
CPCluster - 11:12:07:   07: IdentifyPrimIterative 
CPaddmeasurements: Object: 'Image', Measure: 'OrigThreshold', Feature: 'Nuclei_SmoBlue' was added to the handles
PerimeterWatershedSegmentation: object # 3 skipped because it has too many concave regions
PerimeterWatershedSegmentation: object # 4 skipped because it has too many concave regions
PerimeterWatershedSegmentation: object # 2 skipped because it has too many concave regions
CPCluster - 11:14:07:   08: DiscardObjectsBySize 
CPCluster - 11:14:14:   09: ExpandOrShrink 
CPCluster - 11:14:38:   10: Smooth 
CPCluster - 11:14:39:   11: IdentifySecondaryIterative 
CPaddmeasurements: Object: 'Image', Measure: 'OrigThreshold', Feature: 'Cells_SmoFarRed' was added to the handles
CPaddmeasurements: Object: 'Cells', Measure: 'Parent', Feature: 'Nuclei' was added to the handles
CPaddmeasurements: Object: 'Nuclei', Measure: 'Children', Feature: 'Cells' was added to the handles
CPCluster - 11:19:24:   12: IdentifyTertiarySubregion 
CPaddmeasurements: Object: 'Cytoplasm', Measure: 'Parent', Feature: 'Cells' was added to the handles
CPaddmeasurements: Object: 'Cells', Measure: 'Children', Feature: 'Cytoplasm' was added to the handles
CPCluster - 11:19:34:   13: ExpandOrShrink 
CPCluster - 11:20:31:   14: IdentifyTertiarySubregion 
CPaddmeasurements: Object: 'Perinuclear', Measure: 'Parent', Feature: 'PerinuclearNuclei' was added to the handles
CPaddmeasurements: Object: 'PerinuclearNuclei', Measure: 'Children', Feature: 'Perinuclear' was added to the handles
CPCluster - 11:20:39:   15: SubtractBackgroundPelkmans 
CPCluster - 11:20:40:   16: SubtractBackgroundPelkmans 
CPCluster - 11:20:41:   17: SubtractBackgroundPelkmans 
CPCluster - 11:20:42:   18: SubtractBackgroundPelkmans 
CPCluster - 11:20:44:   19: IdentifySpots2D 
SourceExtractorDeblend: Calculating all thresholded images. Total Number 5. SourceExtractorDeblend: Deblending Images, please wait. CPCluster - 11:21:28:   20: IdentifySecondary 
CPaddmeasurements: Object: 'Image', Measure: 'OrigThreshold', Feature: 'Viroplasms_SubsRed' was added to the handles
CPaddmeasurements: Object: 'Viroplasms', Measure: 'Parent', Feature: 'Spots' was added to the handles
CPaddmeasurements: Object: 'Spots', Measure: 'Children', Feature: 'Viroplasms' was added to the handles
CPCluster - 11:21:40:   21: ExpandOrShrink 
CPCluster - 11:21:46:   22: Relate 
CPaddmeasurements: Object: 'Spots', Measure: 'Parent', Feature: 'Cells' was added to the handles
CPaddmeasurements: Object: 'Cells', Measure: 'Children', Feature: 'Spots' was added to the handles
CPCluster - 11:21:52:   23: Relate 
CPaddmeasurements: Object: 'Viroplasms', Measure: 'Parent', Feature: 'Nuclei' was added to the handles
CPaddmeasurements: Object: 'Nuclei', Measure: 'Children', Feature: 'Viroplasms' was added to the handles
Batch Error: Relate Index exceeds matrix dimensions.
Index exceeds matrix dimensions.

Error in Relate (line 102)
                Measurements=handles.Measurements.(SubObjectName).(FieldName(1:end-8)){handles.Current.SetBeingAnalyzed};

Error in CPCluster (line 39)
                handles = feval(ModuleName,handles);

^G>> 

Obtained on project 150314_HCT116_DS1_Ab on iBRAIN_BRUTUS (latest version).

ewiger commented 9 years ago

The problem cannot be reproduced on CPP on matlab2012b. I am now debugging the problem on the cluster.

ewiger commented 9 years ago

Error in Relate (module num 23) is present in all jobs (except single out of memory).

ewiger commented 9 years ago

The deployed version of the Relate.m file is the same as in latest stable release 05c14ab7e396d9365c3fb59e4dfdbf29

ewiger commented 9 years ago

Problem is reproducible on 2014a desktop linux machine. Debugging it further.

ewiger commented 9 years ago

I have created a fix with an additional dimension check. That should prevent critical errors with mismatched dimensions. Currently this is tested and is deployed into user space of 150314_HCT116_DS1_Ab/LIB/MATLAB.

Nonetheless this fix does not explain the source of the problem when a column called MeasurementFeatures = 'SubsGreen_SubsFarRed' appears as unexpected combination of fields.

I leave this ticket open (for now). This problem has to be investigated further for correctness, i.e. if any modules in the pipeline PreCluster_HCT116150314completePIPE.mat behave correctly (don't mess up the handles). Notably the problem occurs only after the upgrade of Matlab version to 2013+.