IntroductionNumberingSequencesStructuresModellingMacrosPublicationsLinks
ColoringSequence StatisticsRenumberingAccessibilityTorsion AnglesStructural VariabilityHydrogen BondsDownloads

Macro AA_FreqDistribute

rearranges a series of tables generated by AA_Frequency in such a way that the results for each residue position are collected in a separate table on a separate worksheet

Usage:

  • Copy-and-Paste the different frequency tables onto the first worksheet of a new workbook, in such a way that the corresponding residues of the different tables are in the same column
  • Call this worksheet "Freq"
  • Select "Macro" in the "Tool" menu
  • Run macro AA_FreqDistribute
Sub AA_FreqDistribute()

' Assumption: You have N Frequency-Tables on a worksheet named "Freq", one below the other
' the first one starts in row 1, the second one in row M+1, the third in row 2M+1.
' The first column indicates the content of the row.
' Instead of having each frequency table showing the AA-Frequency as a function of residue number,
' you want to collect the data belonging to one particular residue number in all frequency tables into one table,
' on a separate worksheet

N = 10 'number of tables, change this value if you have a different number of tables
M = 30 'number of rows per table, change this value if you have a different length of the individual tables

For i = 151 To 1 Step -1
    Sheets.Add
    aaa = "Residue_" & (i - 1)
    ActiveSheet.Name = aaa
    
    For j = 1 To N
        Worksheets("VH").Activate
        Range(Cells(M * (j - 1) + 1, i + 1), Cells(M * j, i + 1)).Select
        Selection.Copy
        
        Worksheets(aaa).Activate
        Range(Cells(1, j + 1), Cells(M, j + 1)).Select
        ActiveSheet.Paste
    Next j
    
Next i

End Sub

AAAAA Homepage Zürich University Dept. of Biochemistry Plückthun Group Annemarie Honegger

Last Modified by A.Honegger Wednesday, January 26, 2005