line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::Tradis::DetectTags; |
2
|
|
|
|
|
|
|
$Bio::Tradis::DetectTags::VERSION = '1.3.3'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Detect tr tags in BAM file |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
112590
|
use Moose; |
|
1
|
|
|
|
|
404544
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
use Bio::Tradis::Parser::Bam |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
7299
|
has 'bamfile' => ( is => 'ro', isa => 'Str', required => 1 ); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
6
|
|
10
|
|
|
|
|
|
|
has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub tags_present { |
13
|
1
|
|
|
1
|
0
|
3
|
my ($self) = @_; |
14
|
1
|
|
|
|
|
29
|
my $pars = Bio::Tradis::Parser::Bam->new( file => $self->bamfile, samtools_exec => $self->samtools_exec ); |
15
|
1
|
|
|
|
|
5
|
my $read_info = $pars->read_info; |
16
|
1
|
|
|
|
|
6
|
$pars->next_read; |
17
|
0
|
|
|
|
|
|
$read_info = $pars->read_info; |
18
|
0
|
0
|
|
|
|
|
if(defined(${$read_info}{tr})) |
|
0
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
{ |
20
|
0
|
|
|
|
|
|
return 1; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
else |
23
|
|
|
|
|
|
|
{ |
24
|
0
|
|
|
|
|
|
return 0; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
30
|
1
|
|
|
1
|
|
359
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=encoding UTF-8 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Bio::Tradis::DetectTags - Detect tr tags in BAM file |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
version 1.3.3 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Detects presence of tr/tq tags in BAM files from Tradis analyses |
50
|
|
|
|
|
|
|
use Bio::Tradis::DetectTags; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
my $pipeline = Bio::Tradis::DetectTags->new(bamfile => 'abc'); |
53
|
|
|
|
|
|
|
$pipeline->tags_present(); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Bio::Tradis::DetectTags |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 PARAMETERS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 Required |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
C<bamfile> - path to/name of file to check |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 METHODS |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
C<tags_present> - returns true if TraDIS tags are detected in C<bamfile> |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHOR |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Carla Cummins <path-help@sanger.ac.uk> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This software is Copyright (c) 2013 by Wellcome Trust Sanger Institute. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This is free software, licensed under: |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |