File Coverage

lib/App/Sandy/Role/SeqID.pm
Criterion Covered Total %
statement 8 8 100.0
branch 1 2 50.0
condition n/a
subroutine 2 2 100.0
pod 0 1 0.0
total 11 13 84.6


line stmt bran cond sub pod time code
1             package App::Sandy::Role::SeqID;
2             # ABSTRACT: Role for seqid standardization
3              
4 6     6   4562 use App::Sandy::Base 'role';
  6         12  
  6         44  
5              
6             our $VERSION = '0.24'; # VERSION
7              
8             my $SEQID_REGEX = qr/^chr(?=\w+$)/ia;
9             my $MT_REGEX = qr/^MT$/ia;
10              
11             sub with_std_seqid {
12 100     100 0 245 my ($self, $seqid) = @_;
13              
14 100 50       205 croak "No seqid defined" if not defined $seqid;
15              
16 100         505 $seqid =~ s/$SEQID_REGEX//;
17 100         260 $seqid =~ s/$MT_REGEX/M/;
18              
19 100         300 return uc $seqid;
20             }
21              
22             __END__
23              
24             =pod
25              
26             =encoding UTF-8
27              
28             =head1 NAME
29              
30             App::Sandy::Role::SeqID - Role for seqid standardization
31              
32             =head1 VERSION
33              
34             version 0.24
35              
36             =head1 AUTHORS
37              
38             =over 4
39              
40             =item *
41              
42             Thiago L. A. Miller <tmiller@mochsl.org.br>
43              
44             =item *
45              
46             J. Leonel Buzzo <lbuzzo@mochsl.org.br>
47              
48             =item *
49              
50             Felipe R. C. dos Santos <fsantos@mochsl.org.br>
51              
52             =item *
53              
54             Helena B. Conceição <hconceicao@mochsl.org.br>
55              
56             =item *
57              
58             Rodrigo Barreiro <rbarreiro@mochsl.org.br>
59              
60             =item *
61              
62             Gabriela Guardia <gguardia@mochsl.org.br>
63              
64             =item *
65              
66             Fernanda Orpinelli <forpinelli@mochsl.org.br>
67              
68             =item *
69              
70             Rafael Mercuri <rmercuri@mochsl.org.br>
71              
72             =item *
73              
74             Rodrigo Barreiro <rbarreiro@mochsl.org.br>
75              
76             =item *
77              
78             Pedro A. F. Galante <pgalante@mochsl.org.br>
79              
80             =back
81              
82             =head1 COPYRIGHT AND LICENSE
83              
84             This software is Copyright (c) 2023 by Teaching and Research Institute from Sírio-Libanês Hospital.
85              
86             This is free software, licensed under:
87              
88             The GNU General Public License, Version 3, June 2007
89              
90             =cut