logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Bio::Tradis::Parser::Bam - Very basic BAM parser. Limited functionality.

Author

       Carla Cummins <path-help@sanger.ac.uk>

Name

       Bio::Tradis::Parser::Bam - Very basic BAM parser. Limited functionality.

Synopsis

       Parses BAM files and gives access to basic info in them.

          use Bio::Tradis::Parser::Bam;

          my $pipeline = Bio::Tradis::Parser::Bam->new(file => 'abc');
          $pipeline->read_info;
          $pipeline->next_read;
          $pipeline->seq_info;
          $pipeline->is_mapped;
          $pipeline->is_reverse;

       =seq_info Reads BAM header and returns a hash (keys are sequence ids, values are hash refs with keys as
       tags (like LN and M5))

       =next_read Moves _currentread to the next entry in the BAM. Returns 0 if EOF.

       =read_info Returns info from _currentread = hash reference with field name as key.  Standard fields are
       named as per the SAM format specification: 1 : QNAME 2 : FLAG 3 : RNAME 4 : POS 5 : MAPQ 6 : CIGAR 7 :
       RNEXT 8 : PNEXT 9 : TLEN 10 : SEQ 11 : QUAL Additional fields will use their tag names.  Complete line is
       returned with key READ

       =is_mapped Parses the flag for the current read and determines if mapped.  Returns 0 or 1.

       =is_reverse Parses the flag for the current read and determines if reverse complemented. Returns 0 or 1.

Version

       version 1.4.5

See Also