The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Microarray::Image::CGH_Plot - A Perl module for creating CGH-microarray data plots

SYNOPSIS

        use Microarray::Image::CGH_Plot;
        use Microarray::File::Data;
        use Microarray::File::Clone_Locns;
        
        # first make your data objects
        my $oData_File = data_file->new($data_file);
        my $oClone_File = clone_locn_file->new($clone_file);
        
        # create the plot object
        my $oGenome_Image = genome_cgh_plot->new($oData_File,$oClone_File);
        my $oChrom_Image = cgh_plot->new($oData_File,$oClone_File);
        
        # make the plot image
        # several parameters can be set when calling make_plot() 
        my $genome_png = $oGenome_Image->make_plot;
        my $chrom_png = $oChrom_Image->make_plot(plot_chromosome=>1, scale=>100000);

DESCRIPTION

Microarray::Image::CGH_Plot is an object-oriented Perl module for creating CGH-microarray data plots from a scan data file, using the GD module and image library.

There are two types of CGH plot - a single chromosome plot (cgh_plot) or a whole genome plot (genome_cgh_plot). CGH plots require genomic mapping data for each reporter, and this is loaded into the object using a clone_locn_file object (see below), or alternatively by using information embedded in the data file by setting the embedded_locns flag.

Methods

new()

Pass the Microarray::File::Data and (optional) Microarray::File::Clone_Locns file objects at initialisation.

make_plot()

Pass hash arguments to make_plot() to set various parameters (see below). The only argument required is plot_chromosome, when creating a single chromosome plot using the cgh_plot class

set_data()

The data_file and clone_locn_file objects do not have to be passed at initialisation, but can instead be set using the set_data() method.

Plot parameters

The following parameters can be set in the call to make_plot(), or separately before calling make_plot().

plot_chromosome

Set this parameter to indicate which chromosome to plot. Required for single chromosome plots using the cgh_plot class. Must match the chromosome name provided by the clone positions file (or embedded data).

plot_centromere

Set this parameter to zero to disable plotting of the centromere lines. Default is to plot the centromere locations as dashed blue lines.

scale

Pass an integer value to set the desired X-scale of the plot, in bp/pixel. Default for cgh_plot (individual chromosome plot) is 500,000 bp per pixel; default for genome_cgh_plot (whole genome plot) is 2,500,000 bp/pixel.

shift_zero

Set this parameter to a value by which all Log2 ratios will be adjusted. Useful to better align the plot with the zero line.

plot_gene_locn

Pass details of gene locations to be plotted as a 2D hash, like so;

        $oPlot->plot_gene_locn( 
                'BRCA1' => { chr => '17', start => '38449840', end=> '38530994' },
                'BRCA2' => { chr => '13', start => '31787617', end => '31871806' },
                'CBL' => { chr => '11', start => '118582200', end => '118684066' } 
        );

CGHsmooth and CGHcall output

The default for colouring the CGH plot is a rainbow gradient, where log2 ratios below -0.5 are plotted red, 0 are yellow, and above +0.5 are green, with a gradient inbetween. However, if CGHsmooth or CGHcall output has been provided at initialisation (by passing a relevant data object) then you can plot the CGHsmooth segments, breakpoints, and colour code the spots/segments according to the CGHcall or DNAcopy output, by calling any combination of the following methods;

        $oPlot->segment_levels;
        $oPlot->breakpoints;
        $oPlot->call_colours;
        $oPlot->segment_colours;
        
        # or shortcut the first three calls with just one 'do it all' call
        $oPlot->plot_cgh_call;

The methods call_colours and segment_colours provide subtly different ways of colouring the DNAcopy segments. The output from CGHcall provides a loss, normal or gain call for each segment, and call_colours paints each segment with the appropriate red/yellow/green colours for the resulting call. However, this method isn't perfect because it doesn't distinguish borderline calls from more certain calls. The segment_colours method takes a different approach, and colours a segment according to the segment level (or average log2 ratio for that segment) that is output by DNAcopy. This isn't so good for very complex profiles where there is no clear 'diploid' state in the profile. Which ever method you choose, you can clearly only use one at a time - if you do happen to call both methods, then the one called last will prevail.

Analysis methods

The cgh_plot and genome_cgh_plot classes can use methods from the Microarray::Analysis::CGH module. Pass analysis parameters to the make_plot() method to implement flip(), embedded_locns(), do_smoothing() etc.

SEE ALSO

Microarray, Microarray::Image, Microarray::Analysis, Microarray::Analysis::CGH, Microarray::File, Microarray::File::Data, Microarray::File::Clone_Locns

AUTHOR

James Morris, Gynaecological Cancer Research Laboratories, UCL EGA Institute for Women's Health, University College London.

http://www.instituteforwomenshealth.ucl.ac.uk/AcademicResearch/Cancer/trl

james.morris@ucl.ac.uk

COPYRIGHT AND LICENSE

Copyright 2008 by James Morris, University College London

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