0
|
1 package CPT::Filetype::fasta;
|
|
2 no warnings;
|
|
3 use Moose;
|
|
4 with 'CPT::Filetype';
|
|
5
|
|
6 sub score {
|
|
7 my ($self) = @_;
|
|
8 my @l = @{$self->lines()};
|
|
9
|
|
10 for(my $i = 0; $i < scalar(@l) - 1; $i++){
|
|
11 if(substr($l[$i],0,1) eq '>' && $l[$i+1] =~ /[A-Za-z]/){
|
|
12 return 1;
|
|
13 }
|
|
14 }
|
|
15 return 0;
|
|
16 }
|
|
17
|
|
18 sub name {
|
|
19 return 'fasta';
|
|
20 }
|
|
21
|
|
22 no Moose;
|
|
23 1;
|
|
24
|
|
25 __END__
|
|
26
|
|
27 =pod
|
|
28
|
|
29 =encoding UTF-8
|
|
30
|
|
31 =head1 NAME
|
|
32
|
|
33 CPT::Filetype::fasta
|
|
34
|
|
35 =head1 VERSION
|
|
36
|
|
37 version 1.99.4
|
|
38
|
|
39 =head1 AUTHOR
|
|
40
|
|
41 Eric Rasche <rasche.eric@yandex.ru>
|
|
42
|
|
43 =head1 COPYRIGHT AND LICENSE
|
|
44
|
|
45 This software is Copyright (c) 2014 by Eric Rasche.
|
|
46
|
|
47 This is free software, licensed under:
|
|
48
|
|
49 The GNU General Public License, Version 3, June 2007
|
|
50
|
|
51 =cut
|