Sanger::CGP::Vagrent::Annotators::AnnotatorCollection - Convienience class for running annotation over a variety of input data types
This is a aggregator class, it holds several annotators and runs them one at a time over any submitted variation. It does none of the annotation work itself, it simply combines the answers of the other annotators it knows about. It extends Sanger::CGP::Vagrent::Annotators::AbstractAnnotator to keep the same interface.
It uses the same constructor as the AbstractAnnotator, however it doesn't need to be given a TranscriptSource as it won't be doing any actual annotating. However it should be used for Bookmarking. By adding Bookmarkers to the AnnotatorCollection, results from each contained Annotator will be collated together and then bookmarked as a single list. Bookmarking separately in each child Annotator will result in duplicate answers for the same bookmark type.
my $source = Sanger::CGP::Vagrent::Annotators::AnnotatorCollection->new(%params);
Builds a new Sanger::CGP::Vagrent::Annotators::AnnotatorCollection
Sanger::CGP::Vagrent::Annotators::AnnotatorCollection object, optionally initialised with Bookmarkers
Hash of parameter values
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
$AnnotatorCollection->addAnnotator($substitutionAnnotator); $AnnotatorCollection->addAnnotator($insertionAnnotator); $AnnotatorCollection->addAnnotator($deletionAnnotator);
Adds a new child Annotator to the collection. Every variant given to the collection will be sent to every child Annotator in turn.
Nothing
A Sanger::CGP::Vagrent::Annotators::AbstractAnnotator inheriting object
my @mess = $annotator->getMessages();
Retrieves the messages from all child Annotators and returns them as a single message list
Array of Strings