Skip to content

Select This Seq Region Macro

Ariel Vina-Rodriguez edited this page May 28, 2016 · 1 revision

Often you will want to select all the sequences that you may use to classify some selected sequence. You can do that by setting in the sheet "Regions" the beginning and end positions in the alignment of that sequence. This will set to true the "span" column of every sequence that span the same region of the alignment, and thus can be used together to build a classification tree.

The macro "SelectThisSeqRegion" creates a group file to select all sequences that span the same region that the selected sequence.

Let you want to analyze a sequence that you have just enter in the big alignment. You have already inserted a row in the large table with the correct name (the same as in the alignment used in MEGA) and with the position of beginning and end of the sequence in the alignment. You now need to set the region and export the column "span" into a group file.

With this macro you just click on the sequences row to select it entirely and then press Ctrl-r. This macro first transfers the beginning and end of the selected sequence to the sheet "Region", and sets the option "manual selection" there to trigger the selection of all the sequences which span the same region of the alignment. Then it copy the "span" column to a new workbook for which may create a directory Aut.MEGA\ if not yet exist. Before closing the new workbook, it is saved as a text file with a name that show the region selected.