| 1 | package Bio::Tradis::DetectTags; | ||||||||||
| 2 | 1 | $Bio::Tradis::DetectTags::VERSION = '1.4.5'; | |||||||||
| 3 | # ABSTRACT: Detect tr tags in BAM file | ||||||||||
| 4 | |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | use Bio::Tradis::Parser::Bam | ||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | has 'bamfile' => ( is => 'ro', isa => 'Str', required => 1 ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' ); | |||||||||
| 11 | |||||||||||
| 12 | 1 | ▶ | sub tags_present { | ||||||||
|
Subroutine
tags_present: called CC=2 SCAR=11.1
Pod
undocumented
| |||||||||||
| 13 | 1 | my ($self) = @_; | |||||||||
| 14 | 1 | my $pars = Bio::Tradis::Parser::Bam->new( file => $self->bamfile, samtools_exec => $self->samtools_exec ); | |||||||||
| 15 | 1 | my $read_info = $pars->read_info; | |||||||||
| 16 | 1 | $pars->next_read; | |||||||||
| 17 | 0 | $read_info = $pars->read_info; | |||||||||
| 18 | 0 | ▶ | if(defined(${$read_info}{tr})) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | { | ||||||||||
| 20 | 0 | return 1; | |||||||||
| 21 | } | ||||||||||
| 22 | else | ||||||||||
| 23 | { | ||||||||||
| 24 | 0 | return 0; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 30 | 1 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 31 | 1 | 1; | |||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||