The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

version 1.08

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 'gff3'
            GFF format (gtf 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 ('1','-1' convention)

gffStrand

  Description : Return strand using "+","-" 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.

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