def setFrequencies(model, mali, prefix=""):

    try:
        frequencies = Codons.getFrequenciesPerCodonPosition(
            [x.mString for x in mali.values()])
    except XGram.Exceptions.UsageError:
        return

    # build a dummy grammar to insert frequencies
    dummy_grammar = XGram.Model.Grammar()
    for x in range(0, 3):
        params = []
        for a in ('A', 'C', 'G', 'T'):
            params.append(
                ("%sp%s%i" % (prefix, a.lower(), x), frequencies[x][a]))
        dummy_grammar.addVariable(params)

    model.mGrammar.copyParameters(dummy_grammar,
                                  ignore_missing=True)
**SUMMARY**
dataset/ETHPy150Open CGATOxford/cgat/CGAT/RateEstimation.py/setFrequencies--crossover with--dataset/ETHPy150Open sightmachine/SimpleCV/SimpleCV/Tracking/TrackSet.py/TrackSet.predictedCoordinates