Macro PDB_GapFromSeqxxx. Usage:
Cauton:
Sub PDB_GapFromSeq() 'Gaps the labels, chain and insertion code worksheets as defined by the gaps in the sequence worksheet 'Changes Chain, Residue Label and Insertion Code to the value indicated 'in the header columns of the alignment For i = 3 To 255 Step 1 'for all sequences in the alignment If IsEmpty(Sheets("Seq").Cells(1, i)) Then Exit For 'alignment finished For j = 3 To 1000 Step 1 'for all positiona in the sequence If IsEmpty(Sheets("Seq").Cells(j, i)) Then Exit For 'sequence finished If Sheets("Seq").Cells(j, i) Like "." Then 'gap position 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("Seq").Cells(j, 1) Worksheets("Label").Cells(j, i) = Worksheets("Seq").Cells(j, 2) Worksheets("Insert").Cells(j, i) = Worksheets("Seq").Cells(j, 3) End If Next j Next i End Sub |
|
|||||||||||||||||
Last Modified by A.Honegger |