The Genotyper format
Genotyper™ 3.x wrote its documents in a format of its own. This page describes what genotyper.j reads from Genotyper 3.6 / 3.7 documents written on Mac OS and Windows. Fields marked unknown are skipped.
Layout
| Part | Holds |
|---|---|
| 8 bytes | 00 00 00 10 00 02 00 08 |
| records | the document, as a tree (below) |
| trailer | about 3 KB not organised as records: table layout, column titles, window settings |
Top-level records, always in this order: TLstCategory (the categories), TLstDyeLane (the lanes), TLstMacro (the macros: recorded analysis steps), TMatrixForView (the results table), TStatistics, TTableSetupInfo, TColumnInfoList (the table's columns), a second TMatrixForView. A few bytes sit between some of them.
Records
| Field | Size | Holds |
|---|---|---|
| tag | 2 | 00 02 |
| class number | 4 | the record's class, numbered per document in order of first use |
| length | 4 | big-endian, counted from this field to the record's end |
| class name | pstring | the class name the first time its number appears, else empty (00) |
| body | rest | the class's fields, then its child records |
- A pstring is a length byte and that many bytes of Mac OS Roman text, never padded.
- A field holding an object written before is
00 01and au32object number: the object's place in write order, counting every record exceptTLabel. - Numbers are big-endian. The class number is little-endian in some documents saved on Windows; byte 10 of the file is then not 0.
- A list record (
TLst…,TListForView,TMatrixForView) starts its body with00 04 00 02 00 00 00 06 00 01, a four-character code (GnCt,GnDL,GnMc,GnSt,GnMx), a flag byte and au32item count.
TDatCategory
Body: 00 01 00 01 00 06, the name (pstring), then, from the byte after the name: a flag byte (+0), the range's start and end as doubles (+1, +9), the dye mask u16 (+17), unknown bytes, the display colour as three u16 (+34), unknown bytes. The dye mask has bit 1 << dye set per dye.
TDatDyeLane
Body: 00 01 00 0x 00 06, the source (a TFileFragSample or TFileGSResults record, or a back-reference to one), the lane fields, the peak table, then child records: a TArrayShort (the trace: a u32 byte count, then big-endian i16 values), a second short TArrayShort, and a TLabelList of TLabel records.
Lane fields, from the end of the source:
| Offset | Size | Holds |
|---|---|---|
| 0 | 4 | unknown |
| 4 | 2 | lane number |
| 6 | 2 | dye, from 1 |
| 8 | 12 | unknown |
| 20 | 1 | flag |
| 21 | 4 | n + 1 |
| 25 | pstring | lane name |
| 1 | flag | |
| 4 | m + 1 | |
| pstring | a second text, often empty | |
| 2 | 01 01 | |
| 4 | peak table size, 30 bytes per row |
A reader must step over the lane fields and the peak table by these sizes: a peak row can look like a record header.
Peak row: apex scan (u32), start scan, end scan, two unknown u16, height (u16), area (u32), an unknown u32, size in bp (32-bit float).
The source: a Mac alias
TFileFragSample (a sample file) and TFileGSResults (a GeneScan™ results file) hold no data, only a reference. Body: 00 02, the target's type and creator codes, 2 bytes, 2 bytes, the alias size (u32, at 14), the alias record (at 18): the Alias Manager's version-2 layout, described in macalias.j. Its file name sits at offset 50, its type at 122, and extras follow at 150, among them the full path (type 2).
Classic Mac file names may begin with a control character (GeneScan sample names can start with a line feed); copies of the files on other systems lack it. Windows ports wrote the alias's fixed fields little-endian, or in a layout of their own: then only the full path is found, by its extra.
TLabel
| Offset | Size | Holds |
|---|---|---|
| 0 | 3 | 00 03 01 |
| 3 | 8 | the peak's size in bp, double |
| 11 | 1 | flag |
| 12 | 4 | scan |
| 16 | 2 | kind: 0 category name, 4 size, 5 height |
| 18 | pstring | the label's text |
| 3 | zero | |
| 4 | the peak's row in the lane's peak table |
Join a label to its peak by the row: in lanes of a GeneScan results file, the label's scan is offset from the peak table's.
The results table
TMatrixForView lists TDatTableRow records: 00 01 00 00 00 02, a header-row flag, then per column a pstring and one byte. The number of columns is the number of TColumnInfo records in the top-level TColumnInfoList (macro steps hold table setups of their own).
Not read
The macros' step parameters, the trailer, the statistics, and the unknown fields above.