NAME

CracTools::GFF::Annotation - Parse GFF lines.

SYNOPSIS

Usage:

use CracTools::GFF::Query;

# Creating the reader
my $gffQuery = CracTools::GFF::Query->new('annotations.gff');

my @annotations = $gffQuery->fetchByLocation('1',298345,'+');

foreach my $gff_line (@annotations) {
  my $annotation = CracTools::GFF::Annotation->new($gff_line);
  print "Gene_id : ",$annotation->attribute('gene_id'),"\n";
}

DESCRIPTION

CracTools::GFF::Annotataion is an object to parse and access GFF line's fields.

METHODS

new

Arg [1] : String - $line
          GFF line
Arg [2] : String - $format (optional) - default 'gff2'
          GFF format (gff2 or gff3)

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

GETTERS AND SETTERS

chr

Description : Getter/setter for attribute chr

source

Description : Getter/setter for attribute source

feature

Description : Getter/setter for attribute feature

start

Description : Getter/setter for attribute start

end

Description : Getter/setter for attribute end

score

Description : Getter/setter for attribute score

strand

Description : Getter/setter for attribute strand ('+','-' convention)

gffStrand

Description : Return strand using "1","-1" convention.

phase

Description : Getter/setter for attribute phase

parents

Description : Getter for attribute parents.
ReturnType  : Array of strings with parents ID

attribute

Description : Getter/setter for attribute attribute

STATIC METHODS

convertStrand

Arg [1] : Character - strand using '+' and '-' signs

Description : Retrun the strand using the (1,-1) convention
              instead of the ('+','-') convention of GFF files.