<<

NAME

Chum::Background - Background Sequence Object

SYNOPSIS

 my @genes = ['gene1', 'gene2', 'gene3']; #A list of gene names, for reproducibility
 my @stacks = [$genestack1, $genestack2, $genestack3]; #Stack objects for each gene (typically contains orthologous sequences)
 my $backgroundseq = "ATATATATATATATATATATAT"; #A generated background sequence from the the Stack objects (generated from the BackgroundBuilder module).
 my $background = new Background('genes' => \@genes,
                                 'stacks' => \@stacks,
                                 'backgroundseq' => $backgroundseq);

DESCRIPTION

A background sequence generated from stacks associated to genes. For more information, read the definition of the BackgroundBuilder object.

CONTACT

Stephen Montgomery (smontgom@bcsgc.bc.ca)

METHODS

new

 Usage   : my $background = new Background(     'genes' => \@genes,
                                                'stacks' => \@stacks,
                                                'backgroundseq' => $backgroundseq);
                
 Returns : Chum::Background
 Args    : an arrayref to a gene list, an arrayref to a Chum::Stack object list, and a background sequence as a string 

genes

 Title   : genes
 Usage   : my @genes = @{$background->genes()};
 Function: The names of the genes, scanned to make this background (for reproducibility)
 Returns : an arrayref of gene ids
 Args    : none

stacks

 Title   : stacks
 Usage   : my @stacks = @{$background->stacks()};
 Function: The gene stacks, scanned to make this background (for reproducibility)
 Returns : an arrayref of Chum::Stack objects
 Args    : none

backgroundseq

 Title   : backgroundseq
 Usage   : my $backgroundseq = $background->backgroundseq();
 Function: The generated background sequence
 Returns : a nucleotide string
 Args    : none

save_background_to_file

 Title   : save_background_to_file
 Usage   : $background->save_background_to_file($filename);
 Function: Saves the background object to a file (serialization)
 Returns : 
 Args    : none

load_background_from_file

 Title   : load_background_from_file
 Usage   : my $background = $background->load_background_from_file($filename);
 Function: Loads the background object from a file (serialization)
 Returns : 
 Args    : none
 Throws  : Exception if file cannot be opened or if file contents do not match serialization format

<<