Package core :: Module prep |
[hide private]
[frames] | no frames]

# Module prep

Created on Nov 11, 2011

Contains various help functions which initialize / translate /preprocess the data

Author: Sven Giese

Functions | [hide private]
dictionary |
createdic(AAsequence) Creates the dictionary for the AA triplets and searches the starting indices of the triplets in the given aminoacid sequence. |
bool |
isvalidtriplet(codon, dictentry) Function which checks if a given triplet has max hamming distance of 1 to a other triplet. |
dictionary |
loadpickle(inputname) basic pickle functions. |
savepickle(dictionary, outputname) basic pickle functions. |
prot,rest |
trans_seq(DNA) Funtion which translates DNA to AA |

Variables | [hide private]
| __package__ = ``'``core``'``
| genetic_code = ``{``'``AAA``'``:` `'``K``'``,` `'``AAC``'``:` `'``N``'``,` `'``AAG``'``:` `'``K``'``,` `'``AAT``'``:` `'``N``'``...``

Function Details | [hide private]

### createdic(AAsequence) |
Creates the dictionary for the AA triplets and searches the starting indices of the triplets in the given aminoacid sequence. Parameters: `AAsequence` (string) - aminoacid sequence Returns: dictionary A dictionary with starting positions of each triplet in the given AA sequence

### isvalidtriplet(codon, dictentry) |
Function which checks if a given triplet has max hamming distance of 1 to a other triplet. Used for generation of possible substitutions triplets Parameters: `codon` (string) - nucleotide triplet `dictentry` (string) - nucleotide triplet Returns: bool Boolean value. True if max hamming distance 1,else False .

### loadpickle(inputname) |
basic pickle functions. actually for debugging and to speed up multiple simulations ( possible to load orf lists) Parameters: `inputname` (string) - Filename for loading. Returns: dictionary Dictionary containing start and end positions of ORFs.

### savepickle(dictionary, outputname) |
basic pickle functions. actually for debugging and to speed up multiple simulations ( possible to load orf lists) Parameters: `dictionary` (dictionary) - Dictionary containg start and end positions of ORFs. `outputname` (string) - Filename for saving.

### trans_seq(DNA) |
Funtion which translates DNA to AA Parameters: `DNA` (list) - nucleotide sequence Returns: prot,rest Translated aminoacid sequence,untranslated nucleotide sequence

Variables Details | [hide private]

  ### genetic_code Value:
      {'AAA': 'K',
       'AAC': 'N',
       'AAG': 'K',
       'AAT': 'N',
       'ACA': 'T',
       'ACC': 'T',
       'ACG': 'T',
       'ACT': 'T',
      ...