<<

NAME

Sanger::CGP::Vagrent::Data::AnnotationGroup - Object holding data about the effect of a single variation on a transcript.

DESCRIPTION

This holds information about a variation within a transcript along with a collection of Sanger::CGP::Vagrent::Data::Annotation objects detailing the descriptions of that variation in different sequence contexts.

METHODS

Constructor

new

Usage :
 my $annoGrp = Sanger::CGP::Vagrent::Data::AnnotationGroup->new(%params);
Function :

Builds a new Sanger::CGP::Vagrent::Data::AnnotationGroup object

Returns :

Sanger::CGP::Vagrent::Data::AnnotationGroup object initialized with parameter values

Params :
 accession => Accession for the transcript
 type      => Gene type (defined by type constants in L<Sanger::CGP::Vagrent::Data::Transcript|Sanger::CGP::Vagrent::Data::Transcript>)
 label     => text label for the transcript, typically the gene name
 ccds      => CCDS reference number if the transcript has one

Attributes

addAnnotation

Usage :
 $annoGrp->addAnnotation($anno);
Function :

Validates and adds a Sanger::CGP::Vagrent::Data::Annotation object to the group. Only one annotation of each context can be added to a group

Params :

A Sanger::CGP::Vagrent::Data::Annotation object

Returns :

None

getAllAnnotations

Usage :
 my $annoListRef = $annoGrp->getAllAnnotations;
Function :

Retrieves all annotations in the group

Returns :

Array ref of Sanger::CGP::Vagrent::Data::Annotation objects, or undef

getAnnotationByContext

Usage :
 my $cdsAnno = $annoGrp->getAnnotationByContext(Sanger::CGP::Vagrent::Data::Annotation::getCDSAnnotationContext);
Function :

Retrieves annotation for the specified context

Params :

String - A context constant from Sanger::CGP::Vagrent::Data::Annotation

Returns :

A Sanger::CGP::Vagrent::Data::Annotation object, or undef

getLabel

Usage :
 my $label = $grp->getLabel;
Function :

The label for the transcript (Gene name or similar)

Returns :

String or undef

getCCDS

Usage :
 my $ccds = $grp->getCCDS;
Function :

The CCDS reference number for the transcript

Returns :

String or undef

getAccession

Usage :
 my $acc = $grp->getAccession;
Function :

The accession number for the transcript

Returns :

String or undef

getType

Usage :
 my $type = $grp->getType;
Function :

Gene type (defined by type constants in Sanger::CGP::Vagrent::Data::Transcript)

Returns :

String - A type constant from Sanger::CGP::Vagrent::Data::Transcript

addClassification

Usage :
 $grp->addClassification($class1,$class2);
Function

Appends one or more classification terms to the annotation group

Params

An array of classification terms (Strings)

Returns

None

getClassifications

Usage :
 my @classes = $grp->getClassifications;
Function

Returns the stored classification terms

Returns

Array of Strings, or undef if none

addBookmark

Usage :
 $g->addBookmark($bookmarker);
Function

Adds a bookmark to the annotation group of a type defined by the supplied bookmarker

Params

A Sanger::CGP::Vagrent::Bookmarkers::AbstractBookmarker implementing object

Returns

None

Functions

hasClassification

Usage :
 if($grp->hasClassification($checkClass)){
  .....
 }
Function

Checks an annotation to see if it already contains the specified class

Returns

Boolean, 1 or 0

hasBookmark

Usage :
 $g->hasBookmark;
 $g->hasBookmark($bookmarker);
Function

Returns true if the Annotation group has a bookmark, if a Bookmarker object is supplied it only returns true if that specific bookmark type is present

Params

(Optional) A Sanger::CGP::Vagrent::Bookmarkers::AbstractBookmarker implementing object

Returns

Boolean, 1 or 0

<<