Navigation Banner
 

CreateFilter Batch language command
  Used to select portions of data sets for inclusion in analyses. 'datasetid' is the identifier of the data set to filter. 'unit' is the size of the basic state for analyses in terms of the charchter length.
Syntax  DataSetFilter dataSetFilterid = CreateFilter (datasetid,unit,vertical partition, horizontal partition, alphabet exclusions);
Notes Upon successful completion of this command, 4 variables are automatically created:
- dataSetFilterid species : number of species in the data set
- dataSetFilterid.sites: number of sites(columns) in the data set
- dataSetFilterid.unique_sites: number of unique sites in the data set,
dataSetFilterid.site_freqs: the vector of dimension dataSetFilterid.unique_sites, which contains the count of sites of type i, in cell i.

E.g., to use codons in analysis of nucleotide data, specify, unit to be 3. Vertical partition designates the sites to be used in analysis. Leaving it blank: "" includes all the sites.

datasetid must refer to an existing data set or a data set filter 'unit' is a positive integer. The last three arguments are optional.

Acceptable partition formats:
1). Explicit list:"0,1,4,5,10", includes sites 1,2,5,6,11 in analysis.
2). Intervals:"0-99", includes sites 1 through 100 in analysis.
3). Paired intervals:"0-9&20-29" includes sites 1,21,2,22,..,10,30 in analysis.
4). Composite:"0-5,7,10-15&20-25".
5). Boolean expression in terms of siteIndex. Includes all sites whose index renders the expression true.
6). Combs: for example "<011>" will select every 2nd and 3rd element of each triplet, "<10101>" - every 1st, 3rd and 5th element of each quintuplet.

The foregoing is also true for horizontal partition, with the exception of item 5, where siteIndex, should be replaced with species index.
Alphabet exclusions is a comma separated list of state not to be allowed in analysis.

Examples
DataSetFilter dsf = CreateFilter (ds,3,"","","TAA,TGA,TAG");

DataSetFilter dsf = CreateFilter (ds,1,"0-100");

DataSetFilter dsf = CreateFilter (ds,1,(siteIndex%3)==0);

 Last modified: 9/3/2002

 
Sergei L. Kosakovsky Pond and Spencer V. Muse, 1997-2002