comparison lib/CPT/Filetype/embl.pm @ 1:d724f34e671d draft default tip

planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
author cpt
date Mon, 05 Jun 2023 02:50:07 +0000
parents
children
comparison
equal deleted inserted replaced
0:e4de0a0e90c8 1:d724f34e671d
1 package CPT::Filetype::embl;
2 no warnings;
3 use Moose;
4 with 'CPT::Filetype';
5
6 sub score {
7 my ($self) = @_;
8 my $first_line = ${$self->lines()}[0];
9 my @embl_identifiers = (
10 'FT', 'FH', 'SQ', 'DE', 'AC', 'PA', 'SV', 'DT', 'KW',
11 'OS', 'OC', 'OX', 'R ', '' , 'DR', 'CC', 'CO', 'XX',
12 );
13 my %embl_id_map = map { $_ => 1 } @embl_identifiers;
14 my $embl_score = 0;
15 foreach(@{$self->lines()}){
16 $embl_score++ if($embl_id_map{substr($_,0,2)});
17 }
18 return $embl_score/10;
19 }
20
21 sub name {
22 return 'embl';
23 }
24
25 no Moose;
26 1;
27
28 __END__
29
30 =pod
31
32 =encoding UTF-8
33
34 =head1 NAME
35
36 CPT::Filetype::embl
37
38 =head1 VERSION
39
40 version 1.99.4
41
42 =head1 AUTHOR
43
44 Eric Rasche <rasche.eric@yandex.ru>
45
46 =head1 COPYRIGHT AND LICENSE
47
48 This software is Copyright (c) 2014 by Eric Rasche.
49
50 This is free software, licensed under:
51
52 The GNU General Public License, Version 3, June 2007
53
54 =cut