47
47
import org .mastodon .mamut .tomancak .compact_lineage .CompactLineageFrame ;
48
48
import org .mastodon .mamut .tomancak .divisiontagset .CellDivisionsTagSetCommand ;
49
49
import org .mastodon .mamut .tomancak .export .ExportCounts ;
50
+ import org .mastodon .mamut .tomancak .export .ExportDivisionCountsPerTimepointCommand ;
50
51
import org .mastodon .mamut .tomancak .export .ExportSpotCountsPerTimepointCommand ;
51
52
import org .mastodon .mamut .tomancak .export .LineageLengthExporter ;
52
53
import org .mastodon .mamut .tomancak .export .MakePhyloXml ;
@@ -97,6 +98,8 @@ public class TomancakPlugins extends AbstractContextual implements MamutPlugin
97
98
98
99
private static final String EXPORT_SPOTS_COUNTS_PER_TIMEPOINT = "[tomancak] export spot counts per timepoint" ;
99
100
101
+ private static final String EXPORT_DIVISION_COUNTS_PER_TIMEPOINT = "[tomancak] export division counts per timepoint" ;
102
+
100
103
private static final String ADD_CENTER_SPOTS = "[tomancak] add center spots" ;
101
104
private static final String MIRROR_SPOTS = "[tomancak] mirror spots" ;
102
105
private static final String CREATE_CONFLICT_TAG_SET = "[tomancak] create conflict tag set" ;
@@ -123,6 +126,8 @@ public class TomancakPlugins extends AbstractContextual implements MamutPlugin
123
126
private static final String [] EXPORTS_SPOTS_COUNTS_PER_LINEAGE_KEYS = { "not mapped" };
124
127
private static final String [] EXPORTS_SPOTS_COUNTS_PER_TIMEPOINT_KEYS = { "not mapped" };
125
128
129
+ private static final String [] EXPORT_DIVISION_COUNTS_PER_TIMEPOINT_KEYS = { "not mapped" };
130
+
126
131
private static final String [] ADD_CENTER_SPOTS_KEYS = { "not mapped" };
127
132
private static final String [] MIRROR_SPOTS_KEYS = { "not mapped" };
128
133
private static final String [] CREATE_CONFLICT_TAG_SET_KEYS = { "not mapped" };
@@ -151,6 +156,7 @@ public class TomancakPlugins extends AbstractContextual implements MamutPlugin
151
156
menuTexts .put ( EXPORTS_LINEAGE_LENGTHS , "Export lineage lengths" );
152
157
menuTexts .put ( EXPORT_SPOTS_COUNTS_PER_LINEAGE , "Export spot counts per lineage" );
153
158
menuTexts .put ( EXPORT_SPOTS_COUNTS_PER_TIMEPOINT , "Export spot counts per timepoint" );
159
+ menuTexts .put ( EXPORT_DIVISION_COUNTS_PER_TIMEPOINT , "Export division counts per timepoint" );
154
160
menuTexts .put ( ADD_CENTER_SPOTS , "Add center spots" );
155
161
menuTexts .put ( MIRROR_SPOTS , "Mirror spots along X-axis" );
156
162
menuTexts .put ( CREATE_CONFLICT_TAG_SET , "Create conflict tag set" );
@@ -193,6 +199,8 @@ public void getCommandDescriptions( final CommandDescriptions descriptions )
193
199
"Exports counts of spots into CSV-like files to be imported in data processors. One file per lineage." );
194
200
descriptions .add ( EXPORT_SPOTS_COUNTS_PER_TIMEPOINT , EXPORTS_SPOTS_COUNTS_PER_TIMEPOINT_KEYS ,
195
201
"Exports counts of spots per timepoint into CSV-like files to be imported in data processors. One file." );
202
+ descriptions .add ( EXPORT_DIVISION_COUNTS_PER_TIMEPOINT , EXPORT_DIVISION_COUNTS_PER_TIMEPOINT_KEYS ,
203
+ "Exports counts of divisions per timepoint into CSV-like files to be imported in data processors. One file." );
196
204
descriptions .add ( ADD_CENTER_SPOTS , ADD_CENTER_SPOTS_KEYS , "On each timepoint with selected spots, add a new spot that is in the center (average position)." );
197
205
descriptions .add ( MIRROR_SPOTS , MIRROR_SPOTS_KEYS , "Mirror spots along x-axis." );
198
206
descriptions .add ( CREATE_CONFLICT_TAG_SET , CREATE_CONFLICT_TAG_SET_KEYS , "Search spots that overlap and create a tag set that highlights these conflicts." );
@@ -239,6 +247,8 @@ public void getCommandDescriptions( final CommandDescriptions descriptions )
239
247
240
248
private final AbstractNamedAction exportSpotsCountsPerTimepointAction ;
241
249
250
+ private final AbstractNamedAction exportDivisionCountsPerTimepointAction ;
251
+
242
252
// private final AbstractNamedAction mergeProjectsAction;
243
253
244
254
private final AbstractNamedAction addCenterSpots ;
@@ -275,6 +285,8 @@ public TomancakPlugins()
275
285
exportLineageLengthsAction = new RunnableAction ( EXPORTS_LINEAGE_LENGTHS , this ::exportLengths );
276
286
exportSpotsCountsPerLineageAction = new RunnableAction ( EXPORT_SPOTS_COUNTS_PER_LINEAGE , this ::exportCountsPerLineage );
277
287
exportSpotsCountsPerTimepointAction = new RunnableAction ( EXPORT_SPOTS_COUNTS_PER_TIMEPOINT , this ::exportCountsPerTimepoint );
288
+ exportDivisionCountsPerTimepointAction =
289
+ new RunnableAction ( EXPORT_DIVISION_COUNTS_PER_TIMEPOINT , this ::exportDivisionCountsPerTimepoint );
278
290
addCenterSpots = new RunnableAction ( ADD_CENTER_SPOTS , this ::addCenterSpots );
279
291
mirrorSpots = new RunnableAction ( MIRROR_SPOTS , this ::mirrorSpots );
280
292
createConflictTagSet = new RunnableAction ( CREATE_CONFLICT_TAG_SET , this ::createConflictTagSet );
@@ -299,7 +311,8 @@ public List< ViewMenuBuilder.MenuItem > getMenuItems()
299
311
menu ( "Export measurements" ,
300
312
menu ( "Spot counts" ,
301
313
item ( EXPORT_SPOTS_COUNTS_PER_LINEAGE ),
302
- item ( EXPORT_SPOTS_COUNTS_PER_TIMEPOINT ) ) ),
314
+ item ( EXPORT_SPOTS_COUNTS_PER_TIMEPOINT ) ),
315
+ item ( EXPORT_DIVISION_COUNTS_PER_TIMEPOINT ) ),
303
316
// item( EXPORTS_LINEAGE_LENGTHS ) ), // NB: deactivated for now, since the function is too prototype-y
304
317
item ( EXPORT_PHYLOXML ) ) ),
305
318
menu ( "Plugins" ,
@@ -356,6 +369,7 @@ public void installGlobalActions( final Actions actions )
356
369
actions .namedAction ( exportLineageLengthsAction , EXPORTS_LINEAGE_LENGTHS_KEYS );
357
370
actions .namedAction ( exportSpotsCountsPerLineageAction , EXPORTS_SPOTS_COUNTS_PER_LINEAGE_KEYS );
358
371
actions .namedAction ( exportSpotsCountsPerTimepointAction , EXPORTS_SPOTS_COUNTS_PER_TIMEPOINT_KEYS );
372
+ actions .namedAction ( exportDivisionCountsPerTimepointAction , EXPORT_DIVISION_COUNTS_PER_TIMEPOINT_KEYS );
359
373
actions .namedAction ( addCenterSpots , ADD_CENTER_SPOTS_KEYS );
360
374
actions .namedAction ( mirrorSpots , MIRROR_SPOTS_KEYS );
361
375
actions .namedAction ( createConflictTagSet , CREATE_CONFLICT_TAG_SET_KEYS );
@@ -449,6 +463,12 @@ private void exportCountsPerTimepoint()
449
463
"context" , projectModel .getContext () );
450
464
}
451
465
466
+ private void exportDivisionCountsPerTimepoint ()
467
+ {
468
+ commandService .run ( ExportDivisionCountsPerTimepointCommand .class , true , "projectModel" , projectModel ,
469
+ "context" , projectModel .getContext () );
470
+ }
471
+
452
472
private void changeBranchLabels ()
453
473
{
454
474
RenameBranchLabels .run ( projectModel );
0 commit comments