<<

NAME

Chum::Stackbuilder - Builds a stack of orthologous sequences around a source of variation

SYNOPSIS

DESCRIPTION

Builds a stack of orthologous sequences around a source of variation

CONTACT

Stephen Montgomery (smontgom@bcsgc.bc.ca)

METHODS

new

 Function: Instantiates a Stackbuilder
 Usage   : my $stackbuilder = new Stackbuilder(); or
           my $stackbuilder = new Stackbuilder( '_memconserve' => 1, ##Conserve memory by reducing embedded object sizes (optional)
                                                '_registry' => "Bio::EnsEMBL::Registry", ##The EnsEMBL Registry for fetching orthologues (optional)
                                                '_upstream' => 100, ##The upstream sequence to fetch around a variant (optional)
                                                '_downstream' => 100, ##The downstream sequence to fetch around a variant (optional)
                                                '_species' => $species_arrayref,   ##The species to get orthologues for (optional)
                                                '_binomials' => $binomials_hashref); ##Hashref of species binomial names (optional)
 Returns : Chum::Stackbuilder

generate_stack_from_variation_name_source

 Function: Gets a Chum::Stack object for a variation name and source database (recognized by EnsEMBL)
 Usage   : $stackbuilder->generate_stack_from_variation_name_source('rs999', 'dbSNP');
 Throws  : Exception if the variation object cannot be uniquely mapped to the genome
 Returns : Chum::Stack
 Args    : [1] String (variation_name, i.e. rs999)
           [2] String (variation_source, i.e. dbSNP)

generate_stack_from_variation_name_source

 Function: Gets a Chum::Stack object for a variation_feature object
 Usage   : $stackbuilder->generate_stack_from_variation_feature_object($variation_feature);
 Returns : Chum::Stack
 Args    : [1] Bio::EnsEMBL::Variation::VariationFeature

generate_stacks_from_variation_file

 Function: From a specially formatted GFF file, assemble Chum::Stack objects
 Usage   : $stackbuilder->generate_stacks_from_variation_file('variation.gff');
           The variation GFF file must be in the format
                VARIANT-1       CHROMOSOME      VARIANTID       100000  100001  .       +       .       T
                REFERENCE-1     CHROMOSOME      VARIANTID       100000  100001  .       +       .       C
                VARIANT-2       CHROMOSOME      VARIANTID       200000  200001  .       +       .       -
                VARIANT-2       CHROMOSOME      VARIANTID       200000  200001  .       +       .       A
                REFERENCE-2     CHROMOSOME      VARIANTID       200000  200001  .       +       .       G
                etc...
                
 Returns : arrayref of Chum::Stack objects
 Args    : String (filename) of variation GFF file.

_generate_stack_for_variation_feature

 Title   : _generate_stack_for_variation_feature
 Usage   : my $stack = $stackbuilder->_generate_stack_for_variation_feature($variation_feature, $binomial_hashref, $method);
 Function: For an EnsEMBL VariationFeature, generate a Chum::Stack object
 Returns : a Chum::Stack object
 Args    : [1] Bio::EnsEMBL::Variation::VariationFeature
           [2] hashref (species binomial)
           [3] method (String, optional - what method to use in compara for obtaining orthologous sequences)

_generate_stack_for_seqfeature

 Title   : _generate_stack_for_seqfeature
 Usage   : my $stack = $stackbuilder->_generate_stack_for_seqfeature($reference_feature, $variation_features_arrayref, $binomial_hashref, $method);
 Function: For Bio::SeqFeature::Generic (reference object and variants arrayref), generate a Chum::Stack object
 Returns : a Chum::Stack object
 Args    : [1] Bio::SeqFeature::Generic (reference allele feature)
           [2] arrayref (Bio::SeqFeature::Generic variant allele features)
           [3] hashref (binomial species names)
           [3] method (String, optional - what method to use in compara for obtaining orthologous sequences)

_get_slice_for_variation_feature

 Title   : _get_slice_for_variation_feature
 Usage   : my $slice = $stackbuilder->_get_slice_for_variation_feature($variation_feature);
 Function: For an EnsEMBL VariationFeature, get a surrounding genomic slice
 Returns : a Bio::EnsEMBL::Slice feature
 Args    : [1] Bio::EnsEMBL::Variation::VariationFeature

_get_slice_for_seqfeature

 Title   : _get_slice_for_seqfeature
 Usage   : my $slice = $stackbuilder->_get_slice_for_seqfeature($sequence_feature);
 Function: For an Bio::SeqFeature::Generic, get a surrounding genomic slice
 Returns : a Bio::EnsEMBL::Slice feature
 Args    : [1] Bio::SeqFeature::Generic object

_get_orthologous_sequences_for_slice

 Title   : _get_orthologous_sequences_for_slice
 Usage   : my @sequences = @{$stackbuilder->_get_orthologous_sequences_for_slice($slice, $binomialhashref, 'BLASTZ_NET')};
 Function: For an EnsEMBL Slice, get all the orthologous sequences defined in the compara database for a particular method.
 Returns : an arrayref of Bio::LocatableSeq objects
 Args    : [1] Bio::EnsEMBL::Slice
           [2] hashref (species binomials)
           [3] String (method, optional)

_get_species_binomials

 Title   : _get_species_binomials
 Usage   : my $binomial_hashref = $stackbuilder->_get_species_binomials();
 Function: Obtain all the binomial species names from EnsEMBL Compara database
 Returns : an hashref of Strings (species binomial names)
 Args    : none

<<