gtAI package¶
Submodules¶
gtAI.CA_RSCU module¶
-
CA_RSCU.
RSCU
(allseq, allseq_name, The_Genetic_Codes_number)[source]¶ calculate RSCU values
Args:
allseq (str): DNA sequence allseq_name (str) : gene name The_Genetic_Codes_number (int) : default = 1, The Genetic Codes number described by NCBI (https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi)- Returns:
- DataFrame: DataFrame contains codons and RSCU values
gtAI.Run_gtAI module¶
gtAI.gtAI module¶
-
gtAI.
GtRNAdb
(url)[source]¶ - Get the tRNA genes count from GtRNAdb database
Args:
url (string): a url to anticodon table for organism from GtRNAdb database (http://gtrnadb.ucsc.edu/)Returns:
A dictionary of each anticodon and its gene countRaises:
ValueError if the URL, not a valid for GtRNAdb databaseExample:
#example 1
> GtRNAdb(”http://gtrnadb.ucsc.edu/genomes/eukaryota/Hsapi19/”)
-
gtAI.
abs_Wi
(dict_anticodon_number, Sug, Sci, Sai, Sgu, Sal, bacteria=False)[source]¶ Calculate the absolute adaptiveness values for each codon.
Args:
dict_anticodon_number (dict): a merged dictionary of anticodon-codon with each anticodon tRNA gene copy number returned from dict_codon_anticodon_count() function.
Sug (int): the S-value for codon with (U) in the third position and (G) in first anticodon position
Sci (int): the S-value for codon with (C) in the third position and (I) in first anticodon position
Sai (int): the S-value for codon with (A) in the third position and (I) in first anticodon position
Sgu (int): the S-value for codon with (G) in the third position and (U) in first anticodon position
Sal (int): the S-value for codon with (A) in the third position and (L) in first anticodon position ( if bacteria = True)
bacteria (bool): True If the tested organism is prokaryotic or archaea, else equal to False ( default = False )
Returns:
A dictionary of the absolute adaptiveness values for each codonNote:
All Sij values (as Sug) should be a number from 0 to 1Raises:
ValueError if the length of dict_anticodon_number equal to zero ValueError if any of Sij values are less than 0 or greater than 1Example:
> anticodon_dict = tRNADB_CE(“trna.ie.niigata-u.ac.jp/cgi-bin/trnadb/whole_anticodon.cgi?GID=|CP001631&DTYPE=CMP&VTYPE=1”) # Return an anticodon table of Acidimicrobium ferrooxidans DSM 10331 > anticodon_codon = dict_codon_anticodon ( anticanticodon_dictodon ) > dict_codon_anticodon_count = dict_codon_anticodon_count(anticodon_codon,anticodon_dict,bacteria = True) > abs_Wi(dict_codon_anticodon_count, Sug=1, Sci=1, Sai=1, Sgu=1, Sal=1, bacteria=True)
-
gtAI.
calc_Tai
(DNA, rel_dict_wi, genetic_code_number=1)[source]¶ Calculate the tRNA adaptation index of a gene.
Args:
DNA (str): a coding sequence of DNA ( should only contain A, C, T, and G )
rel_dict_wi (dict): dictionary of the relative adaptiveness values for each codon returned from rel_Wi() function
genetic_code_number (int): default = 1, The Genetic Codes number described by NCBI (https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi)
Returns:
the tRNA adaptation index of a geneRaises:
ValueError if the length of dict_anticodon_number equal to zeroExample:
> anticodon_dict = tRNADB_CE(“trna.ie.niigata-u.ac.jp/cgi-bin/trnadb/whole_anticodon.cgi?GID=|CP001631&DTYPE=CMP&VTYPE=1”) # Return an anticodon table of Acidimicrobium ferrooxidans DSM 10331 > anticodon_codon = dict_codon_anticodon ( anticanticodon_dictodon ) > dict_codon_anticodon_count = dict_codon_anticodon_count(anticodon_codon,anticodon_dict,bacteria = True) > abs_Wi = abs_Wi(dict_codon_anticodon_count, Sug=1, Sci=1, Sai=1, Sgu=1, Sal=1, bacteria=True) > rel_Wi(abs_Wi, 11)
-
gtAI.
dict_codon_anticodon
(anti_codon_dict)[source]¶ Identify all potential anticodons for each codon
Args:
anti_codon_dict (dict): a dictionary of all anticodons for an organism ( returned from ( tRNADB_CE() ) or ( GtRNAdb() ) )Returns:
A dictionary of all potential anticodons for each codonRaises:
ValueError if the length of anti_codon_dict equal to zeroExample:
> anticodon_dict = tRNADB_CE(“trna.ie.niigata-u.ac.jp/cgi-bin/trnadb/whole_anticodon.cgi?GID=|CP001631&DTYPE=CMP&VTYPE=1”) # Return an anticodon table of Acidimicrobium ferrooxidans DSM 10331 > dict_codon_anticodon ( anticanticodon_dictodon )
-
gtAI.
dict_codon_anticodon_count
(dic_codon_anticodon, dict_tGCN_main, bacteria=False)[source]¶ Merge anticodon-codon dictionary with each anticodon tRNA gene copy number.
Args:
dic_codon_anticodon (dict): A dictionary of all potential anticodons for each codon returned from dict_codon_anticodon() function.
dict_tGCN_main (dict): a dictionary of all anticodons for an organism ( returned from ( tRNADB_CE() function ) or ( GtRNAdb() function ) )
bacteria (bool): True If the tested organism is prokaryotic or archaea, else equal to False ( default = False )
Returns:
a merged dictionary of anticodon-codon with each anticodon tRNA gene copy number.Raises:
ValueError if the length of anti_codon_dict equal to zero ValueError if the length of dict_tGCN_main equal to zeroExample:
> anticodon_dict = tRNADB_CE(“trna.ie.niigata-u.ac.jp/cgi-bin/trnadb/whole_anticodon.cgi?GID=|CP001631&DTYPE=CMP&VTYPE=1”) # Return an anticodon table of Acidimicrobium ferrooxidans DSM 10331 > anticodon_codon = dict_codon_anticodon ( anticanticodon_dictodon ) > dict_codon_anticodon_count(anticodon_codon,anticodon_dict,bacteria = True)
-
gtAI.
rel_Wi
(dict_abs_Wi, genetic_code_number=1)[source]¶ Calculate the relative adaptiveness values for each codon.
Args:
dict_abs_Wi (dict): dictionary of the absolute adaptiveness values for each codon returned from abs_Wi() function
genetic_code_number (int): default = 1, The Genetic Codes number described by NCBI (https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi)
Returns:
a dictionary of the relative adaptiveness values for each codonRaises:
ValueError if the length of dict_abs_Wi equal to zeroExample:
> anticodon_dict = tRNADB_CE(“trna.ie.niigata-u.ac.jp/cgi-bin/trnadb/whole_anticodon.cgi?GID=|CP001631&DTYPE=CMP&VTYPE=1”) # Return an anticodon table of Acidimicrobium ferrooxidans DSM 10331 > anticodon_codon = dict_codon_anticodon ( anticanticodon_dictodon ) > dict_codon_anticodon_count = dict_codon_anticodon_count(anticodon_codon,anticodon_dict,bacteria = True) > abs_Wi = abs_Wi(dict_codon_anticodon_count, Sug=1, Sci=1, Sai=1, Sgu=1, Sal=1, bacteria=True) > rel_Wi(abs_Wi, 11)
-
gtAI.
tRNADB_CE
(url)[source]¶ Get the tRNA genes count from tRNADB-CE database
Args:
url (string): a url to anticodon table for organism from tRNADB_CE database (http://trna.ie.niigata-u.ac.jp/cgi-bin/trnadb/index.cgi)Returns:
A dictionary of each anticodon and its gene countRaises:
ValueError if the URL, not a valid for tRNADB-CE databaseExample:
> tRNADB_CE(“trna.ie.niigata-u.ac.jp/cgi-bin/trnadb/whole_anticodon.cgi?GID=|CP001631&DTYPE=CMP&VTYPE=1”) # Return an anticodon table of Acidimicrobium ferrooxidans DSM 10331