Chum::Background - Background Sequence Object
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);
A background sequence generated from stacks associated to genes. For more information, read the definition of the BackgroundBuilder object.
Stephen Montgomery (smontgom@bcsgc.bc.ca)
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
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
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
Title : backgroundseq Usage : my $backgroundseq = $background->backgroundseq(); Function: The generated background sequence Returns : a nucleotide string Args : none
Title : save_background_to_file Usage : $background->save_background_to_file($filename); Function: Saves the background object to a file (serialization) Returns : Args : none
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