Skip to content
@skiffyard/genotf

Reading GeneScan documents

GeneScan™ and the ABI PRISM™ 310 Data Collection software kept their documents in ABIF containers, like the sample files, but filled them with structures the ABIF specification does not document and broke some of its rules. genescan opens them with @deckyard/abif's lenient parse and decodes what is inside.

jennifer
import "@skiffyard/genotf/genescan.j" as genescan;

def data as bytes init fs.readBytes("SS-280100 15.22");
io.printf("%s\n", genescan.kindOf($data));   # "sample-sheet"

Sample sheets

A sample sheet is a table: one row per tube or lane, one column per setting. codes names each column with a four-character code (SmIn sample info, SSNM sample name, MobF mobility file, MTXF matrix file, SzSt size standard, Comm comment, µG… run-module settings); rows holds the cells.

jennifer
def sheet as genescan.Sheet init genescan.readSheet($data);
for (def row in $sheet.rows) {
    io.printf("%s\n", strings.join($row, "\t"));
}

Injection lists

An injection list holds the run's sample sheet and the names and comments of its samples:

jennifer
def injections as genescan.InjectionList init genescan.readInjectionList(fs.readBytes("InjL-280100 15.28"));

Projects

A GeneScan project lists its sample files as Mac aliases; readProject returns their names and full paths. Panels, analysis parameters and the size standard are stored too, in structures not decoded here.

jennifer
def project as genescan.Project init genescan.readProject(fs.readBytes("GeneScan® Project-280100"));
for (def f in $project.samples) {
    io.printf("%s\n", $f.fileName);
}

Text is Mac OS Roman; names that start with a control character (GeneScan wrote some led by a line feed) are given without it.