Skip to content

Commit

Permalink
Post review edits (#26)
Browse files Browse the repository at this point in the history
Structural changes:
*  removing all mapping to OWL classes
*  indicating that matches to databases, thesauruses without actually resolvable identifies are examples not skos:exactMatch, etc.
*  adding all SWEET sub-namespaces to namespace declaration
*  in APD_traits_input.csv, collapsing multiple columns (e.g. measured_structure_1, measured_structure_2, etc.) into a single ;-delimited column; this allows an undefined number of values for each field
    corresponding changes made to R-scripts to build rdf representations, website from the new csv format

Create using_the_APD.qmd
* creating a document with sample code to explore/use the APD

Minor changes to traits:
* adding many additional mapping to Plant Trait Ontology, Crop Ontology,  FLOPO, EnvThes
* adding 3 new traits (bud_length, bud_width, buds_per_inflorescence)
* edits to plant_growth form and woodiness, based on review of Complete Traits manuscript
* incorporate suggested changes from @reykt (issue #24, issue #25)
---------

Co-authored-by: Daniel Falster <[email protected]>
  • Loading branch information
ehwenk and dfalster authored May 3, 2024
1 parent 82c9b6f commit f2aa2c5
Show file tree
Hide file tree
Showing 24 changed files with 28,803 additions and 64,648 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@

*.rmarkdown
*.docx
*.tex
*.pdf
*_files
build.html
factsheets
ignore
.Rproj.user
Expand Down
34,402 changes: 8,243 additions & 26,159 deletions APD.json

Large diffs are not rendered by default.

17,714 changes: 5,920 additions & 11,794 deletions APD.nq

Large diffs are not rendered by default.

17,714 changes: 5,920 additions & 11,794 deletions APD.nt

Large diffs are not rendered by default.

11,481 changes: 3,630 additions & 7,851 deletions APD.ttl

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions APD_categorical_values.csv
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ palmoid,plant_growth_form,"Plant that bears a rosette-like canopy of typically l
climber,plant_growth_form,"Plant that climbs up another plant's stem or branches, rather than being able to support itself. Term used only if datasets do not specify if a climbing plant is herbaceous (a vine) or woody (a liana).",NA,plant_growth_form_climber
climber_herbaceous,plant_growth_form,"Herbaceous plant that climbs up another plant's stem or branches, rather than being able to support itself. This is usually synonymous with `vine`. Types of climbers (scrambling, twining) are captured under the trait `plant_climbing_mechanism`.",vine,plant_growth_form_climber_herbaceous
climber_woody,plant_growth_form,"Woody or thick-stemmed (>2 cm) plant that climbs up another plant's stem or branches, rather than being able to support itself. This is usually synonymous with `liana`. Woody climbers generally use hooks, tendrils, and/or adventitious roots to climb; the climbing mechanisms used by a taxon are captured under the trait `plant_climbing_mechanism`.",liana,plant_growth_form_climber_woody
fern,plant_growth_form,A taxonomic grouping; ferns are vascular plants that reproduce via spores.,NA,plant_growth_form_fern
lycophyte,plant_growth_form,"A taxonomic grouping that includes quillworts, clubmosses, and selaginella.",NA,plant_growth_form_lycophyte
fern,plant_growth_form,A taxonomic grouping that includes acaulescent ferns; ferns are vascular plants that reproduce via spores and have neither seeds nor flowers.,NA,plant_growth_form_fern
lycophyte,plant_growth_form,"A taxonomic grouping that includes quillworts, clubmosses, and spike mosses.",NA,plant_growth_form_lycophyte
succulent_stems,plant_succulence,Stems are thick and fleshy.,NA,plant_succulence_succulent_stems
succulent_leaves,plant_succulence,Leaves are thick and fleshy.,NA,plant_succulence_succulent_leaves
succulent,plant_succulence,A plant is designated as succulent but it is not specified which tissues are thick and fleshy.,NA,plant_succulence_succulent
Expand Down Expand Up @@ -793,4 +793,4 @@ woody_base,woodiness_detailed,Plant where secondary xylem (true wood) is present
woody_root,woodiness_detailed,Plant that has a woody rootstock but non-woody above-ground stems.,NA,woodiness_detailed_woody_root
semi_woody,woodiness_detailed,"Plant that forms stems considered only ""partially woody"", generally having lower lignin and cellulose contents and possibly not forming secondary xylem. These are generally short-lived, fast-growing stems.","green-stem shrub, soft shrub, soft wood",woodiness_detailed_semi_woody
woody_like_stem,woodiness_detailed,"Taxa, including monocots and ferns, that produce thick, stiff, robust lignified stems but do not produce secondary xylem.",NA,woodiness_detailed_woody_like_stem
woody_like_inflorescence,woodiness_detailed,"Taxa, including monocots and ferns, that produce thick, stiff, robust lignified inflorescence shoots but are otherwise non-woody.",NA,woodiness_detailed_woody_like_inflorescence
woody_like_inflorescence,woodiness_detailed,"Taxa, including monocots, that produce thick, stiff, robust lignified inflorescence shoots but are otherwise non-woody.",NA,woodiness_detailed_woody_like_inflorescence
1,043 changes: 523 additions & 520 deletions APD_traits.csv

Large diffs are not rendered by default.

8,477 changes: 3,199 additions & 5,278 deletions APD_triples.csv

Large diffs are not rendered by default.

231 changes: 64 additions & 167 deletions R/convert_to_triples.R

Large diffs are not rendered by default.

28 changes: 23 additions & 5 deletions R/create_APD_trait_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ create_APD_trait_table <- function(thistrait, triples_with_labels) {

output <-
add_row(output,
make_link("comments","http://www.w3.org/2000/01/rdf-schema#comment"),
make_link("comments","http://www.w3.org/2004/02/skos/core#note"),
comments_tmp$value_link
)

Expand Down Expand Up @@ -141,13 +141,13 @@ create_APD_trait_table <- function(thistrait, triples_with_labels) {
print_list2(grouping$value_link)
)

# measured entity (has context object)
context_object <- trait_i %>% filter(property == "has context object")
# measured entity (plant structure)
plant_structure <- trait_i %>% filter(property == "plant structure")

output <-
add_row(output,
context_object$property_link,
print_list2(context_object$value_link)
plant_structure$property_link,
print_list2(plant_structure$value_link)
)

# measured characteristic
Expand Down Expand Up @@ -216,6 +216,15 @@ create_APD_trait_table <- function(thistrait, triples_with_labels) {
print_list2(related_match$value_link)
)

# examples (matches that are literals/strings)
examples <- trait_i %>% filter(property == "example")

output <-
add_row(output,
make_link("examples", "http://www.w3.org/2004/02/skos/core#example"),
print_list2(examples$value_link)
)

# references
references_tmp <- trait_i %>% filter(property == "references")

Expand All @@ -238,6 +247,15 @@ create_APD_trait_table <- function(thistrait, triples_with_labels) {
make_link("date created","http://purl.org/dc/terms/created"),
date_created$value_link
)

# date modified
date_modified <- trait_i %>% filter(property == "date modified")

output <-
add_row(output,
make_link("date modified","http://purl.org/dc/terms/modified"),
date_modified$value_link
)

# date reviewed
date_reviewed <- trait_i %>% filter(property == "date reviewed")
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,19 @@ This repository is the original source for the APD. It includes

## Data files and format

10 files are stored in `data/` and are used to generate the APD. These files are:
11 files are stored in `data/` and are used to generate the APD. These files are:

* `APD_traits.csv`: The core table of trait definitions.
* `APD_trait_hierarchy.csv`: A table documenting a trait hierarchy into which traits in the APD are mapped.
* `APD_categorical_values.csv`: A table of allowable categorical trait values for categorical traits within the APD.
* `APD_traits_input.csv`: The core table of trait definitions.
* `APD_trait_hierarchy.csv`: Table documenting a trait hierarchy into which traits in the APD are mapped.
* `APD_categorical_values_input.csv`: Table of allowable categorical trait values for categorical traits within the APD.
* `APD_glossary.csv`: Table of technical vocabulary used for APD trait definitions and keywords which were not located in previously published vocabularies and ontologies.
* `APD_references.csv`: Table of references used in the APD, including dois and complete reference details.
* `APD_reviewers.csv`: Table of people who have reviewed trait definitions for the APD, identified by their ORCIDs.
* `APD_units.csv`: Table of units used in the APD, including links in the Units of Measurement ontology.
* `ontology_links.csv`: Table of terms used in the APD as keywords, measured characteristics, and value types that come from a published ontology.
* `APD_annotation_properties.csv`: Table of annotation properties that come from a published ontology and are used in the APD.
* `APD_namespace_declaration.csv`: Table of all ontologies used within APD. These may be ontologies with annotation properties used by the APD (and listed in annotation_properties.csv) or with terms (classes) used by the APD (and listed in ontology_links.csv) .
* `ontology_rules.txt`: List of rules to merge the above 9 data tables into a single ontology.
* `APD_resource.csv`: Information about the two APD resources, APD/traits and APD/glossary
* `published_classes.csv`: List of published terms references as keywords (or similar) within the APD.
* `published_classes.csv`: List of published terms referenced as keywords (or similar) within the APD.

Each trait includes the following fields:

Expand All @@ -43,10 +42,13 @@ Each trait includes the following fields:
* allowable trait values (for categorical traits; all trait values are themselves defined)
* trait definition (A definition with technical terms linked to published ontologies as well as, when applicable, longer definitions and comments
* keywords
* structure measured (what plant part is measured, referencing a specific tissue, organ, or the whole plant)
* characteristic measured, such as whether the trait records `mass`, `shape`, `length`, etc.
* a trait hierarchy
* references
* names/ORCIDs of people who have reviewed the trait definition
* links to identical/similar/related traits in other plant trait databases
* dates the trait was first added, most recently modified, and reviewed

## Instructions for building the APD

Expand All @@ -60,7 +62,7 @@ The code in `build.qmd` builds the APD from the data files in `data/`, including
- create the APD website, saved in `docs/`
- hosting via Github pages at <https://traitecoevo.github.io/APD/>
- created from files `index.qmd` and configured with `_quarto.yml`
- uses the `quarto` package for R, with instructions on formating from <https://quarto.org/docs/reference/projects/websites.html
- uses the `quarto` package for R, with instructions on formatting from <https://quarto.org/docs/reference/projects/websites.html
- we were inspired by <https://i-adopt.github.io> with code from <https://github.com/i-adopt/i-adopt.github.io>

The APD is accessible via <https://w3id.org/APD/>, <https://w3id.org/APD/traits/>, and <https://w3id.org/APD/glossary/>. These links redirect to the site generated here. To enable the links, we sent a pull request to the [w3id.org repo](https://github.com/perma-id/w3id.org/), like this example from <https://github.com/perma-id/w3id.org/blob/master/iadopt/>.
Expand Down
9 changes: 6 additions & 3 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ project:
output-dir: docs
render:
- index.qmd
- using_APD.qmd

website:
title: "APD"
Expand All @@ -23,10 +24,12 @@ website:

navbar:
left:
- href: index.qmd
- href: index.html
text: Home
# - href: index.qmd
# text: ARDC RVA endpoint
- href: using_APD.html
text: Using the APD
- href: https://vocabs.ardc.edu.au/viewById/649
text: ARDC RVA endpoint

right:
- icon: github
Expand Down
Loading

0 comments on commit f2aa2c5

Please sign in to comment.