<<

NAME

Sanger::CGP::Vagrent::Annotators::AbstractAnnotator - Abstract base class for the annotation generators

DESCRIPTION

This is an abstract template class for the mutation annotators, it provides a lot of shared behind the scenes functionality. All subclasses must implement the _getAnnotation method.

METHODS

Constructor

new

Usage :
 my $source = Sanger::CGP::Vagrent::Annotators::AbstractAnnotatorSubClass->new(%params);
Function :

Builds a new Sanger::CGP::Vagrent::Annotators::AbstractAnnotator inheriting object

Returns :

Sanger::CGP::Vagrent::Annotators::AbstractAnnotator object initialized with parameter values

Params :

Hash of parameter values

 transcriptSource => A Sanger::CGP::Vagrent::TranscriptSource::AbstractTranscriptSource inheriting object
 bookmarker       => (Optional) An array reference of, or single, Sanger::CGP::Vagrent::Bookmarkers::AbstractBookmarker inheriting object
 only_bookmarked  => (Optional) Boolean, only return annotations that get bookmarked

Functions

getAnnotation

Usage :
 my @annoGrps = $annotator->getAnnotation($variation);
Function :

Annotates the supplied Variation object and returns a list of AnnotationGroups objects. If Bookmarkers have been set, the AnnotationGroups will have been marked before being returned. If 'only_bookmarked' was set to true, only AnnotationGroups that match Bookmarkers will be returned.

Returns :

An array of Sanger::CGP::Vagrent::Data::AnnotationGroup objects

Params :

A Sanger::CGP::Vagrent::Data::AbstractVariation implementing object

addMessage

Usage :
 $annotator->addMessage("Interesting event found");
Function :

Adds a text message to the message list. All messages are reset every time getAnnotation is called

Returns :

Nothing

Params :

String

getMessages

Usage :
 my @mess = $annotator->getMessages();
Function :

Retrieves a list of message strings about the most recent annotation attempt

Returns :

Array of String

Abstract

_getAnnotation

Usage :
 my $type = $annotator->_getAnnotation($variation);
Function :

Abstract internal function, must be implemented in subclass. Returns a list of AnnotationGroups

Returns :

An array of Sanger::CGP::Vagrent::Data::AnnotationGroup objects

Params :

A Sanger::CGP::Vagrent::Data::AbstractVariation implementing object

_getDefaultCDSAnnotationType

Usage :
 my $type = $annotator->_getDefaultCDSAnnotationType();
Function :

Abstract internal function, must be implemented in subclass. Returns default CDS annotation (Annotation type constant) type for the Annotator

Returns :

String - Annotation type constant

_getMutatedCdsSequence

Usage :
 my $varSeq = $annotator->_getMutatedCdsSequence();
Function :

Abstract internal function, must be implemented in subclass. Returns the full variant form of the CDS sequence

Returns :

String, DNA sequence

Params :
 String - Full wildtype CDS DNA sequence
 Integer - Minimum position of the variant on the wildtype CDS sequence
 Integer - Maximum position of the variant on the wildtype CDS sequence
 String - Mutant DNA sequence for the variant

_getWildTypeStringForCDSAnno

Usage :
 my $wtseq = $annotator->_getWildTypeStringForCDSAnno($var,$tran,$mrnaAnno);
Function :

Abstract internal function, must be implemented in subclass. Generates the CDS wildtype string from the mRNA annotation

Returns :

String, DNA sequence

Params :
 A Sanger::CGP::Vagrent::Data::AbstractVariation implementing object
 A Sanger::CGP::Vagrent::Data::Transcript object
 A Sanger::CGP::Vagrent::Data::Annotation object

_getMutantStringForCDSAnno

Usage :
 my $varseq = $annotator->_getMutantStringForCDSAnno($var,$tran,$mrnaAnno);
Function :

Abstract internal function, must be implemented in subclass. Generates the CDS variant string from the mRNA annotation

Returns :

String, DNA sequence

Params :
 A Sanger::CGP::Vagrent::Data::AbstractVariation implementing object
 A Sanger::CGP::Vagrent::Data::Transcript object
 A Sanger::CGP::Vagrent::Data::Annotation object

_getCDSDescriptionString

Usage :
 my $desc = $annotator->_getCDSDescriptionString($tran,$cdsMin,$cdsMax,$cdsMinOffset,$cdsMaxOffset,$wt,$mt);
Function :

Abstract internal function, must be implemented in subclass. Takes the plotted CDS variation data and returns the HGVS syntax describing the change

Returns :

String, HGVS description

Params :
 A Sanger::CGP::Vagrent::Data::Transcript object
 Integer - CDS minimum position
 Integer - CDS maximum position
 Integer - Offset from the CDS minimum position (signed)
 Integer - Offset from the CDS maximum position (signed)
 String - Wildtype cDNA sequence of variant
 String - Variant cDNA sequence of variant

_getDefaultProteinAnnotationType

Usage :
 my $type = $annotator->_getDefaultProteinAnnotationType();
Function :

Abstract internal function, must be implemented in subclass. Returns default Protein annotation (Annotation type constant) type for the Annotator

Returns :

String - Annotation type constant

_getCdsMinPosForProteinCalculation

Usage :
 my $max = $annotator->_getCdsMinPosForProteinCalculation($cDNAAnnot);
Function :

Abstract internal function, must be implemented in subclass. Returns the minimum cDNA location of the variant that can be used for protein annotation

Returns :

Integer - cDNA position

Params :

A Annotation representing the cDNA annotation

_getCdsMaxPosForProteinCalculation

Usage :
 my $max = $annotator->_getCdsMaxPosForProteinCalculation($cDNAAnnot);
Function :

Abstract internal function, must be implemented in subclass. Returns the maximum cDNA location of the variant that can be used for protein annotation

Returns :

Integer - cDNA position

Params :

A Annotation representing the cDNA annotation

_isStartGained

Usage :
 if($annotator->_isStartGained($var,$tran,$mRNAmin,$mRNAmax,$wt,$mt)){
   .......
 }
Function :

Abstract internal function, must be implemented in subclass. Returns returns true if there is a start codon created or moved in the 5' UTR

Returns :

Boolean

Params :
 A Sanger::CGP::Vagrent::Data::AbstractVariation implementing object
 A Sanger::CGP::Vagrent::Data::Transcript object
 Integer - Minimum mRNA coordinate of the variant
 Integer - Maximum mRNA coordinate of the variant
 String - Wildtype variant sequence
 String - Mutant variant sequence

<<