Macro AA_SeqVarColorConverts the Kabat sequence variability calculated by AA_frequency to a color code Usage:
Sub AA_SeqVarColor() 'Color Code for the sequence variability in an alignment 'Applied to the line containing the Kabat sequence variability in the result 'produced by "AA-Frequency", it converts the numeric values to a color code i1 = Selection.Row i2 = i1 + Selection.Rows.Count - 1 j1 = Selection.Column j2 = j1 + Selection.Columns.Count - 1 For i = i1 To i2 Step 1 For j = j1 To j2 Step 1 If (IsEmpty(Cells(i, j)) Or Not (IsNumeric(Cells(i, j)))) Then k = 1 'black ElseIf Cells(i, j).Value > 100 Then k = 33 'red ElseIf Cells(i, j).Value > 75 Then k = 34 'orange-red ElseIf Cells(i, j).Value > 50 Then k = 35 'orange ElseIf Cells(i, j).Value > 25 Then k = 36 'orange-yellow ElseIf Cells(i, j).Value > 10 Then k = 37 'yellow Else k = 2 'white End If Cells(i, j).Select With Selection.Interior .ColorIndex = k .Pattern = xlSolid End With Next j Next i End Sub |
|
|||||||||||||||||
Last Modified by A.Honegger |