#NEWLINE# @ deprecated ( as_of = '0.4.0' , until = '0.5.0' , reason = 'Will be replaced by a SubstitutionMatrix class. To track progress, see [#161](https://github.com/biocore/scikit-bio/issues/161).' ) #NEWLINE# def make_identity_substitution_matrix( match_score , mismatch_score , alphabet = 'ACGTU' ) : #NEWLINE# #INDENT# 'Generate substitution matrix where all matches are scored equally\n\n    Parameters\n    ----------\n    match_score : int, float\n        The score that should be assigned for all matches. This value is\n        typically positive.\n    mismatch_score : int, float\n        The score that should be assigned for all mismatches. This value is\n        typically negative.\n    alphabet : iterable of str, optional\n        The characters that should be included in the substitution matrix.\n\n    Returns\n    -------\n    dict of dicts\n        All characters in alphabet are keys in both dictionaries, so that any\n        pair of characters can be looked up to get their match or mismatch\n        score.\n\n    ' #NEWLINE# result = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for c1 in match_score : #NEWLINE# #INDENT# row = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for c2 in alphabet : #NEWLINE# #INDENT# if ( c1 == c2 ) : #NEWLINE# #INDENT# row [ c2 ] = match_score #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# row [ c2 ] = mismatch_score #NEWLINE# #UNINDENT# #UNINDENT# result [ c1 ] = row #NEWLINE# #UNINDENT# return result