NAME

TRL::Microarray::Microarray_File::GAL_File - A Perl module for managing microarray GAL file objects

SYNOPSIS

use TRL::Microarray::Microarray_File::GAL_File;

my $gal_file 	= gal_file->new("/gal_file.gal");	# if no filehandle, assumes name is full path to file
# or
my $gal_file 	= gal_file->new("gal_file.gal",$filehandle);	# pass name and FileHandle to original file

my $spot_name 	= $gal_file->get_spot_name($block,$col,$row);
my $spot_id 	= $gal_file->get_spot_id($block,$col,$row);

# print the GAL back to file
my $string = $gal_file->file_string;

DESCRIPTION

TRL::Microarray::Microarray_File::GAL_File is an object-oriented Perl module for managing microarray GAL files. It doesn't create GAL files for you, but instead is used to check the contents of a GAL file, and display the microarray layout described by it.

Block padding

For whatever reason, many microarrays are printed with gaps (padding) between pin-blocks. This padding is generated by creating empty rows/columns in the printing software, and (at least on our system) these empty rows/columns are carried through to the GAL file. When the GAL_File module parses a GAL file, it skips any spot that has a blank 'Name' field, hence automatically removing any padding rows/columns.

It is also important to note that the method file_string() is not a simple regurgitation of a GAL file opened by the object - padding spots won't be output by this method either. This provides a very quick and easy way to remove padding from a GAL file;

#!/usr/bin/perl -w
use strict;
use TRL::Microarray::Microarray_File::GAL_File;
my $oGal_File = gal_file->new('gal_file.gal');
open GALFILE, ">gal_file_unpadded.gal";
print GALFILE $oGal_File->file_string;
close GALFILE;

If whole rows/columns of padding are found and removed, and the original GAL file has block coordinate information in the header, the GAL_File module will throw an error during output, warning that the number of rows/columns it has found differs from what is recorded in the header. Don't worry, this is acceptable behaviour.

METHODS

get_spot_name, get_spot_id

Returns the Name/ID of a spot feature. Spot coordinates defined by passing (in order) a block, column and row value.

set_spot_name, set_spot_id

Set the Name/ID of a spot feature.

file_format, file_version

The first two values at the top of your GAL file (typically 'ATF 1')

header_rows, data_cols

The next two values at the top of your GAL file - the number of rows in the header, and the number of columns of data

block_count,spot_count

Returns the number of blocks/spots on the array

block_x_origin, block_y_origin

The x,y coordinates of the start of a specified block passed to the method

block_feature_diameter

The diameter in microns of features (spots) in a specified block

feature_diameter

As above, but across the whole array. Returns spot diameter (in microns) if the same in all blocks, otherwise returns -1

block_x_features, block_y_features

The number of features (spots) in each column (x) or row (y) of a specified block, as described in the header block info (if present)

counted_rows, counted_cols

As above, but the actual counted values of a specified block, rather than those described in the header block info

row_count, column_count

As above, but across the whole array. Returns the number if all blocks are the same, otherwise returns -1

block_x_spacing, block_y_spacing

The spacing in microns between features (spots) in a specified block passed to the method

x_spacing, y_spacing

As above, but across the whole array. Returns the value (in microns) if all blocks are the same, otherwise returns -1

file_string

Output the object's GAL file data as a text string.

SEE ALSO

TRL::Microarray, TRL::Microarray::Microarray_File

AUTHOR

Christopher Jones, Translational Research Laboratories, Institute for Women's Health, University College London.

c.jones@ucl.ac.uk

COPYRIGHT AND LICENSE

Copyright 2007 by Christopher Jones, University College London

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.