Skip to content

Commit

Permalink
Bio::Tools::CodonTable: update data from versino 4.2 to 4.9 (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
carandraug committed Apr 25, 2024
1 parent 66ccbe8 commit e2273cd
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 98 deletions.
7 changes: 6 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ Summary of important user-visible changes for BioPerl
{{$NEXT}}
* Add minimum dependency on base.pm v2.18. Fixes bug in some cases when
using SUPER::new() [#307].

* Fix test for BSML SAX by using lax parser XML::SAX::PurePerl since
the external DTD URL now 404s [#376].
* Added codon table 15 Bio::Tools::CodonTable [#389].

* Updated Bio::Tools::CodonTable for the latest version of NCBI
genetic code table (version 4.9). Previously, version 4.2 was
being used. This update changes codon tables 3, 15, 24, 27-30,
32, and 33 [#389, #391].

1.7.8 2021-02-02 23:02:18-06:00 America/Chicago
* Bio::SeqIO::interpro has been moved to a separate repository to
Expand Down
204 changes: 108 additions & 96 deletions lib/Bio/Tools/CodonTable.pm
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ only differences are in available initiator codons.
NCBI Genetic Codes home page:
(Last update of the Genetic Codes: Nov. 18, 2016)
(Last update of the Genetic Codes: Apr. 25, 2024)
https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi?mode=c
ASN.1 version with ids 1 to 25 is at:
The "value notation" / "print form" ASN.1 version is at:
ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt
Thanks to Matteo diTomasso for the original Perl implementation
Expand Down Expand Up @@ -199,106 +199,118 @@ BEGIN {
$GAP = '-';
$CODONGAP = $GAP x CODONSIZE;

@NAMES = #id
(
'Strict', #0, special option for ATG-only start
'Standard', #1
'Vertebrate Mitochondrial',#2
'Yeast Mitochondrial',# 3
'Mold, Protozoan, and Coelenterate Mitochondrial and Mycoplasma/Spiroplasma',#4
'Invertebrate Mitochondrial',#5
'Ciliate, Dasycladacean and Hexamita Nuclear',# 6
'', '',
'Echinoderm and Flatworm Mitochondrial',#9
'Euplotid Nuclear',#10
'Bacterial, Archaeal and Plant Plastid',# 11
'Alternative Yeast Nuclear',# 12
'Ascidian Mitochondrial',# 13
'Alternative Flatworm Mitochondrial',# 14
'Blepharisma Nuclear',#15
'Chlorophycean Mitochondrial',# 16
'', '', '', '',
'Trematode Mitochondrial',# 21
'Scenedesmus obliquus Mitochondrial', #22
'Thraustochytrium Mitochondrial', #23
'Pterobranchia Mitochondrial', #24
'Candidate Division SR1 and Gracilibacteria', #25
'Pachysolen tannophilus Nuclear Code', #26
'Karyorelict Nuclear', #27
'Condylostoma Nuclear', #28
'Mesodinium Nuclear', #29
'Peritrich Nuclear', #30
'Blastocrithidia Nuclear' #31
);

@TABLES =
qw(
FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSS**VVVVAAAADDEEGGGG
FFLLSSSSYY**CCWWTTTTPPPPHHQQRRRRIIMMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSSSVVVVAAAADDEEGGGG
FFLLSSSSYYQQCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
'' ''
FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG
FFLLSSSSYY**CCCWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSR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RVVVVAAAADDEEGGGG
);
@NAMES = (
'Strict', # 0 (special option for ATG-only start)
'Standard', # 1
'Vertebrate Mitochondrial', # 2
'Yeast Mitochondrial', # 3
'Mold Mitochondrial; Protozoan Mitochondrial; Coelenterate Mitochondrial; Mycoplasma; Spiroplasma', # 4
'Invertebrate Mitochondrial', # 5
'Ciliate Nuclear; Dasycladacean Nuclear; Hexamita Nuclear', # 6
'',
'',
'Echinoderm Mitochondrial; Flatworm Mitochondrial', # 9
'Euplotid Nuclear', # 10
'Bacterial, Archaeal and Plant Plastid', # 11
'Alternative Yeast Nuclear', # 12
'Ascidian Mitochondrial', # 13
'Alternative Flatworm Mitochondrial', # 14
'Blepharisma Macronuclear', # 15
'Chlorophycean Mitochondrial', # 16
'',
'',
'',
'',
'Trematode Mitochondrial', # 21
'Scenedesmus obliquus Mitochondrial', # 22
'Thraustochytrium Mitochondrial', # 23
'Rhabdopleuridae Mitochondrial', # 24
'Candidate Division SR1 and Gracilibacteria', # 25
'Pachysolen tannophilus Nuclear', # 26
'Karyorelict Nuclear', # 27
'Condylostoma Nuclear', # 28
'Mesodinium Nuclear', # 29
'Peritrich Nuclear', # 30
'Blastocrithidia Nuclear', # 31
'Balanophoraceae Plastid', # 32
);

@TABLES = qw(
FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSS**VVVVAAAADDEEGGGG
FFLLSSSSYY**CCWWTTTTPPPPHHQQRRRRIIMMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSSSVVVVAAAADDEEGGGG
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G
FFLLSSSSYYQQCCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYYYYCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYYEECC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYYEECCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
FFLLSSSSYY*WCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG
);

# (bases used for these tables, for reference)
# 1 TTTTTTTTTTTTTTTTCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGG
# 2 TTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGGTTTTCCCCAAAAGGGG
# 3 TCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAG

@STARTS =
qw(
----------**--*--------------------M----------------------------
---M------**--*----M---------------M----------------------------
----------**--------------------MMMM----------**---M------------
----------**----------------------MM----------------------------
--MM------**-------M------------MMMM---------------M------------
---M------**--------------------MMMM---------------M------------
--------------*--------------------M----------------------------
'' ''
----------**-----------------------M---------------M------------
----------**-----------------------M----------------------------
---M------**--*----M------------MMMM---------------M------------
----------**--*----M---------------M----------------------------
---M------**----------------------MM---------------M------------
-----------*-----------------------M----------------------------
---M------**--*----M------------MMMM---------------M------------
----------*---*--------------------M----------------------------
'' '' '' ''
----------**-----------------------M---------------M------------
------*---*---*--------------------M----------------------------
--*-------**--*-----------------M--M---------------M------------
---M------**-------M---------------M---------------M------------
---M------**-----------------------M---------------M------------
----------**--*----M---------------M----------------------------
--------------*--------------------M----------------------------
----------**--*--------------------M----------------------------
--------------*--------------------M----------------------------
--------------*--------------------M----------------------------
----------**-----------------------M----------------------------
);
@STARTS = qw(
----------**--*--------------------M----------------------------
---M------**--*----M---------------M----------------------------
----------**--------------------MMMM----------**---M------------
----------**----------------------MM---------------M------------
--MM------**-------M------------MMMM---------------M------------
---M------**--------------------MMMM---------------M------------
--------------*--------------------M----------------------------
''
''
----------**-----------------------M---------------M------------
----------**-----------------------M----------------------------
---M------**--*----M------------MMMM---------------M------------
----------**--*----M---------------M----------------------------
---M------**----------------------MM---------------M------------
-----------*-----------------------M----------------------------
----------*---*--------------------M----------------------------
----------*---*--------------------M----------------------------
''
''
''
''
----------**-----------------------M---------------M------------
------*---*---*--------------------M----------------------------
--*-------**--*-----------------M--M---------------M------------
---M------**-------M---------------M---------------M------------
---M------**-----------------------M---------------M------------
----------**--*----M---------------M----------------------------
--------------*--------------------M----------------------------
----------**--*--------------------M----------------------------
--------------*--------------------M----------------------------
--------------*--------------------M----------------------------
----------**-----------------------M----------------------------
---M------*---*----M------------MMMM---------------M------------
);

my @nucs = qw(t c a g);
my $x = 0;
Expand Down
2 changes: 1 addition & 1 deletion t/SeqTools/CodonTable.t
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ my @custom_table =
);

ok my $custct = $myCodonTable->add_table(@custom_table);
is $custct, 32;
is $custct, 33;
is $myCodonTable->translate('atgaaraayacmacracwacka'), 'MKNTTTT';
ok $myCodonTable->id($custct);
is $myCodonTable->translate('atgaaraayacmacracwacka'), 'MKXXTTT';
Expand Down

0 comments on commit e2273cd

Please sign in to comment.