Magic Tags for Grid Support

The Grid display is a generalized mechanism for showing relationships between objects in a two-dimensional format. In the past the display was specialized for data related to physical map construction and was used to represent the hybridization of DNA probes (either individual or pooled) to gridded clones. Now the generic magic tags "Positive" and "Negative" in any class can drive the Grid.

Although the display contains a button called "Probe", it is important that this refers to any object that has a Positive/Negative relationship with objects on the grid and not necessarily to a hybridization probe.



?Grid	Title	?Text
	Layout	Columns	Int
		Lines_at	Int Int
		Space_at	Int Int
		No_stagger
		A1_labelling
	View ?View
	Row Int #Grid_row
	Virtual_row Int UNIQUE ?Grid XREF In_grid REPEAT
	In_grid ?Grid

?Grid_row UNIQUE Clone UNIQUE ?Clone XREF Gridded REPEAT
		 Rearrangement UNIQUE ?Rearrangement XREF Gridded REPEAT
		 Mixed #Mixed_grid_row

?Mixed_grid_row UNIQUE Clone UNIQUE ?Clone XREF Gridded #Mixed_grid_row
		       Rearr UNIQUE ?Rearrangement XREF Gridded #Mixed_grid_row

?Pool	Contains Clone ?Clone XREF In_pool
		 Subpool ?Pool XREF In_pool
	   // etc. Contains is tag2
	In_pool ?Pool XREF Subpool

?View 	Type 	UNIQUE        Grid  Grid_map Int #View_tags
			            Grid_edit_default UNIQUE Text UNIQUE Text
			            Grid_edit_menu Text UNIQUE Text 

?View_tags	Colour #Colour
		Surround_colour #Colour
		Tag Text



Title <Text>

<Text> appears in the upper left hand corner of the grid display. The "Gridded item" and "Clear" buttons are bumped to make room if necessary.


Columns <Int>

Effect uncertain.


Lines_at <Int1> <Int2>

Introduces a small amount of extra space between rows and columns. The space appears between every <Int1> columns and <Int2> rows. For example, here is a grid created with Lines_at 2 3. See also Space_at.


Space_at <Int1> <Int2>

Introduces extra space between rows and columns. The space appears between every <Int1> columns and <Int2> rows. For example, here is a grid created with Space_at 2 3. Compare effect with Lines_at above.


No_stagger

No_stagger eliminates the offset between adjacent rows and results in a more compact arrangement. The effect is illustrated below. Left: a grid with No_stagger. Right: the same grid without this flag, showing the default (staggered) layout.


A1_labelling

Labels rows a-h down the left hand side and columns 1-12 across the top.

Bugged?


View <View>

Associates the grid with one or more <View> objects. Views are not defined interactively for the grid display. The relevant tags in ?View are documented below. See Grid_map, Grid_edit_default, and Grid_edit_menu.

Row <Int> <#Grid_row>

Row registers grid objects, one row at a time, and generates a cell for every object in the row. <Int> is the row number. The #Grid_row structure which follows is used to identify each object and its class. It is magic but its tags are not; therefore, it could be modified to accomodate new kinds of objects.

A one-row grid could be defined as

Grid : x1
Row 1 Clone abc def ghi jkl mno pqr stu vwx
where "Clone" is an available tag in #Grid_row.

Since each row is independent, it is possible to build up heterogenous grids consisting of objects from more than one class, using each time a different tag in #Grid_row:

Row 1 Clone abc def ghi jkl mno pqr stu vwx
Row 2 Rearrangement 123 456 789
It is also possible to mix classes within a row via the #Mixed_grid_row structure. This is referenced from #Grid_row following the "Mixed" tag. #Mixed_grid_row is magic but its tags are not and it can be extended to accomodate new kinds of objects. An example of a mixed row is:

Row 1 Mixed Clone abc Rearr 123 Clone ghi Rearr 456
This assumes:

?Mixed_grid_row UNIQUE Clone UNIQUE ?Clone XREF Gridded #Mixed_grid_row
                       Rearr UNIQUE ?Rearrangement XREF Gridded #Mixed_grid_row
Additional notes:


Virtual_row <Int> UNIQUE <Grid> REPEAT
In_grid <Grid>

Effect uncertain.


Grid_map <Int> <#View_tags>

