SAMstar.pm untested

filter: Statementstmt 0.0% 0 / 4 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 5 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # POD documentation - main docs before the code
2  
3 =head1 NAME
4  
5 GenOOx::Data::File::SAMstar - GenOO framework extension to read SAM files created by the STAR aligner
6  
7 =head1 SYNOPSIS
8  
9 GenOO framework extension to read SAM files created by the STAR aligner.
10 Include it in your script and ask GenOO SAM parser to use it.
11  
12 use GenOOx::Data::File::SAMstar::Record;
13  
14 my $file_parser = GenOO::Data::File::SAM->new(
15 file => 'file.sam',
16 records_class => 'GenOOx::Data::File::SAMstar::Record'
17 );
18  
19 while (my $record = $file_parser->next_record) {
20 # $record is now an instance of GenOOx::Data::File::SAMstar::Record.
21 print $record->cigar."\n"; # name
22 print $record->flag."\n"; # flag
23 print $record->number_of_mappings."\n"; # new stuff not present by default
24 }
25  
26  
27 =head1 DESCRIPTION
28  
29 The GenOO framework SAM parser avoids code that is unique to specific programs and makes no assumptions for the optional fields in a SAM file. This module is a plugin for the GenOO framework and provides the functionality for reading SAM files generated from the STAR aligner. The module has been created on top of the generic GenOO SAM parser and to use it just include it in your scripts and ask GenOO SAM parser to use it.
30  
31 =head1 EXAMPLES
32  
33 # Create a parser
34 my $file_parser = GenOO::Data::File::SAM->new(
35 file => 'file.sam',
36 records_class => 'GenOOx::Data::File::SAMstar::Record'
37 );
38  
39 # Loop on the records of the file
40 while (my $record = $file_parser->next_record) {
41 # $record is now an instance of GenOOx::Data::File::SAMstar::Record.
42 print $record->cigar."\n"; # name
43 print $record->flag."\n"; # flag
44 print $record->number_of_mappings."\n"; # new stuff not present by default in GenOO
45 }
46  
47 =cut
48  
49 # Let the code begin...
50  
51 package GenOOx::Data::File::SAMstar;
52 $GenOOx::Data::File::SAMstar::VERSION = '0.0.2';
53  
54 #######################################################################
55 ####################### Load External modules #####################
56 #######################################################################
57 use Modern::Perl;
58  
59  
60 1;