Gel Scorer Documentation
rns 13/06/2002


Description

Used for entering scores for pcr results. Scanning a pcr plate produces a layout on screen matching the gel format. A score can be given to the gel as a whole to show whether the pcr was successful, induvidual lanes may then be assigned a score. There is the capability to score multiple products per gel lane. The interface is currently set up to work for pool screening and vectorette pcr.

Design Overview
The specific application of gel_scorer is defined by the variable $stage - currently a command line argument. The user scans in a PCR plate, this is verified in check_entry(). draw_gels() gets the plate contents and builds the gel scoring layout. The score for the entire gel is picked from a dropdown - this calls gel_score() to enable/disable individual lane scoring widgets. Scores are added to the datbase in update_db().

PCR Plate Selection
A box to scan a plate barcode is created using the ExoSeq bc_entry_only() subroutine. check_entry() verifies the barcode and calls draw_gels(). For pool screening STSs on the plate are scored separately, if more than one on the plate is waiting to be scored a dropdown lists them. The user selects one before draw_gels() is called.

Gel Score Layout
A dropdown to apply the overall gel score is created with data from the gel_score_dict table. The contents of the PCR plate are pulled from the db along with names of dna superpools for each well. A transform is applied to convert the plate format into the gel layout, the mapping is stored in %transform. get_transform() currently just contains a hardcoded hash mapping plate positions to gel lane numbers. An algorithm could be used to replace this.

Data about each gel lane is stored in the form $bits->{gel_num}->{lane} where gel_num is the row and lane is a column number from 1 to 16. For vectorette pcr multiple products can be scored for each lane - these are stored as $bits->{gel_num}->{lane}->{product_num}.

Gel Score
Applying a score to the whole gel calls gel_score() This enables the update button and if the score is 'ok' enables the scoring widgets for each individual lane.

Pool Screen Scoring
STS name and superpool name are displayed in each box. A Tk::BrowseEntry is created for each with options PASS, WEAK and FAIL (FAIL is default). Selection from this is put in $bits->{gel_num}->{lane}->{score}. add_scorebox is called to create this dropdown. the -browsecmd option is set to call a subroutine when the value in the selector is changed, this adjusts the background colour according to the score.

Vectorette PCR Scoring
The oligo and dna superpool names are displayed as above. A Tk::Entry is used to enter the size of the product observed. It is assumed that if a size is entered then a product exists and if left blank it has failed. There is currently no option to score a product as weak. A button in each box calls add_scorebox() to add an additional Entry. There is curerntly a maximum set at three products per lane.

Submitting scores to database
The 'Update' calls update_db(). This checks the overall gel score - if it is a fail reason this will be put in ag_gel. If the score is 'ok' the code loops through all entries in $bits->{gel_num}->{lane} and inserts individual scores in gel_result. For pool screening a count is made of the number of libraries that have passed (%lib_count). If this number exceeds the pass threshold the geneassay_status entry is set to 'PCR', otherwise it reverts to 'New'.

When scoring vectorette pcr the loop must make a separate gel_result entry for all products in a particular lane. At present changes to geneassay_status for pass/fail have not been implemented.