Skip to content
@skiffyard/genotf

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

PartHolds
8 bytes00 00 00 10 00 02 00 08
recordsthe document, as a tree (below)
trailerabout 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

FieldSizeHolds
tag200 02
class number4the record's class, numbered per document in order of first use
length4big-endian, counted from this field to the record's end
class namepstringthe class name the first time its number appears, else empty (00)
bodyrestthe 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 01 and a u32 object number: the object's place in write order, counting every record except TLabel.
  • 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 with 00 04 00 02 00 00 00 06 00 01, a four-character code (GnCt, GnDL, GnMc, GnSt, GnMx), a flag byte and a u32 item 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:

OffsetSizeHolds
04unknown
42lane number
62dye, from 1
812unknown
201flag
214n + 1
25pstringlane name
1flag
4m + 1
pstringa second text, often empty
201 01
4peak 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

OffsetSizeHolds
0300 03 01
38the peak's size in bp, double
111flag
124scan
162kind: 0 category name, 4 size, 5 height
18pstringthe label's text
3zero
4the 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.