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

GenOOx::Data::File::SAMstar::Record - Represents a record of a SAM format file generated by STAR

SYNOPSIS

    # Object representing a record of a sam file 

    # To initialize 
    my $sam_record = GenOOx::Data::File::SAMstar::Record->new(
        fields => [qname,flag, rname, pos, mapq, cigar,
                   rnext, pnext, tlen, seq, qual, tags]
    );

DESCRIPTION

    This object represents a record of a sam file generated by STAR and offers methods for accessing the different
    attributes. It implements several additional methods that transform original attributes in more manageable
    attributes. eg. from the FLAG attribute the actual strand is extracted etc.

EXAMPLES

    # Check if the record corresponds to a match
    my $mapped = $sam_record->is_mapped;
    
    # Check if the record corresponds to a non match
    my $unmapped = $sam_record->is_unmapped;
    
    # Parse the FLAG attribute and return 1 or -1 for the strand
    my $strand = $sam_record->strand;