In ?View, Grid_map is used to assign a "priority" <Int> to any cell "states" defined using <#View_tags> (see Colour, Surround_colour, Tag). The priority determines how the grid display handles a conflict between states. The conflict is resolved in favor of the state with the higher priority (smaller number).

For example, consider a conventional grid of cloned DNAs and a probe. The probe has been scored both positive and negative with respect to a particular clone. If the positive state has a higher priority, the cell representing the clone will display with the color assigned to the positive state.


Grid_edit_default UNIQUE <Text1> UNIQUE <Text2>

Used in ?View to control default edit behavior on a grid. Specifically, this is the state that a cell assumes when a user enters "Edit Mode" and then clicks (left mouse button) on a cell.

<Text1> is the name of a tag in the "probing" object. The tag must be indented under either of the magic tags Positive or Negative. The field following this tag is filled in when an edit is saved. The color taken on by the cell is determined by information in the #View_tags structure (see Colour, Surround_colour, Tag). For example, consider a grid containing ?Clone objects and a locus "probe". If Grid_edit_default is

  Grid_edit_default Positive_clone
this implies

 ?Locus Positive Positive_clone ?Clone
Role of <Text2>?


Grid_edit_menu <Text1> UNIQUE <Text2>

Grid_edit_menu configures the pop-up menu available on the grid display when in "Edit Mode". <Text1> is the name of a tag in the "probing" object. The tag must be indented under either of the magic tags Positive or Negative. The field following this tag is filled in when an edit is saved. Since <Text1> is not UNIQUE, grid_edit_menu makes it possible to present the user with a selectable list of possible cell states. The cell will be filled with the corresponding color, depending on information in the #View_tags structure (see Colour, Surround_colour, Tag). For example, consider a grid containing ?Clone objects and a locus "probe". If Grid_edit_menu is

 Grid_edit_menu	 "Positive_clone"
 Grid_edit_menu	 "Negative_clone"
 Grid_edit_menu	 "Maybe_positive"
 Grid_edit_menu	 "Maybe_negative"
this implies

?Locus Positive Positive_clone ?Clone
                Maybe_positive ?Clone
       Negative Negative_clone ?Clone
                Maybe_negative ?Clone

Role of <Text2>?


Colour <#Colour>
Surround_colour <#Colour>

<#Colour> is one of 32 predefined colours used by the ACEDB system. This is the colour used to fill a cell when the relationship between a "probe" and a gridded object is shown, or the state of the cell is edited using the pop-up menu on the grid (available in "Edit Mode"). It is also used when the Centre-Surround option is selected from the grid display pop-up menu.

See Tag for an extended example.


Tag <Text>

Tag in #View_tags determines the states a cell can assume on the grid display with respect to a "probe". <Text> is the name of a tag in the "probing" object. The tag must be indented under either of the magic tags Positive or Negative. The fields following these tags will be filled in if the user enters "Edit Mode" on the grid display, makes changes, and saves.

Suppose a grid contains clone objects and we wish to "probe" using loci. We distinguish four levels of confidence (Positive_clone, Maybe_positive, Negative_clone, Maybe_negative):

	Positive Positive_clone ?Clone
                 Maybe_positive ?Clone
	Negative Negative_clone ?Clone
                 Maybe_negative ?Clone
The corresponding view object is:

View : "GRID-2"
Type	 Grid Grid_map 2 Colour BLUE 
Type	 Grid Grid_map 2 Surround_colour GREEN
Type	 Grid Grid_map 2 Tag "Positive_clone"
Type	 Grid Grid_map 1 Colour RED
Type	 Grid Grid_map 1 Surround_colour YELLOW
Type	 Grid Grid_map 1 Tag "Negative_clone"
Type	 Grid Grid_map 3 Colour BLACK 
Type	 Grid Grid_map 3 Surround_colour GREEN
Type	 Grid Grid_map 3 Tag "Maybe_positive"
Type	 Grid Grid_map 4 Colour DARKRED
Type	 Grid Grid_map 4 Surround_colour YELLOW
Type	 Grid Grid_map 4 Tag "Maybe_negative"

For some Locus xxx, we change the state of four cells:

On the grid display, the pop-up menu item "Save data with probe" is used to store this information. Locus xxx now looks like this: