NAME

CracTools::Annotator - Generic annotation base on CracTools::GFF::Query

VERSION

version 1.031

METHODS

new

Arg [1] : String - $gff_file
          GFF file to perform annotation

Example     : my $annotation = CracTools::GFF::Annotation->new($gff_line);
Description : Create a new CracTools::GFF::Annotation object
              If a gff line is passed in argument, the line will be parsed
              and loaded.
ReturnType  : CracTools::GFF::Query
Exceptions  : none

foundGene

Arg [1] : String - chr
Arg [2] : String - pos_start
Arg [3] : String - pos_end
Arg [4] : String - strand

Description : Return true if there is an exon of a gene is this interval
ReturnType  : Boolean
Exceptions  : none

foundSameGene

Arg [1] : String - chr
Arg [2] : String - pos_start1
Arg [3] : String - pos_end1
Arg [4] : String - pos_start2
Arg [5] : String - pos_end1
Arg [6] : String - strand

Description : Return true if a gene is the same gene is found is the two intervals.
ReturnType  : Boolean
Exceptions  : none

getBestAnnotationCandidate

Arg [1] : String - chr
Arg [2] : String - pos_start
Arg [3] : String - pos_end
Arg [4] : String - strand
Arg [5] : (Optional) Subroutine - see C<getCandidatePriorityDefault> for more details

Description : Return best annotation candidate according to the priorities given
              by the subroutine in argument.
ReturnType  : Hash( feature_name => CracTools::GFF::Annotation, ...), Int(priority), String(type)

getAnnotationCandidates

Arg [1] : String - chr
Arg [2] : String - pos_start
Arg [3] : String - pos_end
Arg [4] : String - strand

Description : Return an array with all annotation candidates overlapping the
              chromosomic region.
ReturnType  : Array of Hash( feature_name => CracTools::GFF::Annotation, ...)

getCandidatePriorityDefault

Arg [1] : String - pos_start
Arg [2] : String - pos_end
Arg [3] : hash - candidate

Description : Default method used to give a priority to a candidate.
              You can create your own priority method to fit your specific need
              for selecting the best annotation.
              The best priority is 0. A priority of -1 means that this candidate
              should be avoided.
ReturnType  : Array ($priority,$type) where $priority is an integer and $type a string

PRIVATE METHODS

_init

Description : init method, load GFF annotation into a
              CracTools::GFF::Query object.

_constructCandidate

Arg [1] : String - annot_id
Arg [2] : Hash ref - candidate
          Since this method is recursive, this is the object that
          we are constructing
Arg [3] : Hash ref - annot_hash
          annot_hash is a hash reference where keys are annotion IDs
          and values are CracTools::GFF::Annotation objects.

Description : _constructCandidate is a recursive method that build a
              candidate hash.
ReturnType  : Candidate Hash ref where keys are GFF features and
              values are CracTools::GFF::Annotation objects :
              { feature => CracTools::GFF::Annotation, ...}

AUTHORS

  • Nicolas PHILIPPE <nicolas.philippe@inserm.fr>

  • Jérôme AUDOUX <jaudoux@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by IRB/INSERM (Institut de Recherche en Biothérapie / Institut National de la Santé et de la Recherche Médicale).

This is free software, licensed under:

CeCILL FREE SOFTWARE LICENSE AGREEMENT, Version 2.1 dated 2013-06-21