- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
@lib_001=('A','G','C','T','A');
@lib_002=('C','T','A','A','G');
@lib_003=('T','G','C','A','T');
$string=<FILE>;
@sequence=split("",$string);
@code=@sequence[-7..-3];
if((join('',@lib_001) eq join('',@code)) or
(join('',@lib_001[0..3]) eq join('',@code[0..3])) or
(join('',@lib_001[1..4]) eq join('',@code[1..4])) or
(join('',@lib_001[0,1,2,4]) eq join('',@code[0,1,2,4])) or
(join('',@lib_001[0,2,3,4]) eq join('',@code[0,2,3,4])) or
(join('',@lib_001[0,1,3,4]) eq join('',@code[0,1,3,4])))
{$tag=join('',@code);
$closest_tag=join('',@lib_001);}
elsif((join('',@lib_002) eq join('',@code)) or
(join('',@lib_002[0..3]) eq join('',@code[0..3])) or
(join('',@lib_002[1..4]) eq join('',@code[1..4])) or
(join('',@lib_002[0,1,2,4]) eq join('',@code[0,1,2,4])) or
(join('',@lib_002[0,2,3,4]) eq join('',@code[0,2,3,4])) or
(join('',@lib_002[0,1,3,4]) eq join('',@code[0,1,3,4])))
{$tag=join('',@code);
$closest_tag=join('',@lib_002);}
elsif((join('',@lib_003) eq join('',@code)) or
(join('',@lib_003[0..3]) eq join('',@code[0..3])) or
(join('',@lib_003[1..4]) eq join('',@code[1..4])) or
(join('',@lib_003[0,1,2,4]) eq join('',@code[0,1,2,4])) or
(join('',@lib_003[0,2,3,4]) eq join('',@code[0,2,3,4])) or
(join('',@lib_003[0,1,3,4]) eq join('',@code[0,1,3,4])))
{$tag=join('',@code);
$closest_tag=join('',@lib_003);}
else
{$tag=join('',@code);
$closest_tag='NONE';}