def test_list_ambiguous_codons(self): """Check if stop codons are properly extended.""" self.assertEqual( list_ambiguous_codons(["TGA", "TAA"], IUPACData.ambiguous_dna_values), ["TGA", "TAA", "TRA"], ) self.assertEqual( list_ambiguous_codons(["TAG", "TGA"], IUPACData.ambiguous_dna_values), ["TAG", "TGA"], ) self.assertEqual( list_ambiguous_codons(["TAG", "TAA"], IUPACData.ambiguous_dna_values), ["TAG", "TAA", "TAR"], ) self.assertEqual( list_ambiguous_codons(["UAG", "UAA"], IUPACData.ambiguous_rna_values), ["UAG", "UAA", "UAR"], ) self.assertEqual( list_ambiguous_codons(["TGA", "TAA", "TAG"], IUPACData.ambiguous_dna_values), ["TGA", "TAA", "TAG", "TAR", "TRA"], )
def test_list_ambiguous_codons(self): """Check if stop codons are properly extended.""" self.assertEqual(list_ambiguous_codons(['TGA', 'TAA'], IUPACData.ambiguous_dna_values), ['TGA', 'TAA', 'TRA']) self.assertEqual(list_ambiguous_codons(['TAG', 'TGA'], IUPACData.ambiguous_dna_values), ['TAG', 'TGA']) self.assertEqual(list_ambiguous_codons(['TAG', 'TAA'], IUPACData.ambiguous_dna_values), ['TAG', 'TAA', 'TAR']) self.assertEqual(list_ambiguous_codons(['UAG', 'UAA'], IUPACData.ambiguous_rna_values), ['UAG', 'UAA', 'UAR']) self.assertEqual(list_ambiguous_codons(['TGA', 'TAA', 'TAG'], IUPACData.ambiguous_dna_values), ['TGA', 'TAA', 'TAG', 'TAR', 'TRA'])
# Copyright 2008 by Peter C**k. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from __future__ import print_function from Bio.Data import IUPACData from Bio.Data.CodonTable import ambiguous_generic_by_id, ambiguous_generic_by_name from Bio.Data.CodonTable import ambiguous_rna_by_id, ambiguous_dna_by_id from Bio.Data.CodonTable import unambiguous_rna_by_id from Bio.Data.CodonTable import list_ambiguous_codons, TranslationError #Check the extension of stop codons to include well defined ambiguous ones assert list_ambiguous_codons(['TGA', 'TAA'],IUPACData.ambiguous_dna_values) == ['TGA', 'TAA', 'TRA'] assert list_ambiguous_codons(['TAG', 'TGA'],IUPACData.ambiguous_dna_values) == ['TAG', 'TGA'] assert list_ambiguous_codons(['TAG', 'TAA'],IUPACData.ambiguous_dna_values) == ['TAG', 'TAA', 'TAR'] assert list_ambiguous_codons(['UAG', 'UAA'],IUPACData.ambiguous_rna_values) == ['UAG', 'UAA', 'UAR'] assert list_ambiguous_codons(['TGA', 'TAA', 'TAG'],IUPACData.ambiguous_dna_values) == ['TGA', 'TAA', 'TAG', 'TAR', 'TRA'] #Basic sanity test, for n in ambiguous_generic_by_id.keys(): assert ambiguous_rna_by_id[n].forward_table["GUU"] == "V" assert ambiguous_rna_by_id[n].forward_table["GUN"] == "V" if n != 23 : assert ambiguous_rna_by_id[n].forward_table["UUN"] == "X" # F or L assert ambiguous_dna_by_id[n].forward_table["GTT"] == "V" if n != 23 : assert ambiguous_dna_by_id[n].forward_table["TTN"] == "X" # F or L
# Copyright 2008 by Peter C**k. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from Bio.Data import IUPACData from Bio.Data.CodonTable import ambiguous_generic_by_id, ambiguous_generic_by_name from Bio.Data.CodonTable import ambiguous_rna_by_id, ambiguous_dna_by_id from Bio.Data.CodonTable import unambiguous_rna_by_id from Bio.Data.CodonTable import list_ambiguous_codons, TranslationError #Check the extension of stop codons to include well defined ambiguous ones assert list_ambiguous_codons( ['TGA', 'TAA'], IUPACData.ambiguous_dna_values) == ['TGA', 'TAA', 'TRA'] assert list_ambiguous_codons(['TAG', 'TGA'], IUPACData.ambiguous_dna_values) == ['TAG', 'TGA'] assert list_ambiguous_codons( ['TAG', 'TAA'], IUPACData.ambiguous_dna_values) == ['TAG', 'TAA', 'TAR'] assert list_ambiguous_codons( ['UAG', 'UAA'], IUPACData.ambiguous_rna_values) == ['UAG', 'UAA', 'UAR'] assert list_ambiguous_codons( ['TGA', 'TAA', 'TAG'], IUPACData.ambiguous_dna_values) == ['TGA', 'TAA', 'TAG', 'TAR', 'TRA'] #Basic sanity test, for n in ambiguous_generic_by_id.keys(): assert ambiguous_rna_by_id[n].forward_table["GUU"] == "V" assert ambiguous_rna_by_id[n].forward_table["GUN"] == "V" if n != 23: assert ambiguous_rna_by_id[n].forward_table["UUN"] == "X" # F or L
# Copyright 2008 by Peter C**k. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from __future__ import print_function from Bio.Data import IUPACData from Bio.Data.CodonTable import ambiguous_generic_by_id, ambiguous_generic_by_name from Bio.Data.CodonTable import ambiguous_rna_by_id, ambiguous_dna_by_id from Bio.Data.CodonTable import unambiguous_rna_by_id from Bio.Data.CodonTable import list_ambiguous_codons, TranslationError # Check the extension of stop codons to include well defined ambiguous ones assert list_ambiguous_codons(["TGA", "TAA"], IUPACData.ambiguous_dna_values) == ["TGA", "TAA", "TRA"] assert list_ambiguous_codons(["TAG", "TGA"], IUPACData.ambiguous_dna_values) == ["TAG", "TGA"] assert list_ambiguous_codons(["TAG", "TAA"], IUPACData.ambiguous_dna_values) == ["TAG", "TAA", "TAR"] assert list_ambiguous_codons(["UAG", "UAA"], IUPACData.ambiguous_rna_values) == ["UAG", "UAA", "UAR"] assert list_ambiguous_codons(["TGA", "TAA", "TAG"], IUPACData.ambiguous_dna_values) == [ "TGA", "TAA", "TAG", "TAR", "TRA", ] # Basic sanity test, for n in ambiguous_generic_by_id: assert ambiguous_rna_by_id[n].forward_table["GUU"] == "V" assert ambiguous_rna_by_id[n].forward_table["GUN"] == "V"