CADDIS Volume 4: Data Analysis
Predicting Environmental Conditions from Biological Observations (PECBO) Appendix
- Using Existing Taxon-Environment
- Estimating Taxon-Environment
- Computing Inferences
- R Scripts
Topics in Using Existing Taxon-Environment Relationships
Assign Operational Taxonomic Units (OTUs)
Operational taxonomic units (OTUs) are assigned to the taxa observed in the local benthic data. OTUs are required for two reasons. First, taxon-environment relationships are only available for a subset of the taxa. For example, if a taxon-environment relationship is not available for a particular species, information might be available at the genus level. The OTU for that species would then be downgraded to a genus-level identification. Second, OTUs are assigned to prevent double-counting particular individuals. For example, if a species is identified as being present in a sample, we would want to ensure that coarser taxonomic identifications (e.g., genus or family) for that same individual are not accounted for separately.
Instructions for assigning OTUs:
Check that you have loaded the biological inference library and a taxon-environment coefficient file.
To load the biological inference library, type at the R prompt:
A file starting with
coef.west.wt) should have been loaded when you set up your workspace (see Step 6 on the Download Files page).
Run the R script that assigns OTU.
Type at the R prompt:
bcnt.otu <- get.otu(bcnt.tax, coef.west.wt)
This command runs the R script
get.otuand stores the results in the data frame
bcnt.otu. Two data sets are required as input to the script, the benthic count file with taxonomic hierarchy information that is output from
bcnt.tax) and the list of taxa names for which taxon-environment information is available. The list of taxa names is a field in each
coeffile and is accessed by the script.
A summary table of the assigned OTUs is provided is provided in
sum.otu.txt. This file can be reviewed using any spreadsheet or text viewer.
From the spreadsheet, the user can manually edit the
sum.otu.txtfile if desired. The revised file should be saved as tab-delimited text. Then from the R command line, type the following command:
bcnt.otu.revised <- load.revised.otu()
The script will prompt you to enter the name of the text file where you have saved the changes to the OTU designations (e.g.,
sum.otu.txt), and it will prompt you to enter the name of the original benthic count file with assigned OTUs (e.g.,
bcnt.otu). The revised benthic count OTU file is saved as