/usr/share/perl5/Bio/Tradis/DetectTags.pm is in bio-tradis 1.3.3+dfsg-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | package Bio::Tradis::DetectTags;
# ABSTRACT: Detect tr tags in BAM file
=head1 NAME
Bio::Tradis::DetectTags
=head1 SYNOPSIS
Detects presence of tr/tq tags in BAM files from Tradis analyses
use Bio::Tradis::DetectTags;
my $pipeline = Bio::Tradis::DetectTags->new(bamfile => 'abc');
$pipeline->tags_present();
=head1 PARAMETERS
=head2 Required
C<bamfile> - path to/name of file to check
=head1 METHODS
C<tags_present> - returns true if TraDIS tags are detected in C<bamfile>
=cut
use Moose;
use Bio::Tradis::Parser::Bam
has 'bamfile' => ( is => 'ro', isa => 'Str', required => 1 );
has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
sub tags_present {
my ($self) = @_;
my $pars = Bio::Tradis::Parser::Bam->new( file => $self->bamfile, samtools_exec => $self->samtools_exec );
my $read_info = $pars->read_info;
$pars->next_read;
$read_info = $pars->read_info;
if(defined(${$read_info}{tr}))
{
return 1;
}
else
{
return 0;
}
}
__PACKAGE__->meta->make_immutable;
no Moose;
1;
|