Skip to content

Commit

Permalink
finding and trying to fix another taxize-plant list bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wcornwell committed Jun 10, 2015
1 parent 4a63db0 commit 50b33bd
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: taxonlookup
Title: A dynamically-updating versioned taxonomic resource for vascular plants
Version: 0.3.0
Version: 0.3.1
Description: This is a taxon lookup table for land plants. It is built from a set of scripts that dynamically build a versioned genus-family-order-higher taxa lookup table from canonical sources on the web. It uses semantic versioning to keep track of changes.
Depends: R (>= 3.1.0)
License: BSD_2_clause + file LICENSE
Expand Down
4 changes: 4 additions & 0 deletions createlookup.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ matchPlantListFamiliesToApweb<-function(tplGenera){
tplGenera$order[tplGenera$family %in% c("Leiosporocerotaceae", "Anthocerotaceae", "Notothyladaceae","Phymatocerotaceae","Dendrocerotaceae")]<-"undetermined_hornwort_order"
#and the liverworts
tplGenera$order[tplGenera$family %in% read.delim("source_data/liverwortFamilies.txt",header=FALSE)$V1]<-"undetermined_liverwort_order"
#temporary: adjusting for a taxize bug
tplGenera$order[tplGenera$family=="Eriocaulaceae"]<-"Poales"

#setting up a seperate column with ApWeb synonymy
tplGenera$apweb.family<-tplGenera$family
badFamilies<-unique(tplGenera$apweb.family[!tplGenera$apweb.family%in%apFamilies$acceptedFamilies&tplGenera$group!="Bryophytes"&tplGenera$apweb.family%in%apFamilies$family])
tplGenera$apweb.family[tplGenera$apweb.family%in%badFamilies]<-apFamilies$synonym[match(tplGenera$apweb.family,apFamilies$family)][tplGenera$apweb.family%in%badFamilies]
Expand Down
8 changes: 5 additions & 3 deletions man/add_higher_order.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ add_higher_order(lookup = plant_lookup(include_counts = TRUE),
corresponds to taxonomic order.}
}
\description{
Augment the genus-family-order lookup table with plant higher order data, from
Augment the genus-family-order lookup table with plant higher taxa data, from
http://datadryad.org/resource/doi:10.5061/dryad.63q27
}
\details{
Data for the higher-level taxonomy lookup (http://datadryad.org/resource/doi:10.5061/dryad.63q27.2/1.1) compiled by Dave Tank and colleagues

The format of the lookup is that higher nodes are columns within the data.frame.
Because of the currently non-nested structure of higher clade information for plants,
the format of the lookup is also not nested.
In the lookup the higher nodes are columns within the data.frame.
If a genus is a descendent of a particular node, the row for that genus repeats
the node name. If a genus is not a descendent of that particular node, the cell is left blank.
the node name (which is also the column name). If a genus is not a descendent of that particular node, the cell is left blank.
}
\examples{
##' # see the format of the resource
Expand Down
24 changes: 15 additions & 9 deletions man/plant_lookup.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
\title{Plant lookup table}
\usage{
plant_lookup(version = plant_lookup_version_current(),
include_counts = FALSE)
include_counts = FALSE, family.tax = "apweb")

plant_lookup_versions(type = "local")

Expand All @@ -27,6 +27,11 @@ to the package if you have never downloaded the data before. With
"accepted" species within each genus counts as
\code{number.of.species}.}

\item{family.tax}{= the value "ap.web" will return the family names from apweb
otherwise the lookup will include the family names from the plant list.
Currently there are 8 family names that differ between the two sources.
\code{family.tax}.}

\item{type}{Type of version to return: options are "local"
(versions installed locally) or "github" (versions available on
github). With any luck, "github" is a superset of "local".}
Expand All @@ -37,22 +42,23 @@ number of species in each genus. Data persists across package
installations.
}
\details{
The data for this lookup primarily comes from two sources:
The data within this lookup table comes from two sources:

1. The Plant List v1.1. (http://www.theplantlist.org/) for
accepted genera to families and species richness within each
genera. Note that we do not consider hybrids (e.g. Genus x
species) as species for this count while the plant list summary
genera. Note that we do not consider hybrids (e.g. Genus X
species) as distinct species for this count while the plant list summary
statistics do, so the the counts from this package will not line up exactly
with the ones on the TPL website.

2. APWeb (http://www.mobot.org/MOBOT/research/APweb/) for family
level synonymies and family-to-order for all vascular plant families.
2. APWeb (http://www.mobot.org/MOBOT/research/APweb/) for family-level
synonymies and family-to-order for all vascular plant families.
Note that there is not currently order-level information available for Bryophytes.

3. We correct some spelling
errors, special character issues, genera listed in multiple families,
and a few other errors from The Plant List.
These data are then currated--we correct some spelling
errors, special character issues, genera listed in multiple families, family-level synonomy,
and other issues that arise in assembling a resources like this. Details of the curration
are at https://github.com/wcornwell/taxonlookup
}
\examples{
#
Expand Down

0 comments on commit 50b33bd

Please sign in to comment.