NAME

CracTools::SAMReader - An easy to use tool to read files in SAM format.

SYNOPSIS

Usage:

use CracTools::SAMReader;

# Creating the reader
my $sam_reader = CracTools::SAMreader->new($sam,'CRAC');

# Get an iterator to go through the SAM file in a linear way
my $it = $sam_reader->iterator();

# Iterate on lines and explore CRAC special fields of SAM
while(my $line = $it->()) {
  if(defined $line->events('Junction') && $line->isClassified('normal')) {
    my @junctions = @{$line->events('Junction')};
    foreach my $junction (@junctions) {
      print "Foud Junction : [type : $junction->{type}, loc : $junction->{loc}, gap : $junction->{gap}]\n";
    } 
  }
}

DESCRIPTION

Reader for SAM format, including CRAC special fields.

METHODS

new

Arg [1] : String - SAM file
Arg [2] : (Optional) String - SAM type
          - CRAC
          - CRAC_EMT

Example     : $reader = CracTools::SAMreader->new('file.sam','CRAC');
Description : Create a new reader obect
ReturnType  : CracTools::SAMreader
Exceptions  : none

iterator

Example     : my $it = $sam_reader->iterator();
              while(my $line = $it->()) {
                print $line->seq,"\n";
              }
Description : Create an iterator to go throud each lines of the file
ReturnType  : Iterator on CracTools::SAMline
Exceptions  : none

iteratorFile

Arg [1] : (Optional) String - options (INGORE_HEADERS,..)

Example     : my $it_f = $sam_reader->iteratorFile();
              while(my ($line,$line_number) = $it->()) {
                print $line,"\n";
              }
Description : Create an iterator to go throud each lines of the file
ReturnType  : Iterator on Array (String,Int) where the <String> is the
              line, and <Int> the line number.
Exceptions  : none

GETTERS AND SETTERS

Description : Getter/setter for attribute header
ReturnType  : none
Exceptions  : none

PRIVATE METHODS

init (private)

Description : Initialization method
ReturnType  : none
Exceptions  : none

AUTHORS

Jerome AUDOUX <jerome.audoux@etud.univ-montp2.fr>.

COPYRIGHT AND LICENSE

Copyright (C) 2012-2013 -- IRB/INSERM (Institut de Recherche en Biothérapie / Institut National de la Santé et de la Recherche Médicale) LIRMM/UM2 (Laboratoire d'Informatique, de Robotique et de Microélectronique de Montpellier / Université de Montpellier 2)

FRENCH

Ce fichier fait partie du Pipeline de traitement de données NGS de la plateforme ATGC labélisée par le GiS IBiSA.

Ce logiciel est régi par la licence CeCILL soumise au droit français et respectant les principes de diffusion des logiciels libres. Vous pouvez utiliser, modifier et/ou redistribuer ce programme sous les conditions de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA sur le site "http://www.cecill.info".

ENGLISH

This File is part of the NGS data processing Pipeline of the ATGC accredited by the IBiSA GiS.

This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".

1 POD Error

The following errors were encountered while parsing the POD:

Around line 319:

Non-ASCII character seen before =encoding in 'Biothérapie'. Assuming UTF-8