Macro RSA_ExtractSeqxxx. Usage:
Cauton:
Sub Rsa_ExtractSeq() ' Assumption: sheet "SEQ" contains molecule labels in first row, starting in first column, ' followed by residue labels (3-letter-code in vertical table); as defined by "collect" ' Converts this to alignment format (1-letter-code in horizontal table, max. 250 residues/line) For i = 1 To 256 Step 1 If IsEmpty(Sheets("Files").Cells(i, 1)) Then Exit For Sheets("Alig").Cells(i, 1) = Sheets("SEQ").Cells(1, i) For j = 3 To 160 Step 1 'length of sequence AA = Sheets("SEQ").Cells(j, i) If AA Like "" Then AA = "." ElseIf AA Like "ALA" Then AA = "A" ElseIf AA Like "CYS" Then AA = "C" ElseIf AA Like "ASP" Then AA = "D" ElseIf AA Like "GLU" Then AA = "E" ElseIf AA Like "PHE" Then AA = "F" ElseIf AA Like "GLY" Then AA = "G" ElseIf AA Like "HIS" Then AA = "H" ElseIf AA Like "ILE" Then AA = "I" ElseIf AA Like "LYS" Then AA = "K" ElseIf AA Like "LEU" Then AA = "L" ElseIf AA Like "MET" Then AA = "M" ElseIf AA Like "ASN" Then AA = "N" ElseIf AA Like "PRO" Then AA = "P" ElseIf AA Like "GLN" Then AA = "Q" ElseIf AA Like "ARG" Then AA = "R" ElseIf AA Like "SER" Then AA = "S" ElseIf AA Like "THR" Then AA = "T" ElseIf AA Like "VAL" Then AA = "V" ElseIf AA Like "TRP" Then AA = "W" ElseIf AA Like "TYR" Then AA = "Y" ElseIf AA Like "ASX" Then AA = "B" ElseIf AA Like "GLX" Then AA = "X" Else: AA = "?" End If Sheets("Alig").Cells(i, j) = AA Next j Next i End Sub |
|
|||||||||||||||||
Last Modified by A.Honegger |