<commit_before># -*- coding: utf-8 -*-
"""
Support functions. Common action over dna sequences


@author: ccorbi




"""
from __future__ import print_function
from __future__ import division
import bisect
import re
import random
import operator
import functools

from  codons_info import *


def translate2aa(nseq, start=1):
    """Return AA sequence, from NA sequence (string).

    Parameters
    ----------

        :param str nseq: Nucleotide sequence
        :param int start: Start to translate from the position, by default 1

    Returns
    -------
     str with the aminoacid sequence.


    """
    bases = ['T', 'C', 'A', 'G']
    codons = [a + b + c for a in bases for b in bases for c in bases]
    amino_acids = 'FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG'
    codon_table = dict(zip(codons, amino_acids))
    pseq = ""

    # the start point, is where the aligment begins, not the protein,<commit_msg>fix importing typo<commit_after># -*- coding: utf-8 -*-
"""
Support functions. Common action over dna sequences


@author: ccorbi




"""
from __future__ import print_function
from __future__ import division
import bisect
import re
import random
import operator
import functools

from  .codons_info import *


def translate2aa(nseq, start=1):
    """Return AA sequence, from NA sequence (string).

    Parameters
    ----------

        :param str nseq: Nucleotide sequence
        :param int start: Start to translate from the position, by default 1

    Returns
    -------
     str with the aminoacid sequence.


    """
    bases = ['T', 'C', 'A', 'G']
    codons = [a + b + c for a in bases for b in bases for c in bases]
    amino_acids = 'FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG'
    codon_table = dict(zip(codons, amino_acids))
    pseq = ""

    # the start point, is where the aligment begins, not the protein,
{'fraction_non_alphanumeric': 0.1045647558386412, 'fraction_numerical': 0.004246284501061571, 'mean_word_length': 3.0450643776824036, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5131489', 'n_tokens_mistral': 630, 'n_tokens_neox': 582, 'n_words': 211}