Navigation Banner
  next up previous
Next: Tabulate or define frequencies Up: Simple Batch Files Previous: Read a data file.

Select the species and characters to be analyzed (Filter the data)

The line of code
DataSetFilter myFilter = CreateFilter (myData,1);
performs two important tasks. First, it selects the precise data elements from myData that we want to use for our analysis. In this case, we use all of the data by default by ignoring some optional arguments to the CreateFilter command. See Chapter 5. to learn more about the features of CreateFilter. The second important task is to let Hy-Phy know how we want to "interpret" the data. The argument "1" indicates that each individual nucleotide is to be treated as a single character. Had we instead used "3", each consecutive triplet of nucleotides would be considered as a "character". Obviously, this type of filtering might be of use for analyzing codon data. If one wanted to analyze dinucleotides, the second argument to CreateFilter would be "2". Note that multiple data set filters can be created from a single data set. We will see several examples of creating data set filters in later examples.


next up previous
Next: Tabulate or define frequencies Up: Simple Batch Files Previous: Read a data file.
Spencer Muse
2000-05-31
 
Sergei L. Kosakovsky Pond and Spencer V. Muse, 1997-2002