IntroductionNumberingSequencesStructuresModellingMacrosPublicationsLinks
ColoringSequence StatisticsRenumberingAccessibilityTorsion AnglesStructural VariabilityHydrogen BondsDownloads

Macro PDB_GapFromAlig

xxx.

Usage:

  • xxx
  • xxx

Cauton:

xxx

Sub PDB_GapFromAlig()

'Gaps the sequence, labels, chain and insertion code worksheets as defined
'by the gaps in the sequence alignment worksheet
'Changes Chain, Residue Label and Insertion Code to the value indicated
'in the header rows  of the alignment

    For i = 3 To 255                                                            'transfer header information
        If IsEmpty(Worksheets("Alig").Cells(2, i)) Then Exit For
        Worksheets("Seq").Cells(i, 1) = Worksheets("Alig").Cells(1, i)
        Worksheets("Seq").Cells(i, 2) = Worksheets("Alig").Cells(2, i)
        Worksheets("Seq").Cells(i, 3) = Worksheets("Alig").Cells(3, i)
    Next i

    For i = 3 To 255 Step 1                                                     'for all sequences in the alignment
        If IsEmpty(Worksheets("Alig").Cells(i, 1)) Then Exit For                'alignment finished
    
        For j = 3 To 255 Step 1                                                 'for all positiona in the sequence
            If IsEmpty(Worksheets("Alig").Cells(i, j)) Then Exit For            'sequence finished
            
            If Worksheets("Alig").Cells(i, j) Like "." Then                     'gap position
                Worksheets("Seq").Cells(j, i).Insert Shift:=xlDown
                Worksheets("Seq").Cells(j, i) = "."
                Worksheets("Label").Cells(j, i).Insert Shift:=xlDown
                Worksheets("Label").Cells(j, i) = "."
                Worksheets("Chain").Cells(j, i).Insert Shift:=xlDown
                Worksheets("Chain").Cells(j, i) = "."
                Worksheets("Insert").Cells(j, i).Insert Shift:=xlDown
                Worksheets("Chain").Cells(j, i) = "."
            Else                                                                'sequence position
                Worksheets("Chain").Cells(j, i) = Worksheets("Alig").Cells(1, j)
                Worksheets("Label").Cells(j, i) = Worksheets("Alig").Cells(2, j)
                Worksheets("Insert").Cells(j, i) = Worksheets("Alig").Cells(3, j)
            End If
            
        Next j
        
    Next i
    
End Sub



Sub RSA_GapFromAlig1()

    For i = 1 To 255 Step 1
        If IsEmpty(Sheets("Alig_vl").Cells(i, 1)) Then Exit For
    
        For j = 3 To 153 Step 1
            If Sheets("Alig_vl").Cells(i, j) Like "." Then
                Worksheets("Label").Cells(j, i).Insert Shift:=xlDown
                Worksheets("SEQ").Cells(j, i).Insert Shift:=xlDown
                Worksheets("All Abs.").Cells(j, i).Insert Shift:=xlDown
                Worksheets("All Rel.").Cells(j, i).Insert Shift:=xlDown
                Worksheets("NonPol sc Abs.").Cells(j, i).Insert Shift:=xlDown
                Worksheets("NonPol sc Rel.").Cells(j, i).Insert Shift:=xlDown
                Worksheets("Pol sc Abs.").Cells(j, i).Insert Shift:=xlDown
                Worksheets("Pol sc Rel.").Cells(j, i).Insert Shift:=xlDown
                Worksheets("all sc Abs.").Cells(j, i).Insert Shift:=xlDown
                Worksheets("all sc Rel.").Cells(j, i).Insert Shift:=xlDown
                Worksheets("mc Abs.").Cells(j, i).Insert Shift:=xlDown
                Worksheets("mc Rel.").Cells(j, i).Insert Shift:=xlDown
            End If
        Next j
'
        For j = 3 To 153 Step 1
            If Sheets("Alig_vh").Cells(i, j) Like "." Then
                Worksheets("Label").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("SEQ").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("All Abs.").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("All Rel.").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("NonPol sc Abs.").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("NonPol sc Rel.").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("Pol sc Abs.").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("Pol sc Rel.").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("all sc Abs.").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("all sc Rel.").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("mc Abs.").Cells(j + 151, i).Insert Shift:=xlDown
                Worksheets("mc Rel.").Cells(j + 151, i).Insert Shift:=xlDown
            End If
        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