├── .Rhistory ├── CITATION.md ├── LICENSE ├── METADATA.md ├── README.md └── ShareTrait_DB └── v1.0.0 ├── 1_compilation ├── .RData ├── .Rhistory └── 1_compilation.r ├── 2_standardisation ├── .RData ├── .Rhistory ├── 2_1_data_wrangling.r ├── 2_2_trait_units.r ├── 2_3_harmonize_taxonomy.r └── 2_4_citations.r ├── 3_release ├── .RData ├── .Rhistory ├── 3_1_Global_map_ShareTrait.r ├── 3_2_Phylogenetic_tree_ShareTrait.r ├── 3_3_Exploratory_plots_ShareTrait.r ├── Global_map.html ├── Global_map_ShareTrait_DataBase_v1.0.0.jpg ├── Metabolism_Development_Fecundity_v1.0.0.jpg ├── NaturalEarth.RData ├── Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.jpg ├── Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.tre ├── ShareTrait_DataBase_refs_v1.0.0.bib ├── ShareTrait_DataBase_v1.0.0.csv └── ShareTrait_MetaData_v1.0.0.csv ├── cleaned_data ├── development │ ├── Alfaro_Tapia_et_al_2022_cleaned.csv │ ├── Burraco_et_al_2020_cleaned.csv │ ├── Burraco_et_al_2021_cleaned.csv │ ├── Castañeda_and_Nespolo_2013_cleaned (2).csv │ ├── Castañeda_and_Nespolo_2013_cleaned.csv │ ├── Hermaniuk_et_al_2016_cleaned (2).csv │ ├── Hermaniuk_et_al_2016_cleaned.csv │ ├── Jerbi_Elayed_et_al_2022_cleaned.csv │ ├── Jorissen_et_al_2023_cleaned.csv │ ├── Le_Lann_et_al_2014_cleaned.csv │ ├── Saeed_et_al_2021_cleaned.csv │ ├── Semsar-kazerouni_et_al_2022_cleaned.csv │ ├── Shameer_et_al_2018_cleaned.csv │ ├── Tougeron_et_al_2020_cleaned.csv │ ├── Tougeron_et_al_2021_cleaned (2).csv │ ├── Tougeron_et_al_2021_cleaned.csv │ └── van_Dis_et_al_2021_cleaned.csv ├── fecundity │ ├── Alfaro_Tapia_et_al_2022_cleaned.csv │ ├── Gebauer_et_al_2007_cleaned.csv │ ├── Hoffer_et_al_2012_cleaned.csv │ ├── Jerbi_Elayed_et_al_2021_cleaned.csv │ ├── Jerbi_Elayed_et_al_2022_cleaned.csv │ ├── Keinan_et_al_2017_cleaned.csv │ ├── Le_Goff_et_al_2021_cleaned.csv │ ├── Le_Lann_et_al_2014_cleaned.csv │ ├── Mesas_and_Castañeda_2023_cleaned.csv │ ├── Molinet_et_al_2023_cleaned.csv │ ├── Saeed_et_al_2021_cleaned.csv │ ├── Tougeron_et_al_2021_cleaned.csv │ ├── Tuni_et_al_2016_cleaned.csv │ └── Vogels_et_al_2021_cleaned.csv └── metabolic_rate │ ├── Barneche_et_al_2019_cleaned.csv │ ├── Castañeda_and_Nespolo_2013_cleaned.csv │ ├── Gomez_Isaza_et_al_2020_1_cleaned.csv │ ├── Gomez_Isaza_et_al_2020_2_cleaned.csv │ ├── Hermaniuk_et_al_2017_cleaned.csv │ ├── Hermaniuk_et_al_2021_cleaned.csv │ ├── Le_Lann_et_al_2014_cleaned.csv │ ├── Leiva_et_al_2015_cleaned.csv │ ├── Leiva_et_al_2016_cleaned.csv │ ├── Leiva_et_al_2018_cleaned.csv │ ├── Mesas_and_Castañeda_2023_cleaned.csv │ ├── Shokri_et_al_2022_cleaned.csv │ ├── Verberk_and_Bilton_2015_cleaned.csv │ ├── Wu_et_al_2015_cleaned.csv │ ├── Wu_et_al_2018_cleaned.csv │ ├── Wu_et_al_2022_cleaned.csv │ └── vandePol_unpublished_cleaned.csv └── outputs ├── .RData ├── .Rhistory ├── 1_1_compilation_R_session.txt ├── 2_1_ShareTrait_Database.csv ├── 2_1_standarisation_R_session.txt ├── 2_2_ShareTrait_DataBase.csv ├── 2_2_trait_units_R_session.txt ├── 2_3_harmonize_taxonomy_R_session.txt ├── 2_3_harmonized_taxonomy_ShareTrait.csv ├── 2_4_citations_R_session.txt ├── 3_1_Global_map_ShareTrait_R_session.txt ├── 3_2_Phylogenetic_tree_ShareTrait_R_session.txt ├── 3_3_Exploratory_plots_ShareTrait.txt ├── Retrieve_taxonomy.R ├── ShareTrait_Development.csv ├── ShareTrait_Fecundity.csv ├── ShareTrait_Metabolic_Rates.csv ├── dfnames.gbif.txt ├── dfnames.itis.txt └── dfnames.ncbi.txt /.Rhistory: -------------------------------------------------------------------------------- 1 | ## Former member of ShareTrait 2 | - [Félix P. Leiva](https://github.com/felixpleiva) 3 | -------------------------------------------------------------------------------- /CITATION.md: -------------------------------------------------------------------------------- 1 | ## Cite the repository as: 2 | Leiva FP, Barneche D, Blackburn T, Castañeda L, Chown S, Gaitán-Espitia JD, Gebauer P, Gomez Isaza DF, Hardy ICW, Hermaniuk A, Hirst A, Jorissen S, Keasar T, Koene J, Le Lann C, Molinet C, Niklitschek EJ, Oliveira B, Orizaola G, Pilakouta N, Shameer KS, Shokri M, Stoks R, Tougeron K, Tuni C, van de Pol ILE, van Dis NE, Visser B, Vogels J, White CR, Wu N, Berg MP, Ellers J, Verberk WCEP. (2023). ShareTrait: a data portal for making trait data interoperable and reusable. Zenodo (v1.0.0). https://doi.org/10.5281/zenodo.8138904 3 | 4 | ## Further information 5 | Check out our [![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/share.svg?style=social&label=Follow%20%40share_trait)](https://twitter.com/share_trait). If you have questions concerning the project, please get in touch with the lead author of this initiative Félix P Leiva by e-mail at felixpleiva@gmail.com, or the principal investigator, Wilco Verberk, by e-mail at w.verberk@science.ru.nl. 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 ShareTraitProject 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /METADATA.md: -------------------------------------------------------------------------------- 1 | ## Notes 2 | All processing was done in R. The R folder contains the scripts, numbered consecutively, to reproduce the analyzes and generate tables and figures presented in the manuscript. The outputs folder contains the output files of each R script. 3 | 4 | ## R packages 5 | The software and R packages associated with each script are enlisted in the corresponding R session file. 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## About ShareTrait 2 | More and more data are being collected on species traits, as a means to understand how species respond and interact with their environment. Despite these 3 | efforts, effective integration of such data is hampered by inadequate standardization and insufficient sharing of metadata. The **ShareTrait** project will streamline the collection, synthesis and reuse of data on key species traits (metabolic rate, development and fecundity). By developing pipelines for data reformatting and standardization, we will enable individual researchers to easily contribute their data to our new database, allowing the research community to tap into the wealth of existing data and achieve a synthesis. 4 | 5 | ShareTrait started on **November 2022** through an internal launch involving different collaborators. Since then, we have received a handful of datasets. Since we are looking at the primary data, the cumulative number of records among all datasets is already **33,123 records**. So, imagine how much more we could accomplish with your contributions. 6 | 7 | ![Records in ShareTrait](https://user-images.githubusercontent.com/107040957/237031639-32c1301f-1d07-4069-bab3-b275a54bf299.png) 8 | 9 | ## Contribute data to ShareTrait 10 | We are working on generating tailor-made spreadsheet templates. It will help contributors with the data entry process. The tailor-made templates will be generated by combining the information provided by the data contributors in a questionnaire and their datasets. If you have published datasets on metabolic rates, development or fecundity of ectotherms, click on the links below: 11 | 12 | - [Development](https://forms.gle/tcw2khNVHPs5L3jM8) 13 | - [Fecundity](https://forms.gle/LTLnU6BpwAVoKL2J8) 14 | - [Metabolic rate](https://forms.gle/ghkJPZrCDv6gmn5CA) 15 | 16 | To answer this questionnaire, you will need: 17 | 18 | __1. Your dataset in a spreadsheet format (.csv)__ 19 | 20 | __2. The pdf file of the publication associated with the dataset__ 21 | 22 | After you have completed the questionnaire, you will receive a prefilled template (.csv) with the information you provided. You will provide feedback for some missing information, and check for consistency as well. 23 | 24 | For further questions, contact the ShareTrait team (sharetrait2022@gmail.com). 25 | 26 | Please forward this questionnaire to anyone you think may be interested in sharing data. By answering this questionnaire and providing data to the ShareTrait project, you will be asked if you are interested in participating as a co-author on our planned papers. 27 | 28 | ## The vision of ShareTrait 29 | A longstanding goal in ecology is to distil general principles that govern species-environment relationships and apply these to protect biodiversity. Trait-based ecology has brought us closer to achieving this goal. For instance, by focusing on species traits rather than species identity, ecological studies can be made comparable across locations, scales and species composition. More and more data is collected on a wide variety of species traits. With the advent of open science, these data become increasingly Findable (F) and Accessible (A) due to online publishing in appendices, data repositories or databases. However, persistent barriers remain to data being Interoperable (I) and Reusable (R). These barriers have largely been solved in other fields (notably molecular biology and plant biology), by implementing rigorous standards. 30 | 31 | In the fields of animal ecology and animal physiology, the application of FAIR principles lags behind due to several reasons. Foremost is the overwhelming diversity in form and function which hampers greater standardisation of methodology; ectotherm animals comprise over 99% of animal diversity. For instance, traits such as flight capacity or egg size are only informative in those taxonomic groups that can fly and that do lay eggs. In addition, the methodology to measure a given trait varies according to what is best-suited for a particular group of animals. As a result, disparate sets of data exist which makes it difficult to unify them across animal groups. 32 | 33 | Here we propose to develop a platform for making trait data interoperable and reusable via pipelines that streamline the formatting of datasets for integrated use. Key ingredients are to embrace the variation in methodology by gathering metadata on how the data were acquired and to focus on three traits that are universal in ectotherm animals: metabolism, development and fecundity. Advantages of these traits are (i) their tight relationship to population dynamics, (ii) their commonality to all animals, and (iii) the abundance of data waiting to be synthesized. These traits on essential functions in animal biology can be analysed for major patterns in energy usage and expenditure across the animal kingdom and for identifying trade-offs between these functions. 34 | 35 | ## Members of ShareTrait 36 | 37 | - [Wilco Verberk](https://www.ru.nl/personen/verberk-w/) 38 | - [Jacintha Ellers](https://www.amsterdamecology.nl/principal-investigators/jacintha-ellers/) 39 | - [Matty Berg](https://research.vu.nl/en/persons/matty-berg) 40 | - [Félix P. Leiva](https://github.com/felixpleiva) 41 | 42 | ## Collaborators of ShareTrait 43 | 44 | - [Brunno Oliveira](https://oliveirabrunno.wordpress.com/) 45 | - [Andrew Hirst](https://www.ntu.ac.uk/staff-profiles/animal-rural-environmental-sciences/andrew-hirst) 46 | - [Craig White](https://evolutionaryphysiology.com/lab-members/craig-white/) 47 | - [Steven Chown](https://chownlab.com/prof-steven-chown/) 48 | - [Tim Blackburn](https://tblackburn4.wixsite.com/blackburninvasion) 49 | 50 | ## Funding 51 | ShareTrait is a project funded by the Dutch Research Council [NWO](https://www.nwo.nl/en) through the [Open Science Fund](https://www.nwo.nl/en/researchprogrammes/open-science/open-science-fund) initiative. 52 | 53 | ## Further information 54 | Check out our [![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/share.svg?style=social&label=Follow%20%40share_trait)](https://twitter.com/share_trait). If you have questions concerning the project, please get in touch with principal investigator, Wilco Verberk, by e-mail at w.verberk@science.ru.nl. 55 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/1_compilation/.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/1_compilation/.RData -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/1_compilation/.Rhistory: -------------------------------------------------------------------------------- 1 | # Load required libraries 2 | library(data.table) # Required for fread() function 3 | library(dplyr) # Required for bind_rows() function 4 | # Cleaning working space 5 | rm(list = ls()) # Clear all objects from the workspace 6 | # Set the working directory to the folder containing data sets 7 | # Development 8 | setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/data/cleaned/development") 9 | dev_files <- list.files(pattern = "*.csv") %>% 10 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 11 | # Fecundity 12 | setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/data/cleaned/fecundity") 13 | fec_files <- list.files(pattern = "*.csv") %>% 14 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 15 | # Metabolic rate 16 | setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/data/cleaned/metabolic_rate") 17 | met_files <- list.files(pattern = "*.csv") %>% 18 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 19 | # Set the working directory to the "outputs" folder 20 | setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/R/outputs") 21 | # Export the individual data frames to CSV files 22 | write.csv(dev_files, "ShareTrait_Development.csv", row.names = FALSE) 23 | write.csv(fec_files, "ShareTrait_Fecundity.csv", row.names = FALSE) 24 | write.csv(met_files, "ShareTrait_Metabolic_Rates.csv", row.names = FALSE) 25 | # Saving session information with all packages versions for reproducibility purposes 26 | sink("./1_1_compilation_R_session.txt") 27 | sessionInfo() 28 | sink() 29 | # Load required libraries 30 | library(data.table) # Required for fread() function 31 | library(dplyr) # Required for bind_rows() function 32 | # Cleaning working space 33 | rm(list = ls()) # Clear all objects from the workspace 34 | # Development 35 | setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/R/cleaned_data/development") 36 | dev_files <- list.files(pattern = "*.csv") %>% 37 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 38 | # Fecundity 39 | setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/R/cleaned_data/fecundity") 40 | fec_files <- list.files(pattern = "*.csv") %>% 41 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 42 | # Metabolic rate 43 | setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/R/cleaned_data/metabolic_rate") 44 | met_files <- list.files(pattern = "*.csv") %>% 45 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 46 | # Set the working directory to the "outputs" folder 47 | setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/R/outputs") 48 | # Export the individual data frames to CSV files 49 | write.csv(dev_files, "ShareTrait_Development.csv", row.names = FALSE) 50 | write.csv(fec_files, "ShareTrait_Fecundity.csv", row.names = FALSE) 51 | write.csv(met_files, "ShareTrait_Metabolic_Rates.csv", row.names = FALSE) 52 | # Saving session information with all packages versions for reproducibility purposes 53 | sink("./1_1_compilation_R_session.txt") 54 | sessionInfo() 55 | sink() 56 | # Development 57 | #setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/R/cleaned_data/development") 58 | setwd("../cleaned_data/development") 59 | dev_files <- list.files(pattern = "*.csv") %>% 60 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 61 | # Load required libraries 62 | library(data.table) # Required for fread() function 63 | library(dplyr) # Required for bind_rows() function 64 | # Cleaning working space 65 | rm(list = ls()) # Clear all objects from the workspace 66 | # Set the working directory to the folder containing data sets 67 | # Development 68 | #setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/R/cleaned_data/development") 69 | setwd("../cleaned_data/development") 70 | # Load required libraries 71 | library(data.table) # Required for fread() function 72 | library(dplyr) # Required for bind_rows() function 73 | # Cleaning working space 74 | rm(list = ls()) # Clear all objects from the workspace 75 | # Development 76 | #setwd("C:/Users/fleiva/Insync/sharetrait2022@gmail.com/ShareTrait/R/cleaned_data/development") 77 | setwd("./cleaned_data/development") 78 | dev_files <- list.files(pattern = "*.csv") %>% 79 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 80 | # Load required libraries 81 | library(data.table) # Required for fread() function 82 | library(dplyr) # Required for bind_rows() function 83 | # Cleaning working space 84 | rm(list = ls()) 85 | # Set the working directory to the folder containing data sets 86 | # Development 87 | setwd("./cleaned_data/development") 88 | # Development 89 | setwd("./cleaned_data/development") 90 | # Load required libraries 91 | library(data.table) # Required for fread() function 92 | library(dplyr) # Required for bind_rows() function 93 | # Cleaning working space 94 | rm(list = ls()) 95 | # Development 96 | setwd("./cleaned_data/development") 97 | # Load required libraries 98 | library(data.table) # Required for fread() function 99 | library(dplyr) # Required for bind_rows() function 100 | # Cleaning working space 101 | rm(list = ls()) 102 | # Development 103 | setwd("./cleaned_data/development") 104 | # Cleaning working space 105 | rm(list=ls()) 106 | # check directory 107 | getwd() 108 | # Load required libraries 109 | library(data.table) # Required for fread() function 110 | library(dplyr) # Required for bind_rows() function 111 | # set the working directory to the folder containing this script: 112 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 113 | # Development 114 | setwd("./cleaned_data/development") 115 | # Development 116 | setwd("../cleaned_data/development") 117 | dev_files <- list.files(pattern = "*.csv") %>% 118 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 119 | # Cleaning working space 120 | rm(list=ls()) 121 | # check directory 122 | getwd() 123 | # Load required libraries 124 | library(data.table) # Required for fread() function 125 | library(dplyr) # Required for bind_rows() function 126 | # set the working directory to the folder containing this script: 127 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 128 | # Development 129 | setwd("../cleaned_data/development") 130 | dev_files <- list.files(pattern = "*.csv") %>% 131 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 132 | # Fecundity 133 | setwd("../cleaned_data/fecundity") 134 | # Cleaning working space 135 | rm(list=ls()) 136 | # check directory 137 | getwd() 138 | # Load required libraries 139 | library(data.table) # Required for fread() function 140 | library(dplyr) # Required for bind_rows() function 141 | # set the working directory to the folder containing this script: 142 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 143 | # Development 144 | setwd("../cleaned_data/development") 145 | dev_files <- list.files(pattern = "*.csv") %>% 146 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 147 | # Fecundity 148 | setwd("../cleaned_data/fecundity") 149 | fec_files <- list.files(pattern = "../cleaned_data/fecundity*.csv") %>% 150 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 151 | # Cleaning working space 152 | rm(list=ls()) 153 | # check directory 154 | getwd() 155 | # Load required libraries 156 | library(data.table) # Required for fread() function 157 | library(dplyr) # Required for bind_rows() function 158 | # set the working directory to the folder containing this script: 159 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 160 | # Development 161 | setwd("../cleaned_data/") 162 | dev_files <- list.files(pattern = "/development*.csv") %>% 163 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 164 | dev_files <- list.files(pattern = "/development/*.csv") %>% 165 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 166 | # Cleaning working space 167 | rm(list=ls()) 168 | # check directory 169 | getwd() 170 | # Load required libraries 171 | library(data.table) # Required for fread() function 172 | library(dplyr) # Required for bind_rows() function 173 | # set the working directory to the folder containing this script: 174 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 175 | # Development 176 | setwd("../cleaned_data/") 177 | dev_files <- list.files(pattern = "/development/*.csv") %>% 178 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 179 | # Development 180 | setwd("./cleaned_data/") 181 | dev_files <- list.files(pattern = "/development/*.csv") %>% 182 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 183 | # Cleaning working space 184 | rm(list = ls()) 185 | # Check directory 186 | getwd() 187 | # Load required libraries 188 | library(data.table) # Required for fread() function 189 | library(dplyr) # Required for bind_rows() function 190 | # Set the working directory to the folder containing this script 191 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 192 | # Set the working directory to the "cleaned_data" folder 193 | setwd("./cleaned_data/") 194 | # Cleaning working space 195 | rm(list = ls()) 196 | # Check directory 197 | getwd() 198 | # Load required libraries 199 | library(data.table) # Required for fread() function 200 | library(dplyr) # Required for bind_rows() function 201 | # Set the working directory to the folder containing this script 202 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 203 | # Set the working directory to the "cleaned_data" folder 204 | setwd("../cleaned_data/") 205 | # Read and combine CSV files using fread() 206 | dev_files <- list.files(pattern = "/development/*.csv") %>% 207 | purrr::map_df(~ fread(.)) 208 | # Cleaning working space 209 | rm(list = ls()) 210 | # Check directory 211 | getwd() 212 | # Load required libraries 213 | library(data.table) # Required for fread() function 214 | library(dplyr) # Required for bind_rows() function 215 | # Set the working directory to the folder containing this script 216 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 217 | # Set the working directory to the "cleaned_data" folder 218 | setwd("../cleaned_data/") 219 | # Read and combine CSV files using fread() 220 | dev_files <- list.files(pattern = "/development*.csv") %>% 221 | purrr::map_df(~ fread(.)) 222 | # Cleaning working space 223 | rm(list = ls()) 224 | # Check directory 225 | getwd() 226 | # Load required libraries 227 | library(data.table) # Required for fread() function 228 | library(dplyr) # Required for bind_rows() function 229 | # Set the working directory to the folder containing this script 230 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 231 | # Set the working directory to the "cleaned_data" folder 232 | setwd("../cleaned_data/") 233 | # Read and combine CSV files using fread() 234 | dev_files <- list.files(pattern = "../development*.csv") %>% 235 | purrr::map_df(~ fread(.)) 236 | # Read and combine CSV files using fread() 237 | dev_files <- list.files(pattern = "*.csv") %>% 238 | purrr::map_df(~ fread(.)) 239 | # Cleaning working space 240 | rm(list = ls()) 241 | # Check directory 242 | getwd() 243 | # Load required libraries 244 | library(data.table) # Required for fread() function 245 | library(dplyr) # Required for bind_rows() function 246 | # Set the working directory to the folder containing this script 247 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 248 | # Set the working directory to the "cleaned_data" folder 249 | setwd("../cleaned_data/") 250 | # Read and combine CSV files using fread() 251 | dev_files <- list.files(pattern = "*.csv") %>% 252 | purrr::map_df(~ fread(.)) 253 | # Set the working directory to the "cleaned_data" folder 254 | setwd("../cleaned_data/development") 255 | # Read and combine CSV files using fread() 256 | dev_files <- list.files(pattern = "*.csv") %>% 257 | purrr::map_df(~ fread(.)) 258 | fec_files <- list.files(pattern = "../cleaned_data/fecundity*.csv") %>% 259 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 260 | # # Fecundity 261 | setwd("../cleaned_data/fecundity") 262 | # Set the working directory to the folder containing this script 263 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 264 | # # Fecundity 265 | setwd("../cleaned_data/fecundity") 266 | fec_files <- list.files(pattern = "../cleaned_data/fecundity*.csv") %>% 267 | purrr::map_df(~ fread(.)) # Read and combine CSV files using fread() 268 | # Cleaning working space 269 | rm(list = ls()) 270 | # Check directory 271 | getwd() 272 | # Load required libraries 273 | library(data.table) # Required for fread() function 274 | library(dplyr) # Required for bind_rows() function 275 | # Set the working directory to the folder containing this script 276 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 277 | # Set the working directory to the "cleaned_data" folder 278 | setwd("../cleaned_data/development") 279 | # Read and combine CSV files using fread() 280 | dev_files <- list.files(pattern = "*.csv") %>% 281 | purrr::map_df(~ fread(.)) 282 | # # Fecundity 283 | setwd("../cleaned_data/fecundity") 284 | # Cleaning working space 285 | rm(list = ls()) 286 | # Check directory 287 | getwd() 288 | # Load required libraries 289 | library(data.table) # Required for fread() function 290 | library(dplyr) # Required for bind_rows() function 291 | # Set the working directory to the folder containing this script 292 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 293 | # Set the working directory to the "cleaned_data" folder 294 | setwd("../cleaned_data/development") 295 | # Read and combine CSV files using fread() 296 | dev_files <- list.files(pattern = "*.csv") %>% 297 | purrr::map_df(~ fread(.)) 298 | # # Fecundity 299 | setwd("../cleaned_data/fecundity") 300 | # Load required libraries 301 | library(data.table) # Required for fread() function 302 | library(dplyr) # Required for bind_rows() function 303 | # Set the working directory to the folder containing this script 304 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 305 | # Set the working directory to the "cleaned_data/development" folder 306 | setwd("../cleaned_data/development") 307 | # Read and combine CSV files using fread() 308 | dev_files <- list.files(pattern = "*.csv") %>% 309 | purrr::map_df(~ fread(.)) 310 | # Set the working directory to the "cleaned_data/fecundity" folder 311 | setwd("../cleaned_data/fecundity") 312 | # Load required libraries 313 | library(data.table) # Required for fread() function 314 | library(dplyr) # Required for bind_rows() function 315 | # Set the working directory to the folder containing this script 316 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 317 | # Set the working directory to the "cleaned_data/development" folder 318 | setwd("../cleaned_data/development") 319 | # Read and combine CSV files using fread() 320 | dev_files <- list.files(pattern = "*.csv") %>% 321 | purrr::map_df(~ fread(.)) 322 | # Set the working directory to the "cleaned_data/fecundity" folder 323 | setwd("../cleaned_data/fecundity") 324 | # Load required libraries 325 | library(data.table) # Required for fread() function 326 | library(dplyr) # Required for bind_rows() function 327 | # Set the working directory to the folder containing this script 328 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 329 | # Set the working directory to the "cleaned_data/development" folder 330 | setwd("./cleaned_data/development") 331 | # Load required libraries 332 | library(data.table) # Required for fread() function 333 | library(dplyr) # Required for bind_rows() function 334 | # Set the working directory to the folder containing this script 335 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 336 | # Set the working directory to the "cleaned_data/development" folder 337 | setwd("./cleaned_data/development") 338 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/1_compilation/1_compilation.r: -------------------------------------------------------------------------------- 1 | # Cleaning working space 2 | rm(list = ls()) 3 | 4 | # Check directory 5 | getwd() 6 | 7 | # Load required libraries 8 | library(data.table) # Required for fread() function 9 | library(dplyr) # Required for bind_rows() function 10 | 11 | # Set the working directory to the "cleaned_data/development" folder 12 | setwd("../cleaned_data/development") 13 | 14 | # Read and combine CSV files using fread() 15 | dev_files <- list.files(pattern = "*.csv") %>% 16 | purrr::map_df(~ fread(.)) 17 | 18 | # Set the working directory to the "fecundity" folder 19 | setwd("../fecundity") 20 | 21 | fec_files <- list.files(pattern = "*.csv") %>% 22 | purrr::map_df(~ fread(.)) 23 | 24 | # Set the working directory to the "metabolic_rate" folder 25 | setwd("../metabolic_rate") 26 | 27 | met_files <- list.files(pattern = "*.csv") %>% 28 | purrr::map_df(~ fread(.)) 29 | 30 | # Set the working directory to the "Outputs" folder 31 | setwd("../../Outputs") 32 | 33 | # Export the individual data frames to CSV files 34 | write.csv(dev_files, "ShareTrait_Development.csv", row.names = FALSE) 35 | write.csv(fec_files, "ShareTrait_Fecundity.csv", row.names = FALSE) 36 | write.csv(met_files, "ShareTrait_Metabolic_Rates.csv", row.names = FALSE) 37 | 38 | # Saving session information with all package versions for reproducibility purposes 39 | sink("./1_1_compilation_R_session.txt") 40 | sessionInfo() 41 | sink() -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/2_standardisation/.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/2_standardisation/.RData -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/2_standardisation/2_1_data_wrangling.r: -------------------------------------------------------------------------------- 1 | # Cleaning working space 2 | rm(list=ls()) 3 | 4 | # check directory 5 | getwd() 6 | 7 | #Libraries 8 | library(dplyr) 9 | library(stringr) 10 | 11 | #load data 12 | dev_files <- read.csv("../outputs/ShareTrait_Development.csv",sep = ",",header = TRUE) 13 | fec_files <- read.csv("../outputs/ShareTrait_Fecundity.csv",sep = ",",header = TRUE) 14 | met_files <- read.csv("../outputs/ShareTrait_Metabolic_Rates.csv",sep = ",",header = TRUE) 15 | 16 | # Add a new column to identify the trait 17 | dev_files$trait_name <- as.factor("development") 18 | fec_files$trait_name <- as.factor("fecundity") 19 | met_files$trait_name <- as.factor("metabolic_rate") 20 | 21 | # change the names of some columns representing the same information 22 | colnames(dev_files)[colnames(dev_files) == "comments_development"] <- "comments_trait" 23 | colnames(fec_files)[colnames(fec_files) == "comments_fecundity"] <- "comments_trait" 24 | colnames(met_files)[colnames(met_files) == "comments_respiration"] <- "comments_trait" 25 | 26 | 27 | colnames(dev_files)[colnames(dev_files) == "development_time"] <- "trait_value" 28 | colnames(fec_files)[colnames(fec_files) == "fecundity"] <- "trait_value" 29 | colnames(met_files)[colnames(met_files) == "resp_value"] <- "trait_value" 30 | 31 | 32 | colnames(dev_files)[colnames(dev_files) == "development_time_unit"] <- "trait_unit" 33 | colnames(fec_files)[colnames(fec_files) == "fecundity_unit"] <- "trait_unit" 34 | colnames(met_files)[colnames(met_files) == "resp_unit"] <- "trait_unit" 35 | 36 | colnames(met_files)[colnames(met_files) == "resp_error_estimate"] <- "trait_error_estimate" 37 | colnames(met_files)[colnames(met_files) == "resp_error_type"] <- "trait_error_type" 38 | 39 | # Combine the data frames 40 | df <- dplyr::bind_rows(dev_files, fec_files, met_files) 41 | 42 | # Removing leading/trailing white spaces 43 | df$comments_reference <- trimws(df$comments_reference) 44 | df$species_reported <- trimws(df$species_reported) 45 | df$comments_taxonomy <- trimws(df$comments_taxonomy) 46 | df$comments_location <- trimws(df$comments_location) 47 | df$comments_timing <- trimws(df$comments_timing) 48 | df$comments_experimental_conditions <- trimws(df$comments_experimental_conditions) 49 | df$comments_trait <- trimws(df$comments_trait) 50 | 51 | # Reformatting strings. Convert the string column to lowercase 52 | df$realm_general <- tolower(df$realm_general) 53 | df$realm_specific <- tolower(df$realm_specific) 54 | df$origin <- tolower(df$origin) 55 | df$experiment_location <- tolower(df$experiment_location) 56 | df$maintained <- tolower(df$maintained) 57 | df$acclimated <- tolower(df$acclimated) 58 | df$test_food_type <- tolower(df$test_food_type) 59 | df$mating <- tolower(df$mating) 60 | 61 | # Reformatting dates. Convert date column to the desired format 62 | df$date_of_contribution <- as.Date(df$date_of_contribution, format = "%d-%m-%Y") 63 | df$date_of_collection_initial <- as.Date(df$date_of_collection_initial, format = "%d-%m-%Y") 64 | df$date_of_collection_final <- as.Date(df$date_of_collection_final, format = "%d-%m-%Y") 65 | 66 | # extract initial and final year 67 | df$year_of_collection_initial <- as.factor(substring(df$date_of_collection_initial,1,4)) 68 | df$year_of_collection_final <- as.factor(substring(df$date_of_collection_final,1,4)) 69 | 70 | #to extract and create a new column "month" 71 | df$month_of_collection_initial <- as.factor(substring(df$date_of_collection_initial,6,7)) 72 | df$month_of_collection_final <- as.factor(substring(df$date_of_collection_final,6,7)) 73 | 74 | #to extract and create a new column "day" 75 | df$day_of_collection_initial <- as.factor(substring(df$date_of_collection_initial,9,10)) 76 | df$day_of_collection_final <- as.factor(substring(df$date_of_collection_final,9,10)) 77 | 78 | # create two new columns with initial and final dates using the format "YYYYMMDD" 79 | df$yyyymmdd_of_collection_initial <- as.factor(paste(df$year_of_collection_initial,df$month_of_collection_initial,df$day_of_collection_initial,sep = "")) 80 | df$yyyymmdd_of_collection_final <- as.factor(paste(df$year_of_collection_final,df$month_of_collection_final,df$day_of_collection_final,sep = "")) 81 | 82 | # Replacing specific names 83 | sort(unique(df$name_contact)) 84 | 85 | df$name_contact <- gsub("K\xe9vin_Tougeron", "Kevin_Tougeron", df$name_contact) 86 | df$name_contact <- gsub("Luis_Casta\xf1eda", "Luis_Castaneda", df$name_contact) 87 | df$name_contact <- gsub("Adam _Hermaniuk", "Adam_Hermaniuk", df$name_contact) 88 | df$name_contact <- gsub("Shameer_Kodambiyakamenna", "K_S_Shameer", df$name_contact) # personal request of data contributor 89 | df$name_contact <- gsub("Iris_vandePol", "Iris_van_de_Pol", df$name_contact) 90 | df$name_contact <- gsub("Wilco_Verberk", "Wilco_CEP_Verberk", df$name_contact) 91 | 92 | sort(unique(df$name_contact)) 93 | 94 | # Replacing specific e-mails 95 | sort(unique(df$email_contact)) 96 | 97 | df$email_contact <- gsub("K\xe9vin.tougeron@umons.ac.be", "kevin.tougeron@umons.ac.be", df$email_contact) 98 | 99 | sort(unique(df$email_contact)) 100 | 101 | # Replacing specific types of reference 102 | sort(unique(df$type_of_reference)) 103 | df$type_of_reference[is.na(df$type_of_reference)] <- as.factor("primary") 104 | df$type_of_reference[df$type_of_reference == "1"] <- "primary" 105 | df$type_of_reference[df$type_of_reference == "primary_unpublished"] <- "primary" 106 | sort(unique(df$type_of_reference)) 107 | 108 | # Replacing specific doi of publications 109 | sort(unique(df$doi_publication)) 110 | 111 | df$doi_publication[df$doi_publication == "10.1242/jeb.133785"] <- "https://doi.org/10.1242/jeb.133785" 112 | df$doi_publication[df$doi_publication == "https://doi:10.3389/fevo.2021.659363"] <- "https://doi.org/10.3389/fevo.2021.659363" 113 | df$doi_publication[df$doi_publication == "https://royalsocietypublishing.org/doi/10.1098/rspb.2021.2077"] <- "https://doi.org/10.1098/rspb.2021.2077" 114 | df$doi_publication[df$doi_publication == "https://doi.org//10.1242/jeb.133785"] <- "https://doi.org/10.1242/jeb.133785" 115 | df$doi_publication[is.na(df$doi_publication)] <- "not published yet" 116 | 117 | sort(unique(df$doi_publication)) 118 | 119 | # Replacing specific doi of datasets 120 | sort(unique(df$doi_dataset)) 121 | 122 | df$doi_dataset[is.na(df$doi_dataset)] <- NA 123 | df$doi_dataset[df$doi_dataset == "http://doi.org/10.5281/zenodo.7273648"] <- "https://doi.org/10.5281/zenodo.7273648" 124 | 125 | sort(unique(df$doi_dataset)) 126 | 127 | # Replacing specific comment reference 128 | 129 | df$comments_reference[is.na(df$comments_reference)] <- NA 130 | df$comments_reference[df$comments_reference == "primary"] <- NA 131 | df$comments_reference[df$comments_reference == "We added the string_https://doi.org/_to the provided DOIs"] <- NA 132 | df$comments_reference[df$comments_reference == "Unpublished dataset"] <- "dataset not published" 133 | 134 | # Replacing specific origin and experiment location 135 | sort(unique(df$origin)) 136 | df$origin[df$origin == "mass rearing company"] <- "laboratory" 137 | df$origin[df$origin == "lab"] <- "laboratory" 138 | df$experiment_location[df$experiment_location == "lab"] <- "laboratory" 139 | sort(unique(df$origin)) 140 | sort(unique(df$experiment_location)) 141 | 142 | # Fixing specific levels 143 | unique(df$maintenance_photoperiod) 144 | df$maintenance_photoperiod[df$maintenance_photoperiod == "16l_8D"] <- "16L_8D" 145 | df$maintenance_photoperiod[df$maintenance_photoperiod == "16L_08D"] <- "16L_8D" 146 | df$maintenance_photoperiod[df$maintenance_photoperiod == "12D_12L"] <- "12L_12D" 147 | unique(df$maintenance_photoperiod) 148 | 149 | df$acclimated[df$acclimated == "not"] <- "no" 150 | df$strategy_of_protection[df$strategy_of_protection == "protected (carried by the female"] <- "protected (carried by the female, or attached to a substrate or floating in clumped masses)" 151 | 152 | df$sex[df$sex == "or attached to a substrate or floating in clumped masses)"] <- NA 153 | df$sex[df$sex == ""] <- NA 154 | df$sex[df$sex == "indeterminate"] <- NA 155 | 156 | # renaming specific life stages 157 | 158 | df$life_stage_general_final[df$life_stage_general_final == "matamorphosis"] <- "metamorphosis" 159 | df$life_stage_specific_initial[df$life_stage_specific_initial == ""] <- NA 160 | df$life_stage_specific_initial[df$life_stage_specific_initial == "Gosner developmental stage 25 (about 3 days after hatching)"] <- "Gosner stage 25" 161 | df$life_stage_specific_initial[df$life_stage_specific_initial == "Gosner developmental stage 25 (about 2 days after hatching)"] <- "Gosner stage 25" 162 | df$life_stage_specific_final[df$life_stage_specific_final == "Gosner developmental stage 42"] <- "Gosner stage 42" 163 | df$life_stage_specific_final[df$life_stage_specific_final == ""] <- NA 164 | df$life_stage_specific_final[df$life_stage_specific_final == "emergence of the adult from the host pupae"] <- "adult hatching from the host pupae" 165 | 166 | # renaming specific body size types and its units 167 | df$size_type[df$size_type == "fresh mass"] <- "fresh body mass" 168 | df$size_type[df$size_type == "dry mass"] <- "dry body mass" 169 | df$size_type[df$size_type == ""] <- NA 170 | df$parental_size_type[df$parental_size_type == "fresh mass"] <- "fresh body mass" 171 | df$parental_size_type[df$parental_size_type == "FM"] <- "fresh body mass" 172 | df$parental_size_type[df$parental_size_type == "dry mass"] <- "dry body mass" 173 | df$parental_size_type[df$parental_size_type == "Tibia length"] <- "tibia length" 174 | df$parental_size_type[df$parental_size_type == "Left hind leg tibia length"] <- "tibia length" 175 | df$offspring_size_type[df$offspring_size_type == "dry mass"] <- "dry body mass" 176 | 177 | df$size_units[df$size_units == ""] <- NA 178 | df$size_units[df$size_units == "grams"] <- "gram" 179 | 180 | # renaming specific comments 181 | df$comments_trait[df$comments_trait == "Species is reproductively active during 1 year"] <- "Species is reproductively active for one year" 182 | df$comments_trait[df$comments_trait == "Species is reproductivery active for 1 year"] <- "Species is reproductively active for one year" 183 | df$comments_trait[df$comments_trait == "Species is reproductivery active for a year"] <- "Species is reproductively active for one year" 184 | df$comments_trait[df$comments_trait == "Species is reproductively active for 1 year"] <- "Species is reproductively active for one year" 185 | df$comments_trait[df$comments_trait == ""] <- NA 186 | 187 | 188 | df$comments_trait[df$comments_trait == "triploid froglet"] <- "triploid individual" 189 | df$comments_trait[df$comments_trait == "Triploid_individual"] <- "triploid individual" 190 | df$comments_trait[df$comments_trait == "triploid tadpole"] <- "triploid individual" 191 | df$comments_trait[df$comments_trait == "diploid froglet"] <- "diploid individual" 192 | df$comments_trait[df$comments_trait == "diploid tadpole"] <- "diploid individual" 193 | df$comments_trait[df$comments_trait == "Diploid_individual"] <- "diploid individual" 194 | 195 | 196 | df$acclimation_food_type[df$acclimation_food_type == ""] <- NA 197 | df$acclimation_food_type[df$acclimation_food_type == "pellets (0.2 mm Ridley Aqua-feeds, Melbourne, Australia) and bloodworms (Orca, Nijimi Pty Ltd, Sydney, Australia)"] <- "Pelleted diet- Ridley Aqua-feeds and and bloodworms (Orca, Nijimi Pty Ltd, Sydney, Australia)" 198 | df$acclimation_food_type[df$acclimation_food_type == "Fish flakes (Tetramin, VA, USA)_supplemented with live Artemia salina nauplii every 3\x964 days"] <- "Fish flakes (Tetramin, VA, USA) supplemented with live Artemia salina nauplii every three to four days" 199 | 200 | df$comments_experimental_conditions[df$comments_experimental_conditions == ""] <- NA 201 | 202 | df$reproductive_stage[df$reproductive_stage == "mature adults"] <- "mature" 203 | df$reproductive_stage[df$reproductive_stage == "virgin female" ] <- "virgin" 204 | 205 | unique(df$metabolic_rate_type) 206 | df$metabolic_rate_type[df$metabolic_rate_type == "maximum" ] <- "active" 207 | df$metabolic_rate_type[df$metabolic_rate_type == "basal" ] <- "resting" 208 | df$metabolic_rate_type[df$metabolic_rate_type == "burrowing" ] <- "active" 209 | unique(df$metabolic_rate_type) 210 | 211 | 212 | df$sensor_type[df$sensor_type == "The two channel oxygen analyzer (S-3A/II N 37 M, Ametek, Pittsburgh, PA)"] <- "zirconia-based oxygen analyzer" 213 | df$sensor_type[df$sensor_type == "fibre-optic cable connected to a Fibox 3 reader (Presens) was fitted to the oxygen flow-through cell"] <- "fiber optic-based oxygen analyzer" 214 | df$sensor_type[df$sensor_type == "fiber optic oxygen sensor"] <- "fiber optic-based oxygen analyzer" 215 | df$sensor_type[df$sensor_type == "Microx TX3 fiberoptic oxygenmeter"] <- "fiber optic-based oxygen analyzer" 216 | df$sensor_type[df$sensor_type == "A fibre-optic cable connected to a Fibox 3 reader (Presens, Regensburg, Germany) was fixed to the oxygen flow-through cell"] <- "fiber optic-based oxygen analyzer" 217 | df$sensor_type[df$sensor_type == "oxygen meter Witrox 4 Loligo Systems"] <- "fiber optic-based oxygen analyzer" 218 | df$sensor_type[df$sensor_type == "Loligo Witrox"] <- "fiber optic-based oxygen analyzer" 219 | df$sensor_type[df$sensor_type == "Clark-type microelectrodes"] <- "oxygen electrode" 220 | df$sensor_type[df$sensor_type == "optical oxygen probe"] <- "fiber optic-based oxygen analyzer" 221 | df$sensor_type[df$sensor_type == "optical sensor spot"] <- "fiber optic-based oxygen analyzer" 222 | df$sensor_type[df$sensor_type == "fluorescence-based oxygen reading device (SDR SensorDish Reader; PreSens, Regensburg, Germany)"] <- "fluorescence-based oxygen analyzer" 223 | df$sensor_type[df$sensor_type == "oxygen electrode (Yellow Spring Instruments)"] <- "oxygen electrode" 224 | df$sensor_type[df$sensor_type == "Clark-type electrode"] <- "oxygen electrode" 225 | df$sensor_type[df$sensor_type == "Carbon dioxide analyzer sable system"] <- "carbon dioxide analyzer" 226 | df$sensor_type[df$sensor_type == "infrared CO2 analyzer Li-6251, LI-COR"] <- "infrared-based carbon dioxide analyzer" 227 | df$sensor_type[df$sensor_type == "infrared CO2 analyzer Li-6251, LI-COR "] <- "infrared-based carbon dioxide analyzer" 228 | df$sensor_type[df$sensor_type == "infrared CO2 gas analyser (LI-820, LI-COR Biosciences Inc)"] <- "infrared-based carbon dioxide analyzer" 229 | 230 | # Convert latitude to decimal degrees 231 | df$lat_dec <- df$lat_gg + df$lat_mm/60 + df$lat_ss/3600 232 | df$lat_dec <- ifelse(df$lat_gg < 0, -df$lat_dec, df$lat_dec) 233 | 234 | # Combine values from lat_dec and lat_gg_mm_ss into a single column 235 | df$lat_decimal <- coalesce(df$lat_dec, df$lat_gg_mm_ss) 236 | 237 | # Convert longitude to decimal degrees 238 | df$long_dec <- df$long_gg + df$long_mm/60 + df$long_ss/3600 239 | df$long_dec <- ifelse(df$long_gg < 0, -df$long_dec, df$long_dec) 240 | 241 | # Combine values from long_dec and long_gg_mm_ss into a single column 242 | df$long_decimal <- coalesce(df$long_dec, df$long_gg_mm_ss) 243 | 244 | names(df) 245 | # Define the desired column order 246 | df_cleaned <- df[, c( 247 | "dataset_id", "date_of_contribution", "name_contact", "email_contact", "type_of_reference","doi_dataset", "doi_publication", 248 | "comments_reference", "species_reported", "comments_taxonomy", "realm_general", "realm_specific", 249 | "elevation_of_collection", "depth_of_collection", "origin", "location_description", "comments_location", 250 | "lat_decimal","long_decimal", 251 | "year_of_collection_initial", "year_of_collection_final", 252 | "yyyymmdd_of_collection_initial", "yyyymmdd_of_collection_final", "comments_timing", 253 | "experiment_location","maintained", "maintenance_duration_days", "maintenance_duration_generations", 254 | "maintenance_temperature", "maintenance_photoperiod", "maintenance_humidity", "maintenance_oxygen", 255 | "maintenance_carbon_dioxide", "trait_name", 256 | "maintenance_salinity", "maintenance_ph","maintenance_oxygen_units", "maintenance_carbon_dioxide_units", "maintenance_food_type", 257 | "acclimated","acclimation_duration", "acclimation_temperature", 258 | "acclimation_salinity", "acclimation_ph", "acclimation_oxygen", "acclimation_carbon_dioxide", 259 | "acclimation_photoperiod", "acclimation_humidity", "acclimation_oxygen_units", 260 | "acclimation_carbon_dioxide_units", "acclimation_food_type", 261 | "test_temperature", "test_oxygen", "test_carbon_dioxide", 262 | "test_oxygen_units", "test_carbon_dioxide_units", "test_photoperiod", "test_humidity", 263 | "comments_experimental_conditions", "test_food_type", 264 | "test_salinity", "test_ph", 265 | "strategy_of_protection", "sex", "life_stage_general_initial", "life_stage_general_final", 266 | "life_stage_specific_initial", "life_stage_specific_final", 267 | "life_stage_general", "life_stage_specific", 268 | "size_type", "size_units", "size_value_initial", "size_value_final","size_value", 269 | "parental_size_type", "parental_size_units", "parental_size_value", 270 | "parental_age", "parental_age_units", 271 | "mating", "method_type", "fecundity_temporal_unit","reproductive_stage", 272 | "offspring_developmental_stage", "offspring_size_type", "offspring_size_units", "offspring_size_value", 273 | "metabolic_rate_type","acclimation_chamber", "fasting_time", "sensor_type", "respiration_volume", "delay_time", 274 | "respiratory_chamber_material", "incubation_time", "respirometry_type", "breathing_mode", 275 | "trait_value", "trait_unit", "comments_trait","trait_error_estimate", "trait_error_type", "sample_size" 276 | )] 277 | 278 | # Save the cleaned data frame to a new file 279 | write.csv(df_cleaned, "../outputs/2_1_ShareTrait_Database.csv", row.names = FALSE) 280 | 281 | # saving session information with all packages versions for reproducibility purposes 282 | sink("../outputs/2_1_standarisation_R_session.txt") 283 | sessionInfo() 284 | sink() 285 | # END OF SCRIPT -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/2_standardisation/2_2_trait_units.r: -------------------------------------------------------------------------------- 1 | # The following code has been adapted from MetaR (https://github.com/felixpleiva/MetaR) 2 | # by Felix P Leiva 3 | 4 | # Cleaning working space 5 | rm(list=ls()) 6 | 7 | # check directory 8 | getwd() 9 | 10 | #Libraries 11 | library(dplyr) 12 | library(tidyverse) 13 | library(stringr) 14 | 15 | #load data 16 | df <- read.csv("../outputs/2_1_ShareTrait_database.csv",sep = ",",header = TRUE) 17 | 18 | # check trait units 19 | unique(df$trait_unit) 20 | 21 | # Standardize units of fecundity 22 | df$trait_unit[df$trait_unit == "Egg load at adult emergence" ] <- "offspring number" 23 | df$trait_unit[df$trait_unit == "Number of eggs" ] <- "offspring number" 24 | df$trait_unit[df$trait_unit == "Total number of offspring" ] <- "offspring number" 25 | df$trait_unit[df$trait_unit == "Number of eggs per female" ] <- "offspring number" 26 | df$trait_unit[df$trait_unit == "number of mature eggs"] <- "offspring number" 27 | df$trait_unit[df$trait_unit == "number of hatched eggs"] <- "offspring number" 28 | df$trait_unit[df$trait_unit == "Number of eggs laid throughout life"] <- "offspring number" 29 | df$trait_unit[df$trait_unit == "number of eggs per female"] <- "offspring number" 30 | df$trait_unit[df$trait_unit == "number of eggs" ] <- "offspring number" 31 | df$trait_unit[df$trait_unit == "cumulative number of eggs per female" ]<- "offspring number" 32 | df$trait_unit[df$trait_unit == "number of eggs by female" ] <- "offspring number" 33 | 34 | # check trait units 35 | unique(df$trait_unit) 36 | 37 | # Standardize units of development 38 | df$trait_unit[df$trait_unit == "days"] <- "Days" 39 | 40 | # check trait units 41 | unique(df$trait_unit) 42 | 43 | # The aim of the following lines is to convert all units of metabolic rates to 44 | # mgO2/h/ind. For simplicity, I will use a conversion factor of "1" for 45 | # developmental time and fecundity 46 | 47 | # ------------------------------------------------------------------------------ 48 | # Conversion factors for oxygen 49 | 50 | # 1 L of oxygen = 20.083 kiloJoule of oxygen = 0.0446 mol oxygen - Schmidt-Nielsen 1997, page 583 51 | # 1 mmHg of oxygen = 1 Torr = 0.133322 kPa 52 | # 1 mol of oxygen = 31.9988 grams of oxygen 53 | # 1 mol of a gas at STP occupies volume = 22.414 L 54 | 55 | # ------------------------------------------------------------------------------ 56 | # STEP 1: Convert all units of oxygen to milligram of oxygen (mgO2) 57 | 58 | # make a new column and extract the unit of oxygen before the "/" 59 | 60 | df$extracted_unit <- str_extract(df$trait_unit, "[^/]+") 61 | sort(unique(df$extracted_unit)) 62 | 63 | # Define lockup table for conversion factors. In the case of the metabolic rate, 64 | # I will convert all units to **mg O2** 65 | 66 | conversion_table_unit <- data.frame( 67 | extracted_unit = c("days", 68 | "Joule", 69 | "mgO2", 70 | "mlCO2", 71 | "mLO2", 72 | "nmolO2", 73 | "offspring number", 74 | "uLCO2", 75 | "umolO2"), 76 | 77 | conversion_factor = c(1, 78 | 0.046 / 20.083 * 1000 * 31.9988, # I am not sure about this one!! 79 | 1, 80 | 1 / 22.414 * 31.9988 / 0.85, 81 | 1 / 22.414 * 31.9988, 82 | 31.9988 / 1000000, 83 | 1, 84 | 1 / 22.414 * 31.9988 / 0.85 / 1000, 85 | 31.9988 /1000) 86 | ) 87 | 88 | 89 | # Merge lockup table with original data 90 | df_converted_step_1 <- left_join(df, conversion_table_unit, by = "extracted_unit") 91 | 92 | # Calculate trait value rates for all rows and create a new column 93 | df_converted_step_1 <- df_converted_step_1 %>% 94 | mutate(trait_converted = trait_value * conversion_factor) 95 | 96 | # STEP 2: Convert all units of time (for metabolic rates) to hours. So we will 97 | # keep the units for the other traits 98 | 99 | # select the units of time 100 | time_unit <- "(day|month|min|second|30min|20min|h|Days|offspring number)" 101 | 102 | # Extract the text and create a new column 103 | df_converted_step_1$extracted_time_unit <- str_extract(df_converted_step_1$trait_unit, time_unit) 104 | sort(unique(df_converted_step_1$extracted_time_unit)) 105 | 106 | # Define lockup table for conversion factors hours 107 | conversion_table_time <- data.frame( 108 | extracted_time_unit = c("day", 109 | "Days", 110 | "h", 111 | "min", 112 | "offspring number"), 113 | 114 | conversion_factor_to_hours = c(1 / 24, 115 | 1, 116 | 1, 117 | 60, 118 | 1) 119 | ) 120 | 121 | # Merge lookup table with original data 122 | df_converted_step_2 <- left_join(df_converted_step_1, conversion_table_time, by = "extracted_time_unit") 123 | 124 | # Calculate respiration rate per hour for all rows 125 | df_converted_step_2 <- df_converted_step_2 %>% 126 | mutate(trait_converted = trait_converted * conversion_factor_to_hours) 127 | 128 | # STEP 3: Express all units of oxygen consumption per individual 129 | 130 | # select, extract and make a new column the unit of body mass in "trait_unit" 131 | 132 | df_converted_step_2$extracted_size_unit <- str_extract(df_converted_step_2$trait_unit, "(Days|offspring number|ugN2|ugDM|ugCarbon|mgDM|mgFM|mgAFDM|gDM|gFM|100gFM|gAFDM|100gram|kgFM|ind)") 133 | sort(unique(df_converted_step_2$extracted_size_unit)) 134 | 135 | # check the type of sizes used to express body size and check their units 136 | sort(unique(df_converted_step_2$size_type)) 137 | 138 | sort(unique(df_converted_step_2$size_units)) 139 | 140 | # convert the units per individual 141 | 142 | df_converted_step_3 <- df_converted_step_2 %>% 143 | mutate(trait_converted = case_when( 144 | extracted_size_unit == "ind" ~ trait_converted, 145 | extracted_size_unit == "Days" ~ trait_converted, 146 | extracted_size_unit == "offspring number" ~ trait_converted, 147 | extracted_size_unit == "gDM" & size_type == "dry body mass" & size_units == "gram" ~ trait_converted * size_value, 148 | extracted_size_unit == "kgFM" & size_type == "fresh body mass" & size_units == "kilogram" ~ trait_converted * size_value, 149 | TRUE ~ NA_real_ # The TRUE ~ NA_real_ statement handles the cases where none of the conditions match, assigning NA to trait_converted 150 | )) 151 | 152 | # STEP 4: Convert all units of body size to gram of fresh mass for the metabolic rate 153 | 154 | # calculate body size of fresh mass in grams 155 | 156 | df_converted_step_4 <- df_converted_step_3 %>% 157 | mutate(fresh_mass_gram = case_when( 158 | size_type == "fresh body mass" & size_units == "kilogram" ~ size_value * 1000, 159 | size_type == "fresh body mass" & size_units == "gram" ~ size_value, 160 | size_type == "fresh body mass" & size_units == "microgram" ~ size_value / 1000000, 161 | size_type == "fresh body mass" & size_units == "milligram" ~ size_value / 1000, 162 | size_type == "fresh body mass" & size_units == "nanogram" ~ size_value / 1000000000, 163 | size_type == "dry body mass" & size_units == "gram" ~ size_value / 0.25, 164 | size_type == "dry body mass" & size_units == "kilogram" ~ size_value * 1000 / 0.25, 165 | size_type == "dry body mass" & size_units == "microgram" ~ size_value / 1000000 / 0.25, 166 | size_type == "dry body mass" & size_units == "milligram" ~ size_value / 1000 / 0.25, 167 | size_type == "dry body mass" & size_units == "nanogram" ~ size_value / 1000000000/ 0.25, 168 | size_type == "total length" & size_units == "millimeter" & dataset_id == "Hermaniuk_et_al_2021" ~ (size_value ^ 3) / 1000 , 169 | TRUE ~ NA_real_ # The TRUE ~ NA_real_ statement handles the cases where none of the conditions match, assigning NAs. 170 | )) 171 | 172 | # STEP 5: Convert all units of body size to gram of fresh mass for the metabolic 173 | # rate and save the cleaned dataframe to a new file 174 | 175 | # delete authors information and non relevant columns 176 | df_converted_step_4 <- df_converted_step_4 %>% 177 | select(-name_contact) %>% 178 | select(-email_contact) %>% 179 | select(-extracted_unit) %>% 180 | select(-conversion_factor) %>% 181 | select(-conversion_factor_to_hours) %>% 182 | select(-extracted_size_unit) %>% 183 | select(-extracted_time_unit) 184 | 185 | 186 | names(df_converted_step_4) 187 | 188 | # Save the cleaned dataframe to a new file 189 | write.csv(df_converted_step_4, "../outputs/2_2_ShareTrait_DataBase.csv", row.names = FALSE) 190 | 191 | # saving session information with all packages versions for reproducibility purposes 192 | 193 | sink("../outputs/2_2_trait_units_R_session.txt") 194 | sessionInfo() 195 | sink() 196 | # END OF SCRIPT -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/2_standardisation/2_3_harmonize_taxonomy.r: -------------------------------------------------------------------------------- 1 | # Code adapted by FP Leiva from: 2 | 3 | # Lenoir, J., Bertrand, R., Comte, L. et al. Species better track climate 4 | # warming in the oceans than on land. Nat Ecol Evol 4, 1044–1059 (2020). 5 | # https://doi.org/10.1038/s41559-020-1198-2 6 | 7 | rm(list=ls()) #clear your work environment 8 | 9 | # Libraries 10 | library(dplyr) 11 | library(Hmisc) 12 | library(tidyverse) 13 | library(stringr) 14 | library(rgbif) 15 | library(taxize) 16 | library(plyr) 17 | 18 | # Functions 19 | source("../outputs/Retrieve_taxonomy.R") 20 | 21 | # load data 22 | dat<-read.csv("../outputs/2_2_ShareTrait_database.csv",sep = ",",header = TRUE) 23 | 24 | species = as.character(dat[,"species_reported"]) 25 | 26 | # create vector name 27 | mynames <-na.omit(unique(ifelse(is.na(species),as.character(dat$genus),paste(dat$genus,species)))) 28 | 29 | # check number of names 30 | length(mynames) 31 | 32 | # STEP 1: retrieve names using NCBI 33 | 34 | gbiftestout_df <- llply(mynames, NCBI_classif,db='ncbi',.progress = "text") 35 | dfnames.ncbi = sapply(gbiftestout_df,as.data.frame) 36 | dfnames.ncbi = sapply(dfnames.ncbi,unlist) 37 | dfnames.ncbi = t(dfnames.ncbi) 38 | dfnames.ncbi = data.frame(dfnames.ncbi) 39 | colnames(dfnames.ncbi) <- c("phylum", "class", "order", "family","genus","species","species_reported") 40 | dfnames.ncbi = apply(dfnames.ncbi,2,unlist) 41 | dfnames.ncbi = apply(dfnames.ncbi,2,as.character) 42 | dfnames.ncbi = data.frame(dfnames.ncbi) 43 | 44 | ## 1 -Check for changes in species names 45 | na.omit(cbind(as.character(dfnames.ncbi$species_reported[which(!dfnames.ncbi$species_reported %in% dfnames.ncbi$species)]), 46 | as.character(dfnames.ncbi$species[which(!dfnames.ncbi$species_reported %in% dfnames.ncbi$species)]))) 47 | 48 | ## 2 -Select unidentified species & remove from the table 49 | unid.ncbi = dfnames.ncbi$species_reported[which(sapply(strsplit(as.character(dfnames.ncbi$species_reported)," "),length)== 2 & is.na(dfnames.ncbi$species))] 50 | 51 | ## 3 - save file 52 | if (length(unid.ncbi)>0){ 53 | dfnames.ncbi = dfnames.ncbi[-which(sapply(strsplit(as.character(dfnames.ncbi$species_reported)," "),length)== 2 & is.na(dfnames.ncbi$species)),] 54 | } 55 | 56 | dfnames.ncbi = apply(dfnames.ncbi,2,as.character) 57 | write.table(dfnames.ncbi,"../outputs/dfnames.ncbi.txt") 58 | 59 | #4 - compile 60 | dfnames.ncbi = read.table("../outputs/dfnames.ncbi.txt",h=T) 61 | source.ncbi = rep('ncbi',nrow(dfnames.ncbi)) 62 | taxo_level = ifelse(sapply(strsplit(as.character(dfnames.ncbi$species_reported)," "),length) == 1,"Genus","Species") 63 | finaltab = data.frame(dfnames.ncbi,source.ncbi,taxo_level) 64 | colnames(finaltab)=c("phylum","class","order","family","genus","species","species_reported","source","taxo_level") 65 | 66 | 67 | #/!\ STOP HERE IF length(unid.ncbi)=0 68 | #/!\ all species have been retrieved no need to go further 69 | length(unid.ncbi) 70 | 71 | # STEP 2: names using ITIS 72 | 73 | gbiftestout_df.itis <- llply(unid.ncbi, NCBI_classif,db='itis',.progress = "text") 74 | 75 | dfnames.itis = sapply(gbiftestout_df.itis,as.data.frame) 76 | dfnames.itis = sapply(dfnames.itis,unlist) 77 | dfnames.itis = t(dfnames.itis) 78 | dfnames.itis = data.frame(dfnames.itis) 79 | colnames(dfnames.itis) <- c("phylum", "class", "order", "family","genus","species","species_reported") 80 | dfnames.itis = apply(dfnames.itis,2,unlist) 81 | dfnames.itis = data.frame(dfnames.itis) 82 | 83 | ## 1 -Check for changes in species names 84 | na.omit(cbind(as.character(dfnames.itis$species_reported[which(!dfnames.itis$species_reported %in% dfnames.itis$species)]), 85 | as.character(dfnames.itis$species[which(!dfnames.itis$species_reported %in% dfnames.itis$species)]))) 86 | 87 | ## 2 - Select unidentified species 88 | unid.itis = dfnames.itis$species_reported[which(sapply(strsplit(as.character(dfnames.itis$species_reported)," "),length)== 2 & is.na(dfnames.itis$species))] 89 | 90 | ## 3 - save file 91 | if (length(unid.itis)>0){ 92 | dfnames.itis = dfnames.itis[-which(sapply(strsplit(as.character(dfnames.itis$species_reported)," "),length)== 2 & is.na(dfnames.itis$species)),] 93 | } 94 | 95 | write.table(dfnames.itis,"../outputs/dfnames.itis.txt") 96 | 97 | #4 - compile 98 | dfnames.itis = read.table("../outputs/dfnames.itis.txt",h=T) 99 | source.itis = rep('itis',nrow(dfnames.itis)) 100 | taxo_level = ifelse(sapply(strsplit(as.character(dfnames.itis$species_reported)," "),length) == 1,"Genus","Species") 101 | dfnames.itis=data.frame(dfnames.itis,source.itis,taxo_level) 102 | colnames(dfnames.itis)=c("phylum","class","order","family","genus","species","species_reported","source","taxo_level") 103 | finaltab = rbind(finaltab,dfnames.itis) 104 | 105 | #/!\ STOP HERE IF length(unid.ncbi)= 0 106 | #/!\ all species have been retrieved no need to go further 107 | 108 | length(unid.itis) 109 | 110 | # STEP 3: retrieve names using GBIF 111 | #but not the classif (names are easier to retrieve using GBIF but the clasif has many problems) 112 | 113 | gbiftestout_df.gbif <- llply(as.character(unid.itis), GB_classif,.progress = "text") 114 | 115 | dfnames.gbif = sapply(gbiftestout_df.gbif,as.data.frame) 116 | dfnames.gbif = sapply(dfnames.gbif,unlist) 117 | dfnames.gbif = t(dfnames.gbif) 118 | dfnames.gbif = data.frame(dfnames.gbif) 119 | colnames(dfnames.gbif) <- c("phylum", "class", "order", "family","genus","species","species_reported") 120 | dfnames.gbif = apply(dfnames.gbif,2,unlist) 121 | dfnames.gbif = apply(dfnames.gbif,2,as.character) 122 | dfnames.gbif = data.frame(dfnames.gbif) 123 | 124 | 125 | ## 1 - Check for changes in species names 126 | na.omit(cbind(as.character(dfnames.gbif$species_reported[which(!dfnames.gbif$species_reported %in% dfnames.gbif$species)]), 127 | as.character(dfnames.gbif$species[which(!dfnames.gbif$species_reported %in% dfnames.gbif$species)]))) 128 | 129 | ## 2 - Save file 130 | write.table(dfnames.gbif,"../outputs/dfnames.gbif.txt") 131 | 132 | dfnames.gbif = read.table("../outputs/dfnames.gbif.txt",h=T) 133 | source.gbif = rep('gbif',nrow(dfnames.gbif)) 134 | 135 | ## 3 -check the info against ncbi (with new names from GBIF) 136 | check.ncbi <- llply(dfnames.gbif$species, NCBI_classif,db='ncbi',.progress = "text") 137 | dfnames.check.ncbi = sapply(check.ncbi,as.data.frame) 138 | dfnames.check.ncbi = sapply(dfnames.check.ncbi,unlist) 139 | dfnames.check.ncbi = t(dfnames.check.ncbi) 140 | dfnames.check.ncbi = data.frame(dfnames.check.ncbi) 141 | colnames(dfnames.check.ncbi) <- c("phylum", "class", "order", "family","genus","species","species_reported") 142 | dfnames.check.ncbi = apply(dfnames.check.ncbi,2,unlist) 143 | dfnames.check.ncbi = apply(dfnames.check.ncbi,2,as.character) 144 | dfnames.check.ncbi = data.frame(dfnames.check.ncbi) 145 | 146 | ## 4 - Check for changes in species names 147 | na.omit(cbind(as.character(dfnames.check.ncbi$species_reported[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species)]),as.character(dfnames.check.ncbi$species[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species)]))) 148 | 149 | ##5 - change the names in DB 150 | dfnames.gbif = apply(dfnames.gbif,2,as.character) 151 | dfnames.gbif[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),1] = as.character(dfnames.check.ncbi[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),1]) 152 | dfnames.gbif[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),2] = as.character(dfnames.check.ncbi[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),2]) 153 | dfnames.gbif[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),3] = as.character(dfnames.check.ncbi[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),3]) 154 | dfnames.gbif[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),4] = as.character(dfnames.check.ncbi[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),4]) 155 | dfnames.gbif[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),5] = as.character(dfnames.check.ncbi[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),5]) 156 | dfnames.gbif[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),6] = as.character(dfnames.check.ncbi[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F),5]) 157 | 158 | source.gbif[which(!dfnames.check.ncbi$species_reported %in% dfnames.check.ncbi$species & is.na(dfnames.check.ncbi$species) == F)] = 'ncbi' 159 | 160 | ##6 - check unidentified species : mainly mistakes in names 161 | dfnames.gbif=as.data.frame(dfnames.gbif) 162 | dfnames.gbif$species_reported[which(is.na(dfnames.gbif$species) & is.na(dfnames.gbif$genus))] 163 | 164 | #7 - compile 165 | taxo_level = ifelse(sapply(strsplit(as.character(dfnames.gbif$species_reported)," "),length) == 1,"Genus","Species") 166 | dfnames.gbif=data.frame(dfnames.gbif,source.gbif,taxo_level) 167 | colnames(dfnames.gbif)=c("phylum","class","order","family","genus","species","species_reported","source","taxo_level") 168 | finaltab = rbind(finaltab,dfnames.gbif) 169 | 170 | #finaltab gives for each name entered in dat (finaltab$species_reported) the full classification from phylum to species 171 | #species=NA have not been recognized as valid species and need to be search elsewhere or removed 172 | #classification sometimes has to be completed 173 | 174 | write.csv(finaltab,"../outputs/2_3_harmonized_taxonomy_ShareTrait_DataBase.csv",row.names = F) 175 | 176 | # saving session information with all packages versions for reproducibility purposes 177 | sink("../outputs/2_3_harmonize_taxonomy_R_session.txt") 178 | sessionInfo() 179 | sink() 180 | # END OF SCRIPT -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/2_standardisation/2_4_citations.r: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Script to retrieve the full citation of the data sets contributed to ShareTrait 3 | #------------------------------------------------------------------------------- 4 | # Cleaning working space 5 | rm(list=ls()) 6 | 7 | # set the working directory to the folder containing this script: 8 | setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 9 | 10 | # check directory 11 | getwd() 12 | 13 | #Libraries 14 | library(dplyr) 15 | library(stringr) 16 | library(RefManageR) 17 | 18 | #load data 19 | df <- read.csv("../3_release/2_2_ShareTrait_DataBase_v1.0.0.csv",sep = ",",header = TRUE) 20 | length(unique(df$doi_publication)) 21 | # 37 publications 22 | 23 | length(unique(df$doi_dataset)) 24 | # 37 datasets 25 | 26 | # Extract the DOI text after "https://doi.org/" 27 | doi <- ifelse(!is.na(df$doi_publication), str_extract(df$doi_publication, "(?<=https://doi.org/).*"), NA) 28 | length(unique(doi)) 29 | doi <- unique(doi) 30 | 31 | # Retrieve the citation based on the DOIs 32 | 33 | refs <- GetBibEntryWithDOI(doi) 34 | WriteBib(refs,"../3_release/ShareTrait_DataBase_refs_v1.0.0.bib") 35 | 36 | # saving session information with all packages versions for reproducibility purposes 37 | sink("../outputs/2_4_citations_R_session.txt") 38 | sessionInfo() 39 | sink() 40 | # END OF SCRIPT -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/3_release/.RData -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/.Rhistory: -------------------------------------------------------------------------------- 1 | library(phytools) 2 | library(rotl) 3 | library(dplyr) 4 | #load data 5 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 6 | names(df) 7 | head(df) 8 | # exclude "Gryllus bimaculatus" 9 | df <- subset(df,df$species != "Gryllus bimaculatus") 10 | # generate list of species 11 | species <- sort(unique(df$species)) 12 | # obtaining data frame listing the Open Tree identifiers potentially matching our 13 | # list of species. 14 | taxa <- tnrs_match_names(names = species) 15 | # there are typos in the species list 16 | nrow(taxa[taxa$approximate_match==FALSE,]) 17 | # Lets see what are the typos, if exists 18 | taxa[taxa$approximate_match==TRUE,] 19 | # If there are typos, follow the example bellow to fix it 20 | #df$species_reported[df$species_reported == "old_name"] <- "corrected_name" 21 | # count species 22 | species <- sort(unique(df$species_reported)) 23 | taxa <- tnrs_match_names(names = species) 24 | # exploring which species return more than one match 25 | taxa[taxa$number_matches != 1,] 26 | #Reasons to make sure we retrieve the correct data 27 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 28 | for(i in 1:length(ott_id_tocheck)){ 29 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 30 | } 31 | # retrieving phylogenetic relationships among taxa in the form 32 | # of a trimmed sub-tree 33 | tree <- tol_induced_subtree(ott_ids = taxa[["ott_id"]], label_format = "name") 34 | plot(tree, cex= 1, label.offset =.1, no.margin = TRUE) 35 | # We are computing branch lengths for our tree following 36 | # Grafen (1989)(https://royalsocietypublishing.org/doi/abs/10.1098/rstb.1989.0106) 37 | is.ultrametric(tree) # if not run line below 38 | #load data 39 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 40 | names(df) 41 | head(df) 42 | # exclude "Gryllus bimaculatus" 43 | df <- subset(df,df$species != "Gryllus bimaculatus") 44 | # generate list of species 45 | species <- sort(unique(df$species)) 46 | # obtaining data frame listing the Open Tree identifiers potentially matching our 47 | # list of species. 48 | taxa <- tnrs_match_names(names = species) 49 | # there are typos in the species list 50 | nrow(taxa[taxa$approximate_match==FALSE,]) 51 | # Lets see what are the typos, if exists 52 | taxa[taxa$approximate_match==TRUE,] 53 | # count species 54 | species <- sort(unique(df$species_reported)) 55 | taxa <- tnrs_match_names(names = species) 56 | # exploring which species return more than one match 57 | taxa[taxa$number_matches != 1,] 58 | #Reasons to make sure we retrieve the correct data 59 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 60 | for(i in 1:length(ott_id_tocheck)){ 61 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 62 | } 63 | # retrieving phylogenetic relationships among taxa in the form 64 | # of a trimmed sub-tree 65 | tree <- tol_induced_subtree(ott_ids = taxa[["ott_id"]], label_format = "name") 66 | plot(tree, cex= 1, label.offset =.1, no.margin = TRUE) 67 | # We are computing branch lengths for our tree following 68 | # Grafen (1989)(https://royalsocietypublishing.org/doi/abs/10.1098/rstb.1989.0106) 69 | is.ultrametric(tree) # if not run line below 70 | tree_random.fixed<-compute.brlen(tree,method = "Grafen") 71 | is.ultrametric(tree_random.fixed) 72 | is.binary(tree_random.fixed) 73 | # There are some polytomies. To take care of these polytomies, we are going to use a 74 | # randomization approach 75 | set.seed(111) 76 | tree_random.fixed <- multi2di(tree_random.fixed,random=TRUE) 77 | is.binary(tree_random.fixed) 78 | ## add tip "Gryllus bimaculatus" to sister taxon "Gryllus campestris" 79 | tip<-"Gryllus_bimaculatus" 80 | sister<-"Gryllus_campestris" 81 | tree_random.fixed$tip.label 82 | tree_random.fixed<-bind.tip(tree_random.fixed,tip,where=which(tree_random.fixed$tip.label==sister), 83 | position=0.5*tree_random.fixed$edge.length[which(tree_random.fixed$edge[,2]== 84 | which(tree_random.fixed$tip.label==sister))]) 85 | length(tree_random.fixed$tip.label) 86 | #pdf("Phylogenetic tree for 35 species included in ShareTrait_DataBase_v1.0.0.pdf", width=10,height=10) 87 | jpeg("Phylogenetic tree for 35 species included in ShareTrait_DataBase_v1.0.0.jpg", width=10,height=10,units = "in", res = 300) 88 | plot(tree_random.fixed, cex= 1, label.offset =.05, no.margin = TRUE) 89 | dev.off() 90 | # and as a .tre for phylogenetic corrections or ploting 91 | write.tree(tree_random.fixed,"Phylogenetic tree for 35 species included in ShareTrait_DataBase_v1.0.0.tre") 92 | # load the dataset 93 | dat<-read.csv("../outputs/2_2_ShareTrait_DataBase.csv",sep = ",",header = TRUE) 94 | # and Merge taxonomy with data 95 | ShareTrait_DataBase <- left_join(dat,df, by = "species_reported") 96 | View(ShareTrait_DataBase) 97 | # fix bug of extra space in column "species_reported" 98 | dat$species_reported 99 | df$species_reported 100 | # fix bug of extra space in column "species_reported" in the data frame "df" 101 | df$species_reported 102 | df$species_reported <- trimws(df$species_reported, "left") 103 | # fix bug of extra space in column "species_reported" in the data frame "df" 104 | df$species_reported 105 | # fix bug of extra space in column "species_reported" in the data frame "df" 106 | df$species_reported 107 | df$species_reported <- trimws(df$species_reported, "left") 108 | # ------------------------------------------------------------------------------ 109 | # Script to create a phylogenetic tree from Open Tree of Life. 110 | # Code adapted by FP Leiva from: https://github.com/ASanchez-Tojar and http://blog.phytools.org/ 111 | # ------------------------------------------------------------------------------ 112 | # Cleaning working space 113 | rm(list = ls()) 114 | # Check directory 115 | getwd() 116 | # Libraries 117 | library(phytools) 118 | library(rotl) 119 | library(dplyr) 120 | #load data 121 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 122 | names(df) 123 | head(df) 124 | # exclude "Gryllus bimaculatus" 125 | df <- subset(df,df$species != "Gryllus bimaculatus") 126 | # generate list of species 127 | species <- sort(unique(df$species)) 128 | # obtaining data frame listing the Open Tree identifiers potentially matching our 129 | # list of species. 130 | taxa <- tnrs_match_names(names = species) 131 | # there are typos in the species list 132 | nrow(taxa[taxa$approximate_match==FALSE,]) 133 | # Lets see what are the typos, if exists 134 | taxa[taxa$approximate_match==TRUE,] 135 | # If there are typos, follow the example bellow to fix it 136 | #df$species_reported[df$species_reported == "old_name"] <- "corrected_name" 137 | # count species 138 | species <- sort(unique(df$species_reported)) 139 | taxa <- tnrs_match_names(names = species) 140 | # exploring which species return more than one match 141 | taxa[taxa$number_matches != 1,] 142 | #Reasons to make sure we retrieve the correct data 143 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 144 | for(i in 1:length(ott_id_tocheck)){ 145 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 146 | } 147 | # retrieving phylogenetic relationships among taxa in the form 148 | # of a trimmed sub-tree 149 | tree <- tol_induced_subtree(ott_ids = taxa[["ott_id"]], label_format = "name") 150 | plot(tree, cex= 1, label.offset =.1, no.margin = TRUE) 151 | # We are computing branch lengths for our tree following 152 | # Grafen (1989)(https://royalsocietypublishing.org/doi/abs/10.1098/rstb.1989.0106) 153 | is.ultrametric(tree) # if not run line below 154 | # ------------------------------------------------------------------------------ 155 | # Script to create a phylogenetic tree from Open Tree of Life. 156 | # Code adapted by FP Leiva from: https://github.com/ASanchez-Tojar and http://blog.phytools.org/ 157 | # ------------------------------------------------------------------------------ 158 | # Cleaning working space 159 | rm(list = ls()) 160 | # Check directory 161 | getwd() 162 | # Libraries 163 | library(phytools) 164 | library(rotl) 165 | library(dplyr) 166 | #load data 167 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 168 | names(df) 169 | head(df) 170 | # exclude "Gryllus bimaculatus" 171 | df <- subset(df,df$species != "Gryllus bimaculatus") 172 | # generate list of species 173 | species <- sort(unique(df$species)) 174 | # obtaining data frame listing the Open Tree identifiers potentially matching our 175 | # list of species. 176 | taxa <- tnrs_match_names(names = species) 177 | # there are typos in the species list 178 | nrow(taxa[taxa$approximate_match==FALSE,]) 179 | # Lets see what are the typos, if exists 180 | taxa[taxa$approximate_match==TRUE,] 181 | # If there are typos, follow the example bellow to fix it 182 | #df$species_reported[df$species_reported == "old_name"] <- "corrected_name" 183 | # count species 184 | species <- sort(unique(df$species_reported)) 185 | taxa <- tnrs_match_names(names = species) 186 | # exploring which species return more than one match 187 | taxa[taxa$number_matches != 1,] 188 | #Reasons to make sure we retrieve the correct data 189 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 190 | for(i in 1:length(ott_id_tocheck)){ 191 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 192 | } 193 | # retrieving phylogenetic relationships among taxa in the form 194 | # of a trimmed sub-tree 195 | tree <- tol_induced_subtree(ott_ids = taxa[["ott_id"]], label_format = "name") 196 | plot(tree, cex= 1, label.offset =.1, no.margin = TRUE) 197 | # We are computing branch lengths for our tree following 198 | # Grafen (1989)(https://royalsocietypublishing.org/doi/abs/10.1098/rstb.1989.0106) 199 | is.ultrametric(tree) # if not run line below 200 | #reorder columns 201 | names(ShareTrait_DataBase) 202 | # Code adapted by FP Leiva from: https://github.com/ASanchez-Tojar and http://blog.phytools.org/ 203 | # ------------------------------------------------------------------------------ 204 | # Cleaning working space 205 | rm(list = ls()) 206 | function (x, df1, df2, ncp, log = FALSE) 207 | # Code adapted by FP Leiva from: https://github.com/ASanchez-Tojar and http://blog.phytools.org/ 208 | # ------------------------------------------------------------------------------ 209 | # Cleaning working space 210 | rm(list = ls()) 211 | # Check directory 212 | getwd() 213 | # Libraries 214 | library(phytools) 215 | library(rotl) 216 | library(dplyr) 217 | #load data 218 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 219 | names(df) 220 | head(df) 221 | # exclude "Gryllus bimaculatus" 222 | df <- subset(df,df$species != "Gryllus bimaculatus") 223 | # generate list of species 224 | species <- sort(unique(df$species)) 225 | # obtaining data frame listing the Open Tree identifiers potentially matching our 226 | # list of species. 227 | taxa <- tnrs_match_names(names = species) 228 | # there are typos in the species list 229 | nrow(taxa[taxa$approximate_match==FALSE,]) 230 | # Lets see what are the typos, if exists 231 | taxa[taxa$approximate_match==TRUE,] 232 | # count species 233 | species <- sort(unique(df$species_reported)) 234 | taxa <- tnrs_match_names(names = species) 235 | # exploring which species return more than one match 236 | taxa[taxa$number_matches != 1,] 237 | #Reasons to make sure we retrieve the correct data 238 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 239 | for(i in 1:length(ott_id_tocheck)){ 240 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 241 | } 242 | # ------------------------------------------------------------------------------ 243 | # Script to create a phylogenetic tree from Open Tree of Life. 244 | # Code adapted by FP Leiva from: https://github.com/ASanchez-Tojar and http://blog.phytools.org/ 245 | # Thanks Alfredo and Liam for sharing codes! 246 | # ------------------------------------------------------------------------------ 247 | # Cleaning working space 248 | rm(list = ls()) 249 | # Check directory 250 | getwd() 251 | # Libraries 252 | library(phytools) 253 | library(rotl) 254 | library(dplyr) 255 | #load data 256 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 257 | names(df) 258 | head(df) 259 | # exclude "Gryllus bimaculatus" 260 | df <- subset(df,df$species != "Gryllus bimaculatus") 261 | # generate list of species 262 | species <- sort(unique(df$species)) 263 | # obtaining data frame listing the Open Tree identifiers potentially matching our 264 | # list of species. 265 | taxa <- tnrs_match_names(names = species) 266 | # there are typos in the species list 267 | nrow(taxa[taxa$approximate_match==FALSE,]) 268 | # Lets see what are the typos, if exists 269 | taxa[taxa$approximate_match==TRUE,] 270 | # If there are typos, follow the example bellow to fix it 271 | # df$species_reported[df$species_reported == "old_name"] <- "corrected_name" 272 | # count species 273 | species <- sort(unique(df$species_reported)) 274 | taxa <- tnrs_match_names(names = species) 275 | # exploring which species return more than one match 276 | taxa[taxa$number_matches != 1,] 277 | # Reasons to make sure we retrieve the correct data 278 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 279 | for(i in 1:length(ott_id_tocheck)){ 280 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 281 | } 282 | # retrieving phylogenetic relationships among taxa in the form 283 | # of a trimmed sub-tree 284 | tree <- tol_induced_subtree(ott_ids = taxa[["ott_id"]], label_format = "name") 285 | plot(tree, cex= 1, label.offset =.1, no.margin = TRUE) 286 | # We are computing branch lengths for our tree following 287 | # Grafen (1989)(https://royalsocietypublishing.org/doi/abs/10.1098/rstb.1989.0106) 288 | is.ultrametric(tree) # if not run line below 289 | # Thanks Alfredo and Liam for sharing codes! 290 | # ------------------------------------------------------------------------------ 291 | # Cleaning working space 292 | rm(list = ls()) 293 | # Check directory 294 | getwd() 295 | # Libraries 296 | library(phytools) 297 | library(rotl) 298 | library(dplyr) 299 | #load data 300 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 301 | names(df) 302 | head(df) 303 | # exclude "Gryllus bimaculatus" 304 | df <- subset(df,df$species != "Gryllus bimaculatus") 305 | # generate list of species 306 | species <- sort(unique(df$species)) 307 | # obtaining data frame listing the Open Tree identifiers potentially matching our 308 | # list of species. 309 | taxa <- tnrs_match_names(names = species) 310 | # there are typos in the species list 311 | nrow(taxa[taxa$approximate_match==FALSE,]) 312 | # Lets see what are the typos, if exists 313 | taxa[taxa$approximate_match==TRUE,] 314 | # count species 315 | species <- sort(unique(df$species_reported)) 316 | taxa <- tnrs_match_names(names = species) 317 | # exploring which species return more than one match 318 | taxa[taxa$number_matches != 1,] 319 | # Reasons to make sure we retrieve the correct data 320 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 321 | for(i in 1:length(ott_id_tocheck)){ 322 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 323 | } 324 | # retrieving phylogenetic relationships among taxa in the form 325 | # of a trimmed sub-tree 326 | tree <- tol_induced_subtree(ott_ids = taxa[["ott_id"]], label_format = "name") 327 | plot(tree, cex= 1, label.offset =.1, no.margin = TRUE) 328 | # We are computing branch lengths for our tree following 329 | # Grafen (1989)(https://royalsocietypublishing.org/doi/abs/10.1098/rstb.1989.0106) 330 | is.ultrametric(tree) # if not run line below 331 | tree_random.fixed<-compute.brlen(tree,method = "Grafen") 332 | is.ultrametric(tree_random.fixed) 333 | is.binary(tree_random.fixed) 334 | # There are some polytomies. To take care of these polytomies, we are going to use a 335 | # randomization approach 336 | set.seed(111) 337 | tree_random.fixed <- multi2di(tree_random.fixed,random=TRUE) 338 | is.binary(tree_random.fixed) 339 | ## add tip "Gryllus bimaculatus" to sister taxon "Gryllus campestris" 340 | tip<-"Gryllus_bimaculatus" 341 | sister<-"Gryllus_campestris" 342 | tree_random.fixed$tip.label 343 | tree_random.fixed<-bind.tip(tree_random.fixed,tip,where=which(tree_random.fixed$tip.label==sister), 344 | position=0.5*tree_random.fixed$edge.length[which(tree_random.fixed$edge[,2]== 345 | which(tree_random.fixed$tip.label==sister))]) 346 | length(tree_random.fixed$tip.label) 347 | #pdf("Phylogenetic tree for 35 species included in ShareTrait_DataBase_v1.0.0.pdf", width=10,height=10) 348 | jpeg("Phylogenetic tree for 35 species included in ShareTrait_DataBase_v1.0.0.jpg", width=10,height=10,units = "in", res = 300) 349 | plot(tree_random.fixed, cex= 1, label.offset =.05, no.margin = TRUE) 350 | dev.off() 351 | # and as a .tre for phylogenetic corrections or ploting 352 | write.tree(tree_random.fixed,"Phylogenetic tree for 35 species included in ShareTrait_DataBase_v1.0.0.tre") 353 | # load the dataset 354 | dat<-read.csv("../outputs/2_2_ShareTrait_DataBase.csv",sep = ",",header = TRUE) 355 | # fix bug of extra space in column "species_reported" in the data frame "df" 356 | df$species_reported 357 | df$species_reported <- trimws(df$species_reported, "left") 358 | # and Merge taxonomy with data 359 | ShareTrait_DataBase <- left_join(dat,df, by = "species_reported") 360 | View(ShareTrait_DataBase) 361 | # ------------------------------------------------------------------------------ 362 | # Script to create a phylogenetic tree from Open Tree of Life. 363 | # Code adapted by FP Leiva from: https://github.com/ASanchez-Tojar and http://blog.phytools.org/ 364 | # Thanks Alfredo and Liam for sharing codes! 365 | # ------------------------------------------------------------------------------ 366 | # Cleaning working space 367 | rm(list = ls()) 368 | # Check directory 369 | getwd() 370 | # Libraries 371 | library(phytools) 372 | library(rotl) 373 | library(dplyr) 374 | #load data 375 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 376 | names(df) 377 | head(df) 378 | # exclude "Gryllus bimaculatus" 379 | df <- subset(df,df$species != "Gryllus bimaculatus") 380 | # generate list of species 381 | species <- sort(unique(df$species)) 382 | # obtaining data frame listing the Open Tree identifiers potentially matching our 383 | # list of species. 384 | taxa <- tnrs_match_names(names = species) 385 | # there are typos in the species list 386 | nrow(taxa[taxa$approximate_match==FALSE,]) 387 | # Lets see what are the typos, if exists 388 | taxa[taxa$approximate_match==TRUE,] 389 | # If there are typos, follow the example bellow to fix it 390 | # df$species_reported[df$species_reported == "old_name"] <- "corrected_name" 391 | # count species 392 | species <- sort(unique(df$species_reported)) 393 | taxa <- tnrs_match_names(names = species) 394 | # exploring which species return more than one match 395 | taxa[taxa$number_matches != 1,] 396 | # Reasons to make sure we retrieve the correct data 397 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 398 | for(i in 1:length(ott_id_tocheck)){ 399 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 400 | } 401 | # retrieving phylogenetic relationships among taxa in the form 402 | # of a trimmed sub-tree 403 | tree <- tol_induced_subtree(ott_ids = taxa[["ott_id"]], label_format = "name") 404 | plot(tree, cex= 1, label.offset =.1, no.margin = TRUE) 405 | # We are computing branch lengths for our tree following 406 | # Grafen (1989)(https://royalsocietypublishing.org/doi/abs/10.1098/rstb.1989.0106) 407 | is.ultrametric(tree) # if not run line below 408 | # Thanks Alfredo and Liam for sharing codes! 409 | # ------------------------------------------------------------------------------ 410 | # Cleaning working space 411 | rm(list = ls()) 412 | # Check directory 413 | getwd() 414 | # Libraries 415 | library(phytools) 416 | library(rotl) 417 | library(dplyr) 418 | #load data 419 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 420 | names(df) 421 | head(df) 422 | # exclude "Gryllus bimaculatus" 423 | df <- subset(df,df$species != "Gryllus bimaculatus") 424 | # generate list of species 425 | species <- sort(unique(df$species)) 426 | # obtaining data frame listing the Open Tree identifiers potentially matching our 427 | # list of species. 428 | taxa <- tnrs_match_names(names = species) 429 | # there are typos in the species list 430 | nrow(taxa[taxa$approximate_match==FALSE,]) 431 | # Lets see what are the typos, if exists 432 | taxa[taxa$approximate_match==TRUE,] 433 | # count species 434 | species <- sort(unique(df$species_reported)) 435 | taxa <- tnrs_match_names(names = species) 436 | # exploring which species return more than one match 437 | taxa[taxa$number_matches != 1,] 438 | # Reasons to make sure we retrieve the correct data 439 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 440 | for(i in 1:length(ott_id_tocheck)){ 441 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 442 | } 443 | # retrieving phylogenetic relationships among taxa in the form 444 | # of a trimmed sub-tree 445 | tree <- tol_induced_subtree(ott_ids = taxa[["ott_id"]], label_format = "name") 446 | plot(tree, cex= 1, label.offset =.1, no.margin = TRUE) 447 | # We are computing branch lengths for our tree following 448 | # Grafen (1989)(https://royalsocietypublishing.org/doi/abs/10.1098/rstb.1989.0106) 449 | is.ultrametric(tree) # if not run line below 450 | tree_random.fixed<-compute.brlen(tree,method = "Grafen") 451 | is.ultrametric(tree_random.fixed) 452 | is.binary(tree_random.fixed) 453 | # There are some polytomies. To take care of these polytomies, we are going to use a 454 | # randomization approach 455 | set.seed(111) 456 | tree_random.fixed <- multi2di(tree_random.fixed,random=TRUE) 457 | is.binary(tree_random.fixed) 458 | ## add tip "Gryllus bimaculatus" to sister taxon "Gryllus campestris" 459 | tip<-"Gryllus_bimaculatus" 460 | sister<-"Gryllus_campestris" 461 | tree_random.fixed$tip.label 462 | tree_random.fixed<-bind.tip(tree_random.fixed,tip,where=which(tree_random.fixed$tip.label==sister), 463 | position=0.5*tree_random.fixed$edge.length[which(tree_random.fixed$edge[,2]== 464 | which(tree_random.fixed$tip.label==sister))]) 465 | length(tree_random.fixed$tip.label) 466 | #pdf("Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.pdf", width=10,height=10) 467 | jpeg("Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.jpg", width=10,height=10,units = "in", res = 300) 468 | plot(tree_random.fixed, cex= 1, label.offset =.05, no.margin = TRUE) 469 | dev.off() 470 | # and as a .tre for phylogenetic corrections or ploting 471 | write.tree(tree_random.fixed,"Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.tre") 472 | # load the dataset 473 | dat<-read.csv("../outputs/2_2_ShareTrait_DataBase.csv",sep = ",",header = TRUE) 474 | # fix bug of extra space in column "species_reported" in the data frame "df" 475 | df$species_reported 476 | df$species_reported <- trimws(df$species_reported, "left") 477 | # and Merge taxonomy with data 478 | ShareTrait_DataBase <- left_join(dat,df, by = "species_reported") 479 | #reorder columns 480 | names(ShareTrait_DataBase) 481 | ShareTrait_DataBase <- ShareTrait_DataBase[, c("dataset_id", "date_of_contribution", "type_of_reference", "doi_dataset", "doi_publication", "comments_reference", 482 | "species_reported","phylum", "class", "order","family", "genus", "species", "source", "taxo_level", "comments_taxonomy", 483 | "realm_general", "realm_specific", "elevation_of_collection", "depth_of_collection", "origin", "location_description", "comments_location", 484 | "lat_decimal", "long_decimal", 485 | "year_of_collection_initial", "year_of_collection_final", "yyyymmdd_of_collection_initial", 486 | "yyyymmdd_of_collection_final", "comments_timing", "experiment_location", "maintained", 487 | "maintenance_duration_days", "maintenance_duration_generations", "maintenance_temperature", 488 | "maintenance_photoperiod", "maintenance_humidity", "maintenance_oxygen", "maintenance_carbon_dioxide", 489 | "trait_name", "maintenance_salinity", "maintenance_ph", "maintenance_oxygen_units", 490 | "maintenance_carbon_dioxide_units", "maintenance_food_type", "acclimated", "acclimation_duration", 491 | "acclimation_temperature", "acclimation_salinity", "acclimation_ph", "acclimation_oxygen", 492 | "acclimation_carbon_dioxide", "acclimation_photoperiod", "acclimation_humidity", 493 | "acclimation_oxygen_units", "acclimation_carbon_dioxide_units", "acclimation_food_type", 494 | "test_temperature", "test_oxygen", "test_carbon_dioxide", "test_oxygen_units", 495 | "test_carbon_dioxide_units", "test_photoperiod", "test_humidity", "comments_experimental_conditions", 496 | "test_food_type", "test_salinity", "test_ph", "strategy_of_protection", "sex", 497 | "life_stage_general_initial", "life_stage_general_final", "life_stage_specific_initial", 498 | "life_stage_specific_final", "life_stage_general", "life_stage_specific", "size_type", 499 | "size_units", "size_value_initial", "size_value_final", "size_value", "parental_size_type", 500 | "parental_size_units", "parental_size_value", "parental_age", "parental_age_units", 501 | "mating", "method_type", "fecundity_temporal_unit", "reproductive_stage", "offspring_developmental_stage", 502 | "offspring_size_type", "offspring_size_units", "offspring_size_value", "metabolic_rate_type", 503 | "acclimation_chamber", "fasting_time", "sensor_type", "respiration_volume", "delay_time", 504 | "respiratory_chamber_material", "incubation_time", "respirometry_type", "breathing_mode", 505 | "trait_value", "trait_unit", "comments_trait", "trait_error_estimate", "trait_error_type", 506 | "sample_size", "trait_converted", "fresh_mass_gram")] 507 | # Save the cleaned dataframe to a new file 508 | write.csv(ShareTrait_DataBase, "../3_release/ShareTrait_DataBase_v1.0.0.csv", row.names = FALSE) 509 | # saving session information with all packages versions for reproducibility purposes 510 | sink("../outputs/3_2_Phylogenetic_tree_ShareTrait_R_session.txt") 511 | sessionInfo() 512 | sink() 513 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/3_1_Global_map_ShareTrait.r: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Global map with studies included on ShareTrait 3 | # ------------------------------------------------------------------------------ 4 | # Cleaning working space 5 | rm(list = ls()) 6 | 7 | # Check directory 8 | getwd() 9 | 10 | # libraries 11 | library(rgdal) 12 | library(sp) 13 | library(data.table) 14 | library(ggplot2) 15 | library(mapview) 16 | library(dplyr) 17 | library(cowplot) 18 | library(tidyverse) 19 | library(RColorBrewer) 20 | library(colorRamps) 21 | 22 | # load data 23 | ShareTrait <- fread("../outputs/2_2_ShareTrait_DataBase.csv", 24 | #colClasses = "character", 25 | na.strings = c("NA","N/A","null", ""), 26 | select = c("trait_name","species_reported","realm_general","lat_decimal","long_decimal")) 27 | 28 | # check if the columns were selected correctly 29 | colnames(ShareTrait) 30 | 31 | # rename some columns 32 | names(ShareTrait)[names(ShareTrait) == "long_decimal"] <- "lon" 33 | names(ShareTrait)[names(ShareTrait) == "lat_decimal"] <- "lat" 34 | 35 | # check if the columns were renamed correctly 36 | print(colnames(ShareTrait)) 37 | 38 | # exclude empty rows 39 | df <- drop_na(ShareTrait) 40 | 41 | # check the range of 'lon' column 42 | print(range(df$lon) %between% c(-180, 180)) 43 | 44 | # check the range of 'lat' column 45 | print(range(df$lat) %between% c(-90, 90)) 46 | 47 | #yes, they are within expected ranges 48 | 49 | # Transform unprojected long-lat in Robinson coordinates 50 | df[, c("X.prj","Y.prj") := data.table(rgdal::project(xy = cbind(lon, lat), 51 | proj = "+proj=robin"))] 52 | 53 | 54 | # Check points with interactive map 55 | points_WGS84 <- sp::SpatialPointsDataFrame(coords = df[,.(lon, lat)], # order matters 56 | data = df[,.(trait_name)], 57 | proj4string = CRS("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")) 58 | html_map <- mapview(points_WGS84) 59 | # save as html 60 | mapshot(html_map, url = "Global_map.html") 61 | 62 | # ------------------------------------------------------------------------------ 63 | # Load & prepare NaturalEarth shapefiles 64 | # ------------------------------------------------------------------------------ 65 | load("NaturalEarth.RData"); setDT(lbl.Y); setDT(lbl.X) 66 | # Details about NaturalEarth shapefiles: 67 | # The files were already downloaded from http://www.naturalearthdata.com/ 68 | # Graticules were adjusted to 10 dg for latitude lines and 20 dg for longitude lines 69 | # (some editing was carried in ArcMap) 70 | 71 | # Project from long-lat (unprojected) to Robinson projection 72 | NE_countries_rob <- spTransform(NE_countries, CRS("+proj=robin")) 73 | NE_graticules_rob <- spTransform(NE_graticules, CRS("+proj=robin")) 74 | NE_box_rob <- spTransform(NE_box, CRS("+proj=robin")) 75 | 76 | # Shift longitude of OX graticule labels. This was needed because, for example, 77 | # the 160 dg label ended up on the 180 longitude line when projecting to 78 | # Robinson. A shift is applied for each degree in the sequence 79 | # seq(from = 160, to = 0, by = -20) 80 | shift <- c(10, 10, 9, 8, 8, 5, 2, 0, 0) 81 | lbl.X[, shift := rep(c(shift, -rev(shift)[-1]), 2)] 82 | lbl.X 83 | lbl.X[, lon := lon - shift] # apply shift 84 | lbl.X[, shift := NULL] # delete column 85 | 86 | # Project the labales for graticules to Robinson 87 | lbl.Y[, c("X.prj","Y.prj") := data.table(rgdal::project(xy = cbind(lon, lat), 88 | proj = "+proj=robin"))] 89 | lbl.X[, c("X.prj","Y.prj") := data.table(rgdal::project(xy = cbind(lon, lat), 90 | proj = "+proj=robin"))] 91 | # Create helper columns with nudged coordinates for plotting graticule labels. 92 | # For lbl.Y nudge longitude and for lbl.X nudge latitude. 93 | # Give nudge values in dg (if you change, re-run also the projection lines above) 94 | my_nudge <- cbind(nudge_lon = 10, 95 | nudge_lat = 4) 96 | my_nudge <- rgdal::project(my_nudge, proj = "+proj=robin") 97 | lbl.Y[, X.prj := ifelse(lon < 0, 98 | yes = X.prj - my_nudge[1,1], 99 | no = X.prj + my_nudge[1,1])] 100 | lbl.X[, Y.prj := ifelse(lat < 0, 101 | yes = Y.prj - my_nudge[1,2], 102 | no = Y.prj + my_nudge[1,2])] 103 | 104 | 105 | # ------------------------------------------------------------------------------ 106 | # Plot map 107 | # ------------------------------------------------------------------------------ 108 | 109 | # Prepare base map 110 | base_map <- 111 | ggplot() + 112 | # ___ add graticules projected to Robinson 113 | geom_path(data = NE_graticules_rob, 114 | aes(x = long, 115 | y = lat, 116 | group = group), 117 | linetype = "dotted", 118 | color = "grey50", 119 | size = 0.2) + 120 | # ___ add Natural Earth countries projected to Robinson 121 | geom_polygon(data = NE_countries_rob, 122 | aes(x = long, 123 | y = lat, 124 | group = group), 125 | colour = "gray80", # country border color 126 | fill = "gray80", # country fill color 127 | size = 0.2) + 128 | # ___ add graticule labels - latitude and longitude 129 | geom_text(data = lbl.Y, 130 | aes(x = X.prj, 131 | y = Y.prj, 132 | label = lbl), 133 | color = "black", 134 | size = 0.8) + 135 | geom_text(data = lbl.X, 136 | aes(x = X.prj, 137 | y = Y.prj, 138 | label = lbl), 139 | color = "black", 140 | size = 0.8) + 141 | # ___ add Natural Earth box projected to Robinson 142 | geom_polygon(data = NE_box_rob, 143 | aes(x = long, 144 | y = lat), 145 | colour ="black", 146 | fill ="transparent", 147 | size = 0.2) + 148 | # "Regions defined for each Polygons" warning has to do with fortify 149 | # transformation. Might get deprecated in future. 150 | # ___ the default ratio = 1 in coord_fixed ensures that one unit on the x-axis 151 | # is the same length as one unit on the y-axis 152 | coord_fixed(ratio = 1) + 153 | # # ___ remove the background and default gridlines 154 | theme_void() 155 | 156 | base_map 157 | 158 | # Add study locations (points) 159 | ShareTrait_map <- base_map + 160 | geom_point(data = df, 161 | aes(x = X.prj, y = Y.prj, colour = trait_name), 162 | size = 0.5, alpha = .6, shape = 16) 163 | 164 | ShareTrait_map <- ShareTrait_map + 165 | guides(colour = guide_legend(override.aes = list(alpha = .8))) + 166 | theme(legend.position = "bottom", legend.justification = "center") + 167 | labs(color = "") + 168 | theme( 169 | legend.position = "bottom", 170 | legend.key.height = unit(0.1, "cm"), 171 | legend.key.width = unit(0.1, "cm"), 172 | legend.text = element_text(size = 6, family = "Times"), 173 | legend.title = element_text(size = 8, family = "Times")) 174 | ShareTrait_map 175 | # ------------------------------------------------------------------------------ 176 | # Save as pdf and jpeg file 177 | # ------------------------------------------------------------------------------ 178 | # ggsave(plot = ShareTrait_map, 179 | # filename = "Global_map_ShareTrait_DataBase_v1.0.0.pdf", 180 | # width = 14, 181 | # height = 7, 182 | # units = "cm") 183 | 184 | ggsave(plot = ShareTrait_map, 185 | filename = "Global_map_ShareTrait_DataBase_v1.0.0.jpg", 186 | width = 14, 187 | height = 7, 188 | units = "cm", 189 | dpi = 1000) 190 | 191 | # saving session information with all packages versions for reproducibility purposes 192 | sink("../outputs/3_1_Global_map_ShareTrait_R_session.txt") 193 | sessionInfo() 194 | sink() 195 | # END OF SCRIPT -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/3_2_Phylogenetic_tree_ShareTrait.r: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Script to create a phylogenetic tree from Open Tree of Life. 3 | 4 | # Code adapted by FP Leiva from: https://github.com/ASanchez-Tojar and http://blog.phytools.org/ 5 | 6 | # Thanks Alfredo and Liam for sharing codes! 7 | # ------------------------------------------------------------------------------ 8 | # Cleaning working space 9 | rm(list = ls()) 10 | 11 | # Check directory 12 | getwd() 13 | 14 | # Libraries 15 | library(phytools) 16 | library(rotl) 17 | library(dplyr) 18 | 19 | #load data 20 | df<-read.csv("../outputs/2_3_harmonized_taxonomy_ShareTrait.csv",sep = ",",header = TRUE) 21 | names(df) 22 | head(df) 23 | 24 | # exclude "Gryllus bimaculatus" 25 | df <- subset(df,df$species != "Gryllus bimaculatus") 26 | 27 | # generate list of species 28 | species <- sort(unique(df$species)) 29 | 30 | # obtaining data frame listing the Open Tree identifiers potentially matching our 31 | # list of species. 32 | taxa <- tnrs_match_names(names = species) 33 | 34 | # there are typos in the species list 35 | nrow(taxa[taxa$approximate_match==FALSE,]) 36 | 37 | # Lets see what are the typos, if exists 38 | taxa[taxa$approximate_match==TRUE,] 39 | 40 | # If there are typos, follow the example bellow to fix it 41 | 42 | # df$species_reported[df$species_reported == "old_name"] <- "corrected_name" 43 | 44 | # count species 45 | species <- sort(unique(df$species_reported)) 46 | taxa <- tnrs_match_names(names = species) 47 | 48 | # exploring which species return more than one match 49 | taxa[taxa$number_matches != 1,] 50 | 51 | # Reasons to make sure we retrieve the correct data 52 | ott_id_tocheck <- taxa[taxa$number_matches != 1,"ott_id"] 53 | 54 | for(i in 1:length(ott_id_tocheck)){ 55 | print(inspect(taxa, ott_id = ott_id_tocheck[i])) 56 | } 57 | 58 | # retrieving phylogenetic relationships among taxa in the form 59 | # of a trimmed sub-tree 60 | tree <- tol_induced_subtree(ott_ids = taxa[["ott_id"]], label_format = "name") 61 | 62 | plot(tree, cex= 1, label.offset =.1, no.margin = TRUE) 63 | 64 | # We are computing branch lengths for our tree following 65 | # Grafen (1989)(https://royalsocietypublishing.org/doi/abs/10.1098/rstb.1989.0106) 66 | is.ultrametric(tree) # if not run line below 67 | tree_random.fixed<-compute.brlen(tree,method = "Grafen") 68 | is.ultrametric(tree_random.fixed) 69 | 70 | # Dealing with polytomies We can check for the existence of polytomies by running the 71 | # following code. If polytomies exist, the output will be 72 | # `FALSE`, and vice versa. 73 | 74 | is.binary(tree_random.fixed) 75 | 76 | # There are some polytomies. To take care of these polytomies, we are going to use a 77 | # randomization approach 78 | set.seed(111) 79 | tree_random.fixed <- multi2di(tree_random.fixed,random=TRUE) 80 | is.binary(tree_random.fixed) 81 | 82 | ## add tip "Gryllus bimaculatus" to sister taxon "Gryllus campestris" 83 | tip<-"Gryllus_bimaculatus" 84 | sister<-"Gryllus_campestris" 85 | 86 | tree_random.fixed$tip.label 87 | tree_random.fixed<-bind.tip(tree_random.fixed,tip,where=which(tree_random.fixed$tip.label==sister), 88 | position=0.5*tree_random.fixed$edge.length[which(tree_random.fixed$edge[,2]== 89 | which(tree_random.fixed$tip.label==sister))]) 90 | 91 | length(tree_random.fixed$tip.label) 92 | #pdf("Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.pdf", width=10,height=10) 93 | jpeg("Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.jpg", width=10,height=10,units = "in", res = 300) 94 | plot(tree_random.fixed, cex= 1, label.offset =.05, no.margin = TRUE) 95 | dev.off() 96 | 97 | # and as a .tre for phylogenetic corrections or ploting 98 | write.tree(tree_random.fixed,"Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.tre") 99 | 100 | # load the dataset 101 | dat<-read.csv("../outputs/2_2_ShareTrait_DataBase.csv",sep = ",",header = TRUE) 102 | 103 | # fix bug of extra space in column "species_reported" in the data frame "df" 104 | df$species_reported 105 | df$species_reported <- trimws(df$species_reported, "left") 106 | 107 | # and Merge taxonomy with data 108 | ShareTrait_DataBase <- left_join(dat,df, by = "species_reported") 109 | 110 | #reorder columns 111 | names(ShareTrait_DataBase) 112 | 113 | ShareTrait_DataBase <- ShareTrait_DataBase[, c("dataset_id", "date_of_contribution", "type_of_reference", "doi_dataset", "doi_publication", "comments_reference", 114 | "species_reported","phylum", "class", "order","family", "genus", "species", "source", "taxo_level", "comments_taxonomy", 115 | "realm_general", "realm_specific", "elevation_of_collection", "depth_of_collection", "origin", "location_description", "comments_location", 116 | "lat_decimal", "long_decimal", 117 | "year_of_collection_initial", "year_of_collection_final", "yyyymmdd_of_collection_initial", 118 | "yyyymmdd_of_collection_final", "comments_timing", "experiment_location", "maintained", 119 | "maintenance_duration_days", "maintenance_duration_generations", "maintenance_temperature", 120 | "maintenance_photoperiod", "maintenance_humidity", "maintenance_oxygen", "maintenance_carbon_dioxide", 121 | "trait_name", "maintenance_salinity", "maintenance_ph", "maintenance_oxygen_units", 122 | "maintenance_carbon_dioxide_units", "maintenance_food_type", "acclimated", "acclimation_duration", 123 | "acclimation_temperature", "acclimation_salinity", "acclimation_ph", "acclimation_oxygen", 124 | "acclimation_carbon_dioxide", "acclimation_photoperiod", "acclimation_humidity", 125 | "acclimation_oxygen_units", "acclimation_carbon_dioxide_units", "acclimation_food_type", 126 | "test_temperature", "test_oxygen", "test_carbon_dioxide", "test_oxygen_units", 127 | "test_carbon_dioxide_units", "test_photoperiod", "test_humidity", "comments_experimental_conditions", 128 | "test_food_type", "test_salinity", "test_ph", "strategy_of_protection", "sex", 129 | "life_stage_general_initial", "life_stage_general_final", "life_stage_specific_initial", 130 | "life_stage_specific_final", "life_stage_general", "life_stage_specific", "size_type", 131 | "size_units", "size_value_initial", "size_value_final", "size_value", "parental_size_type", 132 | "parental_size_units", "parental_size_value", "parental_age", "parental_age_units", 133 | "mating", "method_type", "fecundity_temporal_unit", "reproductive_stage", "offspring_developmental_stage", 134 | "offspring_size_type", "offspring_size_units", "offspring_size_value", "metabolic_rate_type", 135 | "acclimation_chamber", "fasting_time", "sensor_type", "respiration_volume", "delay_time", 136 | "respiratory_chamber_material", "incubation_time", "respirometry_type", "breathing_mode", 137 | "trait_value", "trait_unit", "comments_trait", "trait_error_estimate", "trait_error_type", 138 | "sample_size", "trait_converted", "fresh_mass_gram")] 139 | 140 | # Save the cleaned dataframe to a new file 141 | write.csv(ShareTrait_DataBase, "../3_release/ShareTrait_DataBase_v1.0.0.csv", row.names = FALSE) 142 | 143 | # saving session information with all packages versions for reproducibility purposes 144 | sink("../outputs/3_2_Phylogenetic_tree_ShareTrait_R_session.txt") 145 | sessionInfo() 146 | sink() 147 | # END OF SCRIPT -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/3_3_Exploratory_plots_ShareTrait.r: -------------------------------------------------------------------------------- 1 | #clear your work environment 2 | rm(list=ls()) 3 | 4 | #Libraries 5 | library(dplyr) 6 | library(tidyverse) 7 | library(ggExtra) 8 | library(RColorBrewer) 9 | library(ggplot2) 10 | library(ggpubr) 11 | library(stringr) 12 | library(cowplot) 13 | library(ggrepel) 14 | library(colorRamps) 15 | 16 | df <- read.csv("../3_release/ShareTrait_DataBase_v1.0.0.csv") %>% 17 | filter(!is.na(trait_value)) 18 | 19 | Fig_1a <- df %>% 20 | filter(trait_name == "metabolic_rate") %>% 21 | filter(!is.na(fresh_mass_gram)) %>% 22 | filter(trait_value > 0 ) %>% 23 | ggplot(aes(x = log10(fresh_mass_gram), y = log10(trait_value))) + 24 | geom_point(size = 3, aes(color = realm_general), alpha = 0.4) + 25 | scale_x_continuous( 26 | name = "Fresh mass in grams", 27 | labels = scales::math_format(10^.x), 28 | limits = c(-6, 4)) + 29 | scale_y_continuous( 30 | name = "Metabolic rate (mg oxygen per hour per ind)", 31 | labels = scales::math_format(10^.x), 32 | limits = c(-6, 4)) + 33 | annotation_logticks() + 34 | scale_color_manual(values = c("brackish" = "#FF7733", "freshwater" = "#0077CC", "intertidal" = "#55AA33", "marine" = "blue", "terrestrial" = "#885544")) + # Specific colors in RGB format 35 | theme_bw() + 36 | guides(colour = guide_legend(override.aes = list(alpha = 1))) + 37 | theme(legend.position = "bottom", # Legend position 38 | legend.justification = "center", # Legend justification 39 | legend.box = "horizontal", # Legend box style 40 | legend.title = element_blank(), # Remove legend title 41 | axis.title.x = element_text(size = 12), # Size of x-axis label text 42 | axis.title.y = element_text(size = 12), # Size of y-axis label text 43 | axis.text = element_text(size = 10), # Size of axis tick labels 44 | axis.title = element_text(size = 12)) + # Size of axis titles 45 | annotate("text", x = 0, y = -6.5, label = "Fresh mass in grams", hjust = 0, size = 4) + # Annotation for x-axis label 46 | annotate("text", x = -7, y = 0, label = "Metabolic rate (mg oxygen per hour per ind)", hjust = 0, size = 4) # Annotation for y-axis label 47 | 48 | Fig_1a 49 | 50 | 51 | Fig_1b <- df %>% 52 | filter(trait_name == "development") %>% 53 | filter(!is.na(test_temperature)) %>% 54 | ggplot(aes(x = test_temperature, y = trait_value)) + 55 | geom_point(size = 3, alpha = 0.6, shape = 16, aes(color = realm_general)) + 56 | scale_color_manual(values = c("brackish" = "#FF7733", "freshwater" = "#0077CC", "intertidal" = "#55AA33", "marine" = "blue", "terrestrial" = "#885544")) + # Specify specific colors for each category in realm_general 57 | scale_x_continuous( 58 | name = "Developmental temperature (C)", # X-axis label 59 | limits = c(0,35) # Specify the desired limits 60 | ) + 61 | scale_y_continuous( 62 | name = "Development time (Days)", # Y-axis label 63 | limits = c(0,180) # Specify the desired limits 64 | ) + 65 | theme_bw() + 66 | guides(colour = guide_legend(override.aes = list(alpha = 1))) + 67 | theme( 68 | legend.position = "bottom", # Position the legend at the bottom 69 | legend.justification = "center", # Center the legend horizontally 70 | legend.box = "horizontal", # Style the legend box 71 | legend.title = element_blank(), # Remove the legend title 72 | axis.title.x = element_text(size = 12), # Size of x-axis label text 73 | axis.title.y = element_text(size = 12), # Size of y-axis label text 74 | axis.text = element_text(size = 10), # Size of axis tick labels 75 | axis.title = element_text(size = 12) # Size of axis titles 76 | ) 77 | 78 | Fig_1b 79 | 80 | Fig_1c <- df %>% 81 | filter(trait_name == "fecundity") %>% 82 | filter(parental_size_type == "fresh body mass") %>% 83 | filter(parental_size_units == "gram") %>% 84 | filter(trait_value > 0) %>% 85 | ggplot(aes(x = log10(parental_size_value), y = log10(trait_value))) + 86 | geom_point(size = 3, alpha = 0.6, shape = 16, aes(color = realm_general)) + 87 | scale_color_manual(values = c("brackish" = "#FF7733", "freshwater" = "#0077CC", "intertidal" = "#55AA33", "marine" = "blue","terrestrial" = "#885544")) + # Specify specific colors for each category in realm_general 88 | scale_x_continuous( 89 | name = "Fresh mass of the parents in grams", # X-axis label 90 | labels = scales::math_format(10^.x), 91 | limits = c(-1,4)) + # Specify the desired limits 92 | annotation_logticks() + 93 | scale_y_continuous( 94 | name = "Fecundity (offspring number)", # Y-axis label 95 | labels = scales::math_format(10^.x), 96 | limits = c(-1,5)) + # Specify the desired limits 97 | annotation_logticks() + 98 | theme_bw() + 99 | guides(colour = guide_legend(override.aes = list(alpha = 1))) + 100 | theme( 101 | legend.position = "bottom", # Position the legend at the bottom 102 | legend.justification = "center", # Center the legend horizontally 103 | legend.box = "horizontal", # Style the legend box 104 | legend.title = element_blank(), # Remove the legend title 105 | axis.title.x = element_text(size = 12), # Size of x-axis label text 106 | axis.title.y = element_text(size = 12), # Size of y-axis label text 107 | axis.text = element_text(size = 10), # Size of axis tick labels 108 | axis.title = element_text(size = 12) # Size of axis titles 109 | ) 110 | 111 | Fig_1c 112 | #------------------------------------------------------------------------------- 113 | Figure_1 <- plot_grid(Fig_1a,Fig_1b,Fig_1c,nrow = 1,ncol = 3) 114 | 115 | ggsave('../3_release/Metabolism_Development_Fecundity_v1.0.0.jpg', 116 | Figure_1, 117 | width = 15, 118 | height =5, 119 | units = "in", 120 | dpi = 1000) 121 | 122 | # saving session information with all packages versions for reproducibility purposes 123 | 124 | sink("../outputs/3_3_Exploratory_plots_ShareTrait.txt") 125 | sessionInfo() 126 | sink() 127 | # END OF SCRIPT -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/Global_map_ShareTrait_DataBase_v1.0.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/3_release/Global_map_ShareTrait_DataBase_v1.0.0.jpg -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/Metabolism_Development_Fecundity_v1.0.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/3_release/Metabolism_Development_Fecundity_v1.0.0.jpg -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/NaturalEarth.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/3_release/NaturalEarth.RData -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/3_release/Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.jpg -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/Phylogenetic tree for 36 species included in ShareTrait_DataBase_v1.0.0.tre: -------------------------------------------------------------------------------- 1 | ((((Liopholis_inornata:0.02941176471,Liopholis_striata:0.02941176471)Liopholis:0.1176470588,(((Rana_arvalis:0.02941176471,Rana_temporaria:0.02941176471)mrcaott380955ott794575:0.02941176471,Pelophylax_esculentus:0.05882352941)mrcaott114ott14673:0.02941176471,Litoria_caerulea:0.08823529412)mrcaott114ott177:0.05882352941)Tetrapoda:0.08823529412,(Danio_rerio:0.05882352941,(Leiopotherapon_unicolor:0.02941176471,Bidyanus_bidyanus:0.02941176471)mrcaott113778ott113780:0.02941176471)Clupeocephala:0.1764705882)Euteleostomi:0.7647058824,(Lymnaea_stagnalis:0.7352941176,((((((((Operophtera_brumata:0.02941176471,Lycaena_phlaeas:0.02941176471)mrcaott100ott677:0.02941176471,Opisina_arenosella:0.05882352941)mrcaott100ott3234:0.05882352941,(Drosophila_melanogaster:0.02941176471,Drosophila_subobscura:0.02941176471)mrcaott4410ott34895:0.08823529412)mrcaott100ott107:0.3235294118,((((Aphidius_colemani:0.08823529412,(Aphidius_matricariae:0.08823529412,Aphidius_platensis:0.08823529412):0):0,Aphidius_ervi:0.08823529412)Aphidius:0.02941176471,Asobara_tabida:0.1176470588)mrcaott1504ott2309:0.1764705882,((((Brachymeria_nosatoi:0.02941176471,Spalangia_erythromera:0.02941176471)mrcaott1216ott3133:0.05882352941,(Copidosoma_koehleri:0.02941176471,Trechnites_insidiosus:0.02941176471)mrcaott168689ott600818:0.05882352941)mrcaott1216ott1225:0.02941176471,Trichopria_drosophilae:0.1176470588)mrcaott1216ott52224:0.02941176471,Leptopilina_heterotoma:0.1470588235)mrcaott1216ott4257:0.1470588235)mrcaott1153ott1216:0.1470588235)Holometabola:0.08823529412,((Ilyocoris_cimicoides:0.02941176471,Aphelocheirus_aestivalis:0.02941176471)Nepomorpha:0.02941176471,Dysaphis_plantaginea:0.05882352941)Hemiptera:0.4705882353)mrcaott100ott695:0.02941176471,(Gryllus_campestris:0.2794117647,Gryllus_bimaculatus:0.2794117647)NA:0.2794117647)Neoptera:0.02941176471,Chalcolestes_viridis:0.5882352941)Pterygota_-subclass_in_Opisthokonta:0.1176470588,(Gammarus_insensibilis:0.08823529412,((Lithodes_santolla:0.02941176471,Petrolisthes_laevigatus:0.02941176471)mrcaott12778ott32449:0.02941176471,Neotrypaea_uncinata:0.05882352941)mrcaott1246ott36292:0.02941176471)Eumalacostraca:0.6176470588)Pancrustacea:0.02941176471)Protostomia:0.2647058824)mrcaott42ott49; 2 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/ShareTrait_DataBase_refs_v1.0.0.bib: -------------------------------------------------------------------------------- 1 | @Article{Alfaro_Tapia_2022, 2 | doi = {10.1127/entomologia/2021/1186}, 3 | url = {https://doi.org/10.1127/entomologia/2021/1186}, 4 | year = {2022}, 5 | month = {feb}, 6 | publisher = {Schweizerbart}, 7 | volume = {42}, 8 | number = {1}, 9 | pages = {127--145}, 10 | author = {Armando Alfaro-Tapia and Jeniffer K. Alvarez-Baca and K{\a'e}vin Tougeron and Blas Lavandero and C{\a'e}cile Le Lann and Joan Van Baaren}, 11 | title = {Overwintering strategies and life-history traits of different populations of Aphidius platensis along a latitudinal gradient in Chile}, 12 | journal = {Entomologia Generalis}, 13 | } 14 | 15 | @Article{Burraco_2019, 16 | doi = {10.1111/1365-2656.13138}, 17 | url = {https://doi.org/10.1111/1365-2656.13138}, 18 | year = {2019}, 19 | month = {dec}, 20 | publisher = {Wiley}, 21 | volume = {89}, 22 | number = {3}, 23 | pages = {855--866}, 24 | author = {Pablo Burraco and Ana Elisa Vald{\a'e}s and Germ{\a'a}n Orizaola}, 25 | editor = {Daniel Ardia}, 26 | title = {Metabolic costs of altered growth trajectories across life transitions in amphibians}, 27 | journal = {Journal of Animal Ecology}, 28 | } 29 | 30 | @Article{Burraco_2020, 31 | doi = {10.1111/oik.07919}, 32 | url = {https://doi.org/10.1111/oik.07919}, 33 | year = {2020}, 34 | month = {nov}, 35 | publisher = {Wiley}, 36 | volume = {130}, 37 | number = {2}, 38 | pages = {231--239}, 39 | author = {Pablo Burraco and Anssi Laurila and Germ{\a'a}n Orizaola}, 40 | title = {Limits to compensatory responses to altered phenology in amphibian larvae}, 41 | journal = {Oikos}, 42 | } 43 | 44 | @Article{Casta_eda_2013, 45 | doi = {10.1371/journal.pone.0058920}, 46 | url = {https://doi.org/10.1371/journal.pone.0058920}, 47 | year = {2013}, 48 | month = {mar}, 49 | publisher = {Public Library of Science ({PLoS})}, 50 | volume = {8}, 51 | number = {3}, 52 | pages = {e58920}, 53 | author = {Luis E. Casta{\~n}eda and Roberto F. Nespolo}, 54 | editor = {Suzannah Rutherford}, 55 | title = {Phenotypic and Genetic Effects of Contrasting Ethanol Environments on Physiological and Developmental Traits in Drosophila melanogaster}, 56 | journal = {{PLoS} {ONE}}, 57 | } 58 | 59 | @Article{Hermaniuk_2016, 60 | doi = {10.1086/684974}, 61 | url = {https://doi.org/10.1086/684974}, 62 | year = {2016}, 63 | month = {mar}, 64 | publisher = {University of Chicago Press}, 65 | volume = {89}, 66 | number = {2}, 67 | pages = {118--129}, 68 | author = {Adam Hermaniuk and Mariusz Rybacki and Jan R. E. Taylor}, 69 | title = {Low Temperature and Polyploidy Result in Larger Cell and Body Size in an Ectothermic Vertebrate}, 70 | journal = {Physiological and Biochemical Zoology}, 71 | } 72 | 73 | @Article{Jerbi_Elayed_2022, 74 | doi = {10.1016/j.jtherbio.2021.103140}, 75 | url = {https://doi.org/10.1016/j.jtherbio.2021.103140}, 76 | year = {2022}, 77 | month = {jan}, 78 | publisher = {Elsevier {BV}}, 79 | volume = {103}, 80 | pages = {103140}, 81 | author = {Mey Jerbi-Elayed and K{\a'e}vin Tougeron and Kaouthar Grissa-Lebdi and Thierry Hance}, 82 | title = {Effect of developmental temperatures on Aphidius colemani host-foraging behavior at high temperature}, 83 | journal = {Journal of Thermal Biology}, 84 | } 85 | 86 | @Article{Jorissen_2023, 87 | doi = {10.1016/j.envpol.2023.121471}, 88 | url = {https://doi.org/10.1016/j.envpol.2023.121471}, 89 | year = {2023}, 90 | month = {jun}, 91 | publisher = {Elsevier {BV}}, 92 | volume = {326}, 93 | pages = {121471}, 94 | author = {Sarah Jorissen and Lizanne Janssens and Julie Verheyen and Robby Stoks}, 95 | title = {Synergistic survival-related effects of larval exposure to an aquatic pollutant and food stress get stronger during and especially after metamorphosis and shape fitness of terrestrial adults}, 96 | journal = {Environmental Pollution}, 97 | } 98 | 99 | @Article{Le_Lann_2013, 100 | doi = {10.1007/s00442-013-2810-9}, 101 | url = {https://doi.org/10.1007/s00442-013-2810-9}, 102 | year = {2013}, 103 | month = {oct}, 104 | publisher = {Springer Science and Business Media {LLC}}, 105 | volume = {174}, 106 | number = {3}, 107 | pages = {967--977}, 108 | author = {C{\a'e}cile Le Lann and Bertanne Visser and Ma{\"e}lle M{\a'e}riaux and Joffrey Moiroux and Joan {van Baaren} and Jacques J. M. {van Alphen} and Jacintha Ellers}, 109 | title = {Rising temperature reduces divergence in resource use strategies in coexisting parasitoid species}, 110 | journal = {Oecologia}, 111 | } 112 | 113 | @Article{Saeed_2020, 114 | doi = {10.1111/1744-7917.12794}, 115 | url = {https://doi.org/10.1111/1744-7917.12794}, 116 | year = {2020}, 117 | month = {jun}, 118 | publisher = {Wiley}, 119 | volume = {28}, 120 | number = {3}, 121 | pages = {780--792}, 122 | author = {Muhammad Mubashir Saeed and K{\a'e}vin Tougeron and Abu Bakar Muhammad Raza and Muhammad Afzal and Anjum Aqueel and Guillaume Jean Le Goff and Fran{\c c}ois Renoz and Jennifer Pirotte and Thierry Hance}, 123 | title = {Transgenerational phenotypic plasticity of diapause induction and related fitness cost in a commercial strain of the parasitoid 124 | $\less$i$\greater$Aphidius ervi$\less$/i$\greater$ 125 | Haliday}, 126 | journal = {Insect Science}, 127 | } 128 | 129 | @Article{Semsar_kazerouni_2022, 130 | doi = {10.1016/j.cris.2022.100034}, 131 | url = {https://doi.org/10.1016/j.cris.2022.100034}, 132 | year = {2022}, 133 | publisher = {Elsevier {BV}}, 134 | volume = {2}, 135 | pages = {100034}, 136 | author = {Maryam Semsar-kazerouni and Henk Siepel and Wilco C.E.P. Verberk}, 137 | title = {Influence of photoperiod on thermal responses in body size, growth and development in Lycaena phlaeas (Lepidoptera: Lycaenidae)}, 138 | journal = {Current Research in Insect Science}, 139 | } 140 | 141 | @Article{Shameer_2017, 142 | doi = {10.1007/s10340-017-0904-6}, 143 | url = {https://doi.org/10.1007/s10340-017-0904-6}, 144 | year = {2017}, 145 | month = {aug}, 146 | publisher = {Springer Science and Business Media {LLC}}, 147 | volume = {91}, 148 | number = {1}, 149 | pages = {259--275}, 150 | author = {K. S. Shameer and M. Nasser and Chandrika Mohan and Ian C. W. Hardy}, 151 | title = {Direct and indirect influences of intercrops on the coconut defoliator Opisina arenosella}, 152 | journal = {Journal of Pest Science}, 153 | } 154 | 155 | @Article{Tougeron_2020, 156 | doi = {10.1016/j.jinsphys.2019.104001}, 157 | url = {https://doi.org/10.1016/j.jinsphys.2019.104001}, 158 | year = {2020}, 159 | month = {feb}, 160 | publisher = {Elsevier {BV}}, 161 | volume = {121}, 162 | pages = {104001}, 163 | author = {K. Tougeron and M. Devogel and J. {van Baaren} and C. Le Lann and T. Hance}, 164 | title = {Trans-generational effects on diapause and life-history-traits of an aphid parasitoid}, 165 | journal = {Journal of Insect Physiology}, 166 | } 167 | 168 | @Article{Tougeron_2021, 169 | doi = {10.3390/insects12100855}, 170 | url = {https://doi.org/10.3390/insects12100855}, 171 | year = {2021}, 172 | month = {sep}, 173 | publisher = {{MDPI} {AG}}, 174 | volume = {12}, 175 | number = {10}, 176 | pages = {855}, 177 | author = {K{\a'e}vin Tougeron and Louise Ferrais and Marie-Eve Renard and Thierry Hance}, 178 | title = {Effects of Constant versus Fluctuating Temperatures on Fitness Indicators of the Aphid Dysaphis plantaginea and the Parasitoid Aphidius matricariae}, 179 | journal = {Insects}, 180 | } 181 | 182 | @Article{van_Dis_2021, 183 | doi = {10.1242/jeb.242554}, 184 | url = {https://doi.org/10.1242/jeb.242554}, 185 | year = {2021}, 186 | month = {sep}, 187 | publisher = {The Company of Biologists}, 188 | volume = {224}, 189 | number = {17}, 190 | author = {Natalie E. {van Dis} and Maurijn {van der Zee} and Roelof A. Hut and Bregje Wertheim and Marcel E. Visser}, 191 | title = {Timing of increased temperature sensitivity coincides with nervous system development in winter moth embryos}, 192 | journal = {Journal of Experimental Biology}, 193 | } 194 | 195 | @Article{Gebauer_2007, 196 | doi = {10.1017/s0025315407055282}, 197 | url = {https://doi.org/10.1017/s0025315407055282}, 198 | year = {2007}, 199 | month = {may}, 200 | publisher = {Cambridge University Press ({CUP})}, 201 | volume = {87}, 202 | number = {3}, 203 | pages = {729--734}, 204 | author = {P. Gebauer and K. Paschke and C.A. Moreno}, 205 | title = {Reproductive biology and population parameters of $\less$i$\greater$Petrolisthes laevigatus$\less$/i$\greater$ (Anomura: Porcellanidae) in southern Chile: consequences on recruitment}, 206 | journal = {Journal of the Marine Biological Association of the United Kingdom}, 207 | } 208 | 209 | @Article{Hoffer_2012, 210 | doi = {10.1016/j.anbehav.2012.06.002}, 211 | url = {https://doi.org/10.1016/j.anbehav.2012.06.002}, 212 | year = {2012}, 213 | month = {sep}, 214 | publisher = {Elsevier {BV}}, 215 | volume = {84}, 216 | number = {3}, 217 | pages = {523--529}, 218 | author = {Jeroen N.A. Hoffer and Dennis Schwegler and Jacintha Ellers and Joris M. Koene}, 219 | title = {Mating rate influences female reproductive investment in a simultaneous hermaphrodite, Lymnaea stagnalis}, 220 | journal = {Animal Behaviour}, 221 | } 222 | 223 | @Article{Jerbi_Elayed_2021, 224 | doi = {10.3390/insects12100852}, 225 | url = {https://doi.org/10.3390/insects12100852}, 226 | year = {2021}, 227 | month = {sep}, 228 | publisher = {{MDPI} {AG}}, 229 | volume = {12}, 230 | number = {10}, 231 | pages = {852}, 232 | author = {Mey Jerbi-Elayed and Vincent Foray and K{\a'e}vin Tougeron and Kaouthar Grissa-Lebdi and Thierry Hance}, 233 | title = {Developmental Temperature Affects Life-History Traits and Heat Tolerance in the Aphid Parasitoid Aphidius colemani}, 234 | journal = {Insects}, 235 | } 236 | 237 | @Article{KEINAN_2017, 238 | doi = {10.1111/een.12422}, 239 | url = {https://doi.org/10.1111/een.12422}, 240 | year = {2017}, 241 | month = {jun}, 242 | publisher = {Wiley}, 243 | volume = {42}, 244 | number = {5}, 245 | pages = {587--594}, 246 | author = {YAEL KEINAN and MIRIAM KISHINEVSKY and TAMAR KEASAR}, 247 | title = {Intraspecific variability in egg maturation patterns and associated life-history trade-offs in a polyembryonic parasitoid wasp}, 248 | journal = {Ecological Entomology}, 249 | } 250 | 251 | @Article{LE_GOFF_2021, 252 | doi = {10.14411/eje.2021.028}, 253 | url = {https://doi.org/10.14411/eje.2021.028}, 254 | year = {2021}, 255 | month = {sep}, 256 | publisher = {Biology Centre, {AS} {CR}}, 257 | volume = {118}, 258 | pages = {279--287}, 259 | author = {Guillaume Jean LE GOFF and Jeremy BERTHE and K{\a'e}vin TOUGERON and Benoit DOCHY and Olivier LEBBE and Fran{\c c}ois RENOZ and Thierry HANCE}, 260 | title = {Effect of the instar of the pear psyllid Cacopsylla pyri (Hemiptera: Psyllidae) on the behaviour and fitness of the parasitoid Trechnites insidiosus (Hymenoptera: Encyrtidae)}, 261 | journal = {European Journal of Entomology}, 262 | } 263 | 264 | @Article{Mesas_2022, 265 | doi = {10.1093/evolut/qpac033}, 266 | url = {https://doi.org/10.1093/evolut/qpac033}, 267 | year = {2022}, 268 | month = {dec}, 269 | publisher = {Oxford University Press ({OUP})}, 270 | volume = {77}, 271 | number = {2}, 272 | pages = {509--518}, 273 | author = {Andr{\a'e}s Mesas and Luis E Casta{\~n}eda}, 274 | title = {Evolutionary responses of energy metabolism, development, and reproduction to artificial selection for increasing heat tolerance in$\less$i$\greater$Drosophila subobscura$\less$/i$\greater$}, 275 | journal = {Evolution}, 276 | } 277 | 278 | @Article{Molinet_2023, 279 | doi = {10.1016/j.fishres.2022.106522}, 280 | url = {https://doi.org/10.1016/j.fishres.2022.106522}, 281 | year = {2023}, 282 | month = {feb}, 283 | publisher = {Elsevier {BV}}, 284 | volume = {258}, 285 | pages = {106522}, 286 | author = {Carlos Molinet and Rub{\a'e}n H. Roa-Ureta and Paulina Gebauer and Manuel D\'\iaz and Patricio A. D\'\iaz and Thamara Matamala and Katherine Espinoza and Jorge Henr\'\iquez and Daniela Uribe and Oscar {de L{\a'a}zaro} and Andr{\a'e}s Olgu\'\in and Kurt Paschke and Jos{\a'e} Valenzuela and Yohnatan Jaramillo}, 287 | title = {The impact of size truncation on reproductive success in the southern king crab (Lithodes santolla)}, 288 | journal = {Fisheries Research}, 289 | } 290 | 291 | @Article{Tuni_2016, 292 | doi = {10.1111/jeb.12888}, 293 | url = {https://doi.org/10.1111/jeb.12888}, 294 | year = {2016}, 295 | month = {may}, 296 | publisher = {Wiley}, 297 | volume = {29}, 298 | number = {8}, 299 | pages = {1643--1647}, 300 | author = {C. Tuni and J. Perdig{\a'o}n Ferreira and Y. Fritz and A. Munoz Meneses and C. Gasparini}, 301 | title = {Impaired sperm quality, delayed mating but no costs for offspring fitness in crickets winning a fight}, 302 | journal = {Journal of Evolutionary Biology}, 303 | } 304 | 305 | @Article{Vogels_2021, 306 | doi = {10.3389/fevo.2021.659363}, 307 | url = {https://doi.org/10.3389/fevo.2021.659363}, 308 | year = {2021}, 309 | month = {may}, 310 | publisher = {Frontiers Media {SA}}, 311 | volume = {9}, 312 | author = {Joost J. Vogels and W. C. E. P. Verberk and J. T. Kuper and M. J. Weijters and R. Bobbink and H. Siepel}, 313 | title = {How to Restore Invertebrate Diversity of Degraded Heathlands? A Case Study on the Reproductive Performance of the Field Cricket Gryllus campestris (L.)}, 314 | journal = {Frontiers in Ecology and Evolution}, 315 | } 316 | 317 | @Article{Barneche_2019, 318 | doi = {10.1111/1365-2435.13348}, 319 | url = {https://doi.org/10.1111/1365-2435.13348}, 320 | year = {2019}, 321 | month = {may}, 322 | publisher = {Wiley}, 323 | volume = {33}, 324 | number = {7}, 325 | pages = {1256--1266}, 326 | author = {Diego R. Barneche and Miki Jahn and Frank Seebacher}, 327 | editor = {Isabel Smallegange}, 328 | title = {Warming increases the cost of growth in a model vertebrate}, 329 | journal = {Functional Ecology}, 330 | } 331 | 332 | @Article{Gomez_Isaza_2020, 333 | doi = {10.1242/jeb.224444}, 334 | url = {https://doi.org/10.1242/jeb.224444}, 335 | year = {2020}, 336 | month = {jan}, 337 | publisher = {The Company of Biologists}, 338 | author = {Daniel F. Gomez Isaza and Rebecca L. Cramp and Craig E. Franklin}, 339 | title = {Thermal acclimation offsets the negative effects of nitrate on aerobic scope and performance}, 340 | journal = {Journal of Experimental Biology}, 341 | } 342 | 343 | @Article{Gomez_Isaza_2020:1, 344 | doi = {10.1093/conphys/coz092}, 345 | url = {https://doi.org/10.1093/conphys/coz092}, 346 | year = {2020}, 347 | month = {jan}, 348 | publisher = {Oxford University Press ({OUP})}, 349 | volume = {8}, 350 | number = {1}, 351 | author = {Daniel F Gomez Isaza and Rebecca L Cramp and Craig E Franklin}, 352 | editor = {Steven Cooke}, 353 | title = {Simultaneous exposure to nitrate and low {pH} reduces the blood oxygen-carrying capacity and functional performance of a freshwater fish}, 354 | journal = {Conservation Physiology}, 355 | } 356 | 357 | @Article{Hermaniuk_2017, 358 | doi = {10.1086/689408}, 359 | url = {https://doi.org/10.1086/689408}, 360 | year = {2017}, 361 | month = {mar}, 362 | publisher = {University of Chicago Press}, 363 | volume = {90}, 364 | number = {2}, 365 | pages = {230--239}, 366 | author = {Adam Hermaniuk and Mariusz Rybacki and Jan R. E. Taylor}, 367 | title = {Metabolic Rate of Diploid and Triploid Edible Frog$\less$i$\greater$Pelophylax esculentus$\less$/i$\greater$Correlates Inversely with Cell Size in Tadpoles but Not in Frogs}, 368 | journal = {Physiological and Biochemical Zoology}, 369 | } 370 | 371 | @Article{Hermaniuk_2020, 372 | doi = {10.1242/jeb.227124}, 373 | url = {https://doi.org/10.1242/jeb.227124}, 374 | year = {2020}, 375 | month = {jan}, 376 | publisher = {The Company of Biologists}, 377 | author = {Adam Hermaniuk and Iris L. E. {van de Pol} and Wilco C. E. P. Verberk}, 378 | title = {Are acute and acclimated thermal effects on metabolic rate modulated by cell size? a comparison between diploid and triploid zebrafish larvae}, 379 | journal = {Journal of Experimental Biology}, 380 | } 381 | 382 | @Article{Leiva_2015, 383 | doi = {10.1016/j.cbpa.2015.07.008}, 384 | url = {https://doi.org/10.1016/j.cbpa.2015.07.008}, 385 | year = {2015}, 386 | month = {nov}, 387 | publisher = {Elsevier {BV}}, 388 | volume = {189}, 389 | pages = {30--37}, 390 | author = {F{\a'e}lix P. Leiva and Mauricio A. Urbina and Juan Pablo Cumillaf and Paulina Gebauer and Kurt Paschke}, 391 | title = {Physiological responses of the ghost shrimp Neotrypaea uncinata (Milne Edwards 1837) (Decapoda: Thalassinidea) to oxygen availability and recovery after severe environmental hypoxia}, 392 | journal = {Comparative Biochemistry and Physiology Part A: Molecular {\&}amp$\mathsemicolon$ Integrative Physiology}, 393 | } 394 | 395 | @Article{Leiva_2016, 396 | doi = {10.1242/jeb.133785}, 397 | url = {https://doi.org/10.1242/jeb.133785}, 398 | year = {2016}, 399 | month = {jan}, 400 | publisher = {The Company of Biologists}, 401 | author = {F{\a'e}lix P. Leiva and Edwin J. Niklitschek and Kurt Paschke and Paulina Gebauer and Mauricio A. Urbina}, 402 | title = {Tide-related biological rhythm in the oxygen consumption rate of ghost shrimp ($\less$i$\greater$Neotrypaea uncinata$\less$/i$\greater$ Milne Edwards)}, 403 | journal = {Journal of Experimental Biology}, 404 | } 405 | 406 | @Article{Leiva_2018, 407 | doi = {10.1007/s00227-018-3406-z}, 408 | url = {https://doi.org/10.1007/s00227-018-3406-z}, 409 | year = {2018}, 410 | month = {aug}, 411 | publisher = {Springer Science and Business Media {LLC}}, 412 | volume = {165}, 413 | number = {9}, 414 | author = {F{\a'e}lix P. Leiva and Crist{\a'o}bal Garc{\a'e}s and Wilco C. E. P. Verberk and Macarena Care and Kurt Paschke and Paulina Gebauer}, 415 | title = {Differences in the respiratory response to temperature and hypoxia across four life-stages of the intertidal porcelain crab Petrolisthes laevigatus}, 416 | journal = {Marine Biology}, 417 | } 418 | 419 | @Article{Shokri_2022, 420 | doi = {10.1242/jeb.244842}, 421 | url = {https://doi.org/10.1242/jeb.244842}, 422 | year = {2022}, 423 | month = {nov}, 424 | publisher = {The Company of Biologists}, 425 | volume = {225}, 426 | number = {22}, 427 | author = {Milad Shokri and Francesco Cozzoli and Fabio Vignes and Marco Bertoli and Elisabetta Pizzul and Alberto Basset}, 428 | title = {Metabolic rate and climate change across latitudes: evidence of mass-dependent responses in aquatic amphipods}, 429 | journal = {Journal of Experimental Biology}, 430 | } 431 | 432 | @Article{Verberk_2015, 433 | doi = {10.1242/jeb.119560}, 434 | url = {https://doi.org/10.1242/jeb.119560}, 435 | year = {2015}, 436 | month = {jan}, 437 | publisher = {The Company of Biologists}, 438 | author = {Wilco C.E.P. Verberk and David T. Bilton}, 439 | title = {Oxygen limited thermal tolerance is seen in a plastron breathing insect, and can be induced in a bimodal gas exchanger}, 440 | journal = {Journal of Experimental Biology}, 441 | } 442 | 443 | @Article{Wu_2015, 444 | doi = {10.1242/jeb.113803}, 445 | url = {https://doi.org/10.1242/jeb.113803}, 446 | year = {2015}, 447 | month = {jan}, 448 | publisher = {The Company of Biologists}, 449 | author = {Nicholas C. Wu and Lesley A. Alton and Christofer J. Clemente and Michael R. Kearney and Craig R. White}, 450 | title = {Morphology and burrowing energetics of semi-fossorial skinks ($\less$i$\greater$Liopholis$\less$/i$\greater$)}, 451 | journal = {Journal of Experimental Biology}, 452 | } 453 | 454 | @Article{Wu_2018, 455 | doi = {10.1038/s41598-018-22002-8}, 456 | url = {https://doi.org/10.1038/s41598-018-22002-8}, 457 | year = {2018}, 458 | month = {feb}, 459 | publisher = {Springer Science and Business Media {LLC}}, 460 | volume = {8}, 461 | number = {1}, 462 | author = {Nicholas C. Wu and Rebecca L. Cramp and Craig E. Franklin}, 463 | title = {Body size influences energetic and osmoregulatory costs in frogs infected with Batrachochytrium dendrobatidis}, 464 | journal = {Scientific Reports}, 465 | } 466 | 467 | @Article{Wu_2022, 468 | doi = {10.1098/rspb.2021.2077}, 469 | url = {https://doi.org/10.1098/rspb.2021.2077}, 470 | year = {2022}, 471 | month = {jan}, 472 | publisher = {The Royal Society}, 473 | volume = {289}, 474 | number = {1967}, 475 | author = {Nicholas C. Wu and Alexander M. Rubin and Frank Seebacher}, 476 | title = {Endocrine disruption from plastic pollution and warming interact to increase the energetic cost of growth in a fish}, 477 | journal = {Proceedings of the Royal Society B: Biological Sciences}, 478 | } 479 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/ShareTrait_DataBase_v1.0.0.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/3_release/ShareTrait_DataBase_v1.0.0.csv -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/3_release/ShareTrait_MetaData_v1.0.0.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/3_release/ShareTrait_MetaData_v1.0.0.csv -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/cleaned_data/development/Saeed_et_al_2021_cleaned.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/cleaned_data/development/Saeed_et_al_2021_cleaned.csv -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/cleaned_data/metabolic_rate/Leiva_et_al_2015_cleaned.csv: -------------------------------------------------------------------------------- 1 | dataset_id,date_of_contribution,name_contact,email_contact,type_of_reference,doi_dataset,doi_publication,comments_reference,species_reported,comments_taxonomy,location_description,realm_general,realm_specific,depth_of_collection,elevation_of_collection,lat_gg,lat_mm,lat_ss,long_gg,long_mm,long_ss,lat_gg_mm_ss,long_gg_mm_ss,origin,comments_location,date_of_collection,date_of_collection_initial,date_of_collection_final,year_of_collection,year_of_collection_initial,year_of_collection_final,season_of_collection,month_of_collection_initial,month_of_collection_final,comments_timing,maintained,maintenance_duration_days,maintenance_duration_generations,maintenance_temperature,maintenance_salinity,maintenance_ph,maintenance_oxygen,maintenance_carbon_dioxide,maintenance_photoperiod,maintenance_humidity,maintenance_oxygen_units,maintenance_carbon_dioxide_units,maintenance_food_type,acclimated,acclimation_duration,acclimation_temperature,acclimation_salinity,acclimation_ph,acclimation_oxygen,acclimation_carbon_dioxide,acclimation_photoperiod,acclimation_humidity,acclimation_oxygen_units,acclimation_carbon_dioxide_units,acclimation_food_type,metabolic_rate_type,acclimation_chamber,fasting_time,sensor_type,respiration_volume,delay_time,respiratory_chamber_material,incubation_time,respirometry_type,breathing_mode,life_stage_general,life_stage_specific,sex,reproductive_stage,size_type,size_units,size_value,test_temperature,test_salinity,test_ph,test_oxygen,test_carbon_dioxide,test_oxygen_units,test_carbon_dioxide_units,test_photoperiod,test_humidity,comments_experimental_conditions,resp_unit,resp_value,resp_error_estimate,resp_error_type,sample_size,comments_respiration 2 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.58,11.5,32,,1.731779266,,kPa,,24L_0D,,,umolO2/h/gDM,2.797872865,,,, 3 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.58,11.5,32,,1.731779266,,kPa,,24L_0D,,,umolO2/h/gDM,3.540365549,,,, 4 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.58,11.5,32,,1.731779266,,kPa,,24L_0D,,,umolO2/h/gDM,3.351148172,,,, 5 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.58,11.5,32,,1.731779266,,kPa,,24L_0D,,,umolO2/h/gDM,2.702252632,,,, 6 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.58,11.5,32,,1.731779266,,kPa,,24L_0D,,,umolO2/h/gDM,3.471344747,,,, 7 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.58,11.5,32,,1.731779266,,kPa,,24L_0D,,,umolO2/h/gDM,2.805675293,,,, 8 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.96,11.5,32,,4.220835712,,kPa,,24L_0D,,,umolO2/h/gDM,3.372240703,,,, 9 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.96,11.5,32,,4.220835712,,kPa,,24L_0D,,,umolO2/h/gDM,3.586473853,,,, 10 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.96,11.5,32,,4.220835712,,kPa,,24L_0D,,,umolO2/h/gDM,3.750860444,,,, 11 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.96,11.5,32,,4.220835712,,kPa,,24L_0D,,,umolO2/h/gDM,3.967513382,,,, 12 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.96,11.5,32,,4.220835712,,kPa,,24L_0D,,,umolO2/h/gDM,3.234404772,,,, 13 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.96,11.5,32,,4.220835712,,kPa,,24L_0D,,,umolO2/h/gDM,3.455175399,,,, 14 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.02,11.5,32,,7.657801935,,kPa,,24L_0D,,,umolO2/h/gDM,5.314883228,,,, 15 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.02,11.5,32,,7.657801935,,kPa,,24L_0D,,,umolO2/h/gDM,5.480410959,,,, 16 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.02,11.5,32,,7.657801935,,kPa,,24L_0D,,,umolO2/h/gDM,4.554504391,,,, 17 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.02,11.5,32,,7.657801935,,kPa,,24L_0D,,,umolO2/h/gDM,5.69753866,,,, 18 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.02,11.5,32,,7.657801935,,kPa,,24L_0D,,,umolO2/h/gDM,4.276503034,,,, 19 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.02,11.5,32,,7.657801935,,kPa,,24L_0D,,,umolO2/h/gDM,4.455683554,,,, 20 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.86,11.5,32,,12.01978897,,kPa,,24L_0D,,,umolO2/h/gDM,6.160258796,,,, 21 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.86,11.5,32,,12.01978897,,kPa,,24L_0D,,,umolO2/h/gDM,4.988771305,,,, 22 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.86,11.5,32,,12.01978897,,kPa,,24L_0D,,,umolO2/h/gDM,5.620467758,,,, 23 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.86,11.5,32,,12.01978897,,kPa,,24L_0D,,,umolO2/h/gDM,6.040549906,,,, 24 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.86,11.5,32,,12.01978897,,kPa,,24L_0D,,,umolO2/h/gDM,4.031450166,,,, 25 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,3.86,11.5,32,,12.01978897,,kPa,,24L_0D,,,umolO2/h/gDM,4.288624945,,,, 26 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.08,11.5,32,,21.116,,kPa,,24L_0D,,,umolO2/h/gDM,5.581574729,,,, 27 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.08,11.5,32,,21.116,,kPa,,24L_0D,,,umolO2/h/gDM,5.442429006,,,, 28 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.08,11.5,32,,21.116,,kPa,,24L_0D,,,umolO2/h/gDM,5.4789589,,,, 29 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.08,11.5,32,,21.116,,kPa,,24L_0D,,,umolO2/h/gDM,4.99281884,,,, 30 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.08,11.5,32,,21.116,,kPa,,24L_0D,,,umolO2/h/gDM,4.873808652,,,, 31 | Leiva_et_al_2015,02-11-2022,Felix_P_Leiva,felixpleiva@gmail.com,primary,https://doi.org/10.5281/zenodo.7273461,https://doi.org/10.1016/j.cbpa.2015.07.008,,Neotrypaea_uncinata,,Intertidal of Puntilla Tenglo_Chile,intertidal,intertidal,,,,,,,,,-41.46,-72.93,field,,,01-04-2011,01-07-2011,,,,,,,,yes,21,,11.5,32.3,,,,12L_12D,,,,krill flakes,no,,,,,,,,,,,,standard,,2,optical oxygen probe,5000,,plastic,6,closed,aquatic,adult,adult,male,,dry body mass,gram,4.08,11.5,32,,21.116,,kPa,,24L_0D,,,umolO2/h/gDM,5.379308321,,,, 32 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/cleaned_data/metabolic_rate/Mesas_and_Castañeda_2023_cleaned.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/cleaned_data/metabolic_rate/Mesas_and_Castañeda_2023_cleaned.csv -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/cleaned_data/metabolic_rate/Wu_et_al_2022_cleaned.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/cleaned_data/metabolic_rate/Wu_et_al_2022_cleaned.csv -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/outputs/.RData -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/.Rhistory: -------------------------------------------------------------------------------- 1 | 1 / 22.414 * 31.9988, 2 | 31.9988 / 1000000, 3 | 1, 4 | 1 / 22.414 * 31.9988 / 0.85 / 1000, 5 | 31.9988 /1000) 6 | ) 7 | # Merge lookup table with original data 8 | df_converted_step_1 <- left_join(df, conversion_table_unit, by = "extracted_unit") 9 | # Calculate trait value rates for all rows and create a new column 10 | df_converted_step_1 <- df_converted_step_1 %>% 11 | mutate(trait_converted = trait_value * conversion_factor) 12 | # STEP 2: Convert all units of time (for metabolic rates) to hours. So we will 13 | # keep the units for the other traits 14 | # select the units of time 15 | time_unit <- "(day|month|min|second|30min|20min|h|Days|offspring number)" 16 | # Extract the text and create a new column 17 | df_converted_step_1$extracted_time_unit <- str_extract(df_converted_step_1$trait_unit, time_unit) 18 | sort(unique(df_converted_step_1$extracted_time_unit)) 19 | # Define lockup table for conversion factors hours 20 | conversion_table_time <- data.frame( 21 | extracted_time_unit = c("day", 22 | "Days", 23 | "h", 24 | "min", 25 | "offspring number"), 26 | conversion_factor_to_hours = c(1 / 24, 27 | 1, 28 | 1, 29 | 60, 30 | 1) 31 | ) 32 | # Merge lookup table with original data 33 | df_converted_step_2 <- left_join(df_converted_step_1, conversion_table_time, by = "extracted_time_unit") 34 | # Calculate respiration rate per hour for all rows 35 | df_converted_step_2 <- df_converted_step_2 %>% 36 | mutate(trait_converted = trait_converted * conversion_factor_to_hours) 37 | View(df_converted_step_2) 38 | dat_converted_step_2$extracted_size_unit <- str_extract(dat_converted_step_2$ORIGINAL_UNIT, "(ugN2|ugDM|ugCarbon|mgDM|mgFM|mgAFDM|gDM|gFM|100gFM|gAFDM|100gram|kgFM|ind)") 39 | df_converted_step_2$extracted_size_unit <- str_extract(df_converted_step_2$trait_unit, "(ugN2|ugDM|ugCarbon|mgDM|mgFM|mgAFDM|gDM|gFM|100gFM|gAFDM|100gram|kgFM|ind)") 40 | sort(unique(df_converted_step_2$extracted_size_unit)) 41 | df_converted_step_2$extracted_size_unit <- str_extract(df_converted_step_2$trait_unit, "(Days|offspring number|ugN2|ugDM|ugCarbon|mgDM|mgFM|mgAFDM|gDM|gFM|100gFM|gAFDM|100gram|kgFM|ind)") 42 | sort(unique(df_converted_step_2$extracted_size_unit)) 43 | View(df_converted_step_2) 44 | # The following code has been adapted from MetaR (https://github.com/felixpleiva/MetaR) 45 | # by Felix P Leiva 46 | # Cleaning working space 47 | rm(list=ls()) 48 | # check directory 49 | getwd() 50 | #Libraries 51 | library(dplyr) 52 | library(tidyverse) 53 | library(stringr) 54 | #load data 55 | df <- read.csv("../outputs/2_1_ShareTrait_database.csv",sep = ",",header = TRUE) 56 | # check trait units 57 | unique(df$trait_unit) 58 | # Standardize units of fecundity 59 | df$trait_unit[df$trait_unit == "Egg load at adult emergence" ] <- "offspring number" 60 | df$trait_unit[df$trait_unit == "Number of eggs" ] <- "offspring number" 61 | df$trait_unit[df$trait_unit == "Total number of offspring" ] <- "offspring number" 62 | df$trait_unit[df$trait_unit == "Number of eggs per female" ] <- "offspring number" 63 | df$trait_unit[df$trait_unit == "number of mature eggs"] <- "offspring number" 64 | df$trait_unit[df$trait_unit == "number of hatched eggs"] <- "offspring number" 65 | df$trait_unit[df$trait_unit == "Number of eggs laid throughout life"] <- "offspring number" 66 | df$trait_unit[df$trait_unit == "number of eggs per female"] <- "offspring number" 67 | df$trait_unit[df$trait_unit == "number of eggs" ] <- "offspring number" 68 | df$trait_unit[df$trait_unit == "cumulative number of eggs per female" ] <- "offspring number" 69 | df$trait_unit[df$trait_unit == "number of eggs by female" ] <- "offspring number" 70 | # check trait units 71 | unique(df$trait_unit) 72 | # Standardize units of development 73 | df$trait_unit[df$trait_unit == "days"] <- "Days" 74 | # check trait units 75 | unique(df$trait_unit) 76 | # The aim of the following lines is to convert all units of metabolic rates to 77 | # mgO2/h/ind. For simplicity, I will use a conversion factor of "1" for 78 | # developmental time and fecundity 79 | # ------------------------------------------------------------------------------ 80 | # Conversion factors for oxygen 81 | # 1 L of oxygen = 20.083 kiloJoule of oxygen = 0.0446 mol oxygen - I need to look up the reference 82 | # 1 mmHg of oxygen = 1 Torr = 0.133322 kPa 83 | # 1 mol of oxygen = 31.9988 grams of oxygen 84 | # 1 mol of a gas at STP occupies volume = 22.414 L 85 | # ------------------------------------------------------------------------------ 86 | # STEP 1: Convert all units of oxygen to milligram of oxygen (mgO2) 87 | # make a new column and extract the unit of oxygen before the "/" 88 | df$extracted_unit <- str_extract(df$trait_unit, "[^/]+") 89 | sort(unique(df$extracted_unit)) 90 | # Define lockup table for conversion factors. In the case of the metabolic rate, 91 | # I will convert all units to **mg O2** 92 | conversion_table_unit <- data.frame( 93 | extracted_unit = c("days", 94 | "Joule", 95 | "mgO2", 96 | "mlCO2", 97 | "mLO2", 98 | "nmolO2", 99 | "offspring number", 100 | "uLCO2", 101 | "umolO2"), 102 | conversion_factor = c(1, 103 | 0.0446, 104 | 1, 105 | 1 / 22.414 * 31.9988 / 0.85, 106 | 1 / 22.414 * 31.9988, 107 | 31.9988 / 1000000, 108 | 1, 109 | 1 / 22.414 * 31.9988 / 0.85 / 1000, 110 | 31.9988 /1000) 111 | ) 112 | # Merge lookup table with original data 113 | df_converted_step_1 <- left_join(df, conversion_table_unit, by = "extracted_unit") 114 | # Calculate trait value rates for all rows and create a new column 115 | df_converted_step_1 <- df_converted_step_1 %>% 116 | mutate(trait_converted = trait_value * conversion_factor) 117 | # STEP 2: Convert all units of time (for metabolic rates) to hours. So we will 118 | # keep the units for the other traits 119 | # select the units of time 120 | time_unit <- "(day|month|min|second|30min|20min|h|Days|offspring number)" 121 | # Extract the text and create a new column 122 | df_converted_step_1$extracted_time_unit <- str_extract(df_converted_step_1$trait_unit, time_unit) 123 | sort(unique(df_converted_step_1$extracted_time_unit)) 124 | # Define lockup table for conversion factors hours 125 | conversion_table_time <- data.frame( 126 | extracted_time_unit = c("day", 127 | "Days", 128 | "h", 129 | "min", 130 | "offspring number"), 131 | conversion_factor_to_hours = c(1 / 24, 132 | 1, 133 | 1, 134 | 60, 135 | 1) 136 | ) 137 | # Merge lookup table with original data 138 | df_converted_step_2 <- left_join(df_converted_step_1, conversion_table_time, by = "extracted_time_unit") 139 | # Calculate respiration rate per hour for all rows 140 | df_converted_step_2 <- df_converted_step_2 %>% 141 | mutate(trait_converted = trait_converted * conversion_factor_to_hours) 142 | # STEP 3: Express all units of oxygen consumption per individual 143 | # select, extract and make a new column the unit of body mass in "trait_unit" 144 | df_converted_step_2$extracted_size_unit <- str_extract(df_converted_step_2$trait_unit, "(Days|offspring number|ugN2|ugDM|ugCarbon|mgDM|mgFM|mgAFDM|gDM|gFM|100gFM|gAFDM|100gram|kgFM|ind)") 145 | sort(unique(df_converted_step_2$extracted_size_unit)) 146 | sort(unique(df_converted_step_2$extracted_size_unit)) 147 | # check the type of sizes used to express body size and check their units 148 | sort(unique(df_converted_step_2$size_type)) 149 | sort(unique(df_converted_step_2$size_units)) 150 | sort(unique(df_converted_step_2$extracted_size_unit)) 151 | # check the type of sizes used to express body size and check their units 152 | sort(unique(df_converted_step_2$size_type)) 153 | df_converted_step_2$extracted_size_unit <- str_extract(df_converted_step_2$trait_unit, "(Days|offspring number|ugN2|ugDM|ugCarbon|mgDM|mgFM|mgAFDM|gDM|gFM|100gFM|gAFDM|100gram|kgFM|ind)") 154 | sort(unique(df_converted_step_2$extracted_size_unit)) 155 | # check the type of sizes used to express body size and check their units 156 | sort(unique(df_converted_step_2$size_type)) 157 | sort(unique(df_converted_step_2$size_units)) 158 | # The following code has been adapted from MetaR (https://github.com/felixpleiva/MetaR) 159 | # by Felix P Leiva 160 | # Cleaning working space 161 | rm(list=ls()) 162 | # check directory 163 | getwd() 164 | #Libraries 165 | library(dplyr) 166 | library(tidyverse) 167 | library(stringr) 168 | #load data 169 | df <- read.csv("../outputs/2_1_ShareTrait_database.csv",sep = ",",header = TRUE) 170 | # check trait units 171 | unique(df$trait_unit) 172 | # Standardize units of fecundity 173 | df$trait_unit[df$trait_unit == "Egg load at adult emergence" ] <- "offspring number" 174 | df$trait_unit[df$trait_unit == "Number of eggs" ] <- "offspring number" 175 | df$trait_unit[df$trait_unit == "Total number of offspring" ] <- "offspring number" 176 | df$trait_unit[df$trait_unit == "Number of eggs per female" ] <- "offspring number" 177 | df$trait_unit[df$trait_unit == "number of mature eggs"] <- "offspring number" 178 | df$trait_unit[df$trait_unit == "number of hatched eggs"] <- "offspring number" 179 | df$trait_unit[df$trait_unit == "Number of eggs laid throughout life"] <- "offspring number" 180 | df$trait_unit[df$trait_unit == "number of eggs per female"] <- "offspring number" 181 | df$trait_unit[df$trait_unit == "number of eggs" ] <- "offspring number" 182 | df$trait_unit[df$trait_unit == "cumulative number of eggs per female" ] <- "offspring number" 183 | df$trait_unit[df$trait_unit == "number of eggs by female" ] <- "offspring number" 184 | # check trait units 185 | unique(df$trait_unit) 186 | # Standardize units of development 187 | df$trait_unit[df$trait_unit == "days"] <- "Days" 188 | # check trait units 189 | unique(df$trait_unit) 190 | # The aim of the following lines is to convert all units of metabolic rates to 191 | # mgO2/h/ind. For simplicity, I will use a conversion factor of "1" for 192 | # developmental time and fecundity 193 | # ------------------------------------------------------------------------------ 194 | # Conversion factors for oxygen 195 | # 1 L of oxygen = 20.083 kiloJoule of oxygen = 0.0446 mol oxygen - I need to look up the reference 196 | # 1 mmHg of oxygen = 1 Torr = 0.133322 kPa 197 | # 1 mol of oxygen = 31.9988 grams of oxygen 198 | # 1 mol of a gas at STP occupies volume = 22.414 L 199 | # ------------------------------------------------------------------------------ 200 | # STEP 1: Convert all units of oxygen to milligram of oxygen (mgO2) 201 | # make a new column and extract the unit of oxygen before the "/" 202 | df$extracted_unit <- str_extract(df$trait_unit, "[^/]+") 203 | sort(unique(df$extracted_unit)) 204 | # Define lockup table for conversion factors. In the case of the metabolic rate, 205 | # I will convert all units to **mg O2** 206 | conversion_table_unit <- data.frame( 207 | extracted_unit = c("days", 208 | "Joule", 209 | "mgO2", 210 | "mlCO2", 211 | "mLO2", 212 | "nmolO2", 213 | "offspring number", 214 | "uLCO2", 215 | "umolO2"), 216 | conversion_factor = c(1, 217 | 0.0446, 218 | 1, 219 | 1 / 22.414 * 31.9988 / 0.85, 220 | 1 / 22.414 * 31.9988, 221 | 31.9988 / 1000000, 222 | 1, 223 | 1 / 22.414 * 31.9988 / 0.85 / 1000, 224 | 31.9988 /1000) 225 | ) 226 | # Merge lookup table with original data 227 | df_converted_step_1 <- left_join(df, conversion_table_unit, by = "extracted_unit") 228 | # Calculate trait value rates for all rows and create a new column 229 | df_converted_step_1 <- df_converted_step_1 %>% 230 | mutate(trait_converted = trait_value * conversion_factor) 231 | # STEP 2: Convert all units of time (for metabolic rates) to hours. So we will 232 | # keep the units for the other traits 233 | # select the units of time 234 | time_unit <- "(day|month|min|second|30min|20min|h|Days|offspring number)" 235 | # Extract the text and create a new column 236 | df_converted_step_1$extracted_time_unit <- str_extract(df_converted_step_1$trait_unit, time_unit) 237 | sort(unique(df_converted_step_1$extracted_time_unit)) 238 | # Define lockup table for conversion factors hours 239 | conversion_table_time <- data.frame( 240 | extracted_time_unit = c("day", 241 | "Days", 242 | "h", 243 | "min", 244 | "offspring number"), 245 | conversion_factor_to_hours = c(1 / 24, 246 | 1, 247 | 1, 248 | 60, 249 | 1) 250 | ) 251 | # Merge lookup table with original data 252 | df_converted_step_2 <- left_join(df_converted_step_1, conversion_table_time, by = "extracted_time_unit") 253 | # Calculate respiration rate per hour for all rows 254 | df_converted_step_2 <- df_converted_step_2 %>% 255 | mutate(trait_converted = trait_converted * conversion_factor_to_hours) 256 | # STEP 3: Express all units of oxygen consumption per individual 257 | # select, extract and make a new column the unit of body mass in "trait_unit" 258 | df_converted_step_2$extracted_size_unit <- str_extract(df_converted_step_2$trait_unit, "(Days|offspring number|ugN2|ugDM|ugCarbon|mgDM|mgFM|mgAFDM|gDM|gFM|100gFM|gAFDM|100gram|kgFM|ind)") 259 | sort(unique(df_converted_step_2$extracted_size_unit)) 260 | # check the type of sizes used to express body size and check their units 261 | sort(unique(df_converted_step_2$size_type)) 262 | sort(unique(df_converted_step_2$size_units)) 263 | # convert the units per individual 264 | df_converted_step_3 <- df_converted_step_2 %>% 265 | mutate(trait_converted = case_when( 266 | extracted_size_unit == "ind" ~ trait_converted, 267 | extracted_size_unit == "Days" ~ trait_converted, 268 | extracted_size_unit == "offspring number" ~ trait_converted, 269 | extracted_size_unit == "gDM" & size_type == "dry body mass" & size_units == "gram" ~ trait_converted * size_value, 270 | extracted_size_unit == "kgFM" & size_type == "fresh body mass" & size_units == "kilogram" ~ trait_converted * size_value, 271 | TRUE ~ NA_real_ # The TRUE ~ NA_real_ statement handles the cases where none of the conditions match, assigning NA to trait_converted 272 | )) 273 | # The following code has been adapted from MetaR (https://github.com/felixpleiva/MetaR) 274 | # by Felix P Leiva 275 | # Cleaning working space 276 | rm(list=ls()) 277 | # check directory 278 | getwd() 279 | #Libraries 280 | library(dplyr) 281 | library(tidyverse) 282 | library(stringr) 283 | #load data 284 | df <- read.csv("../outputs/2_1_ShareTrait_database.csv",sep = ",",header = TRUE) 285 | # check trait units 286 | unique(df$trait_unit) 287 | # Standardize units of fecundity 288 | df$trait_unit[df$trait_unit == "Egg load at adult emergence" ] <- "offspring number" 289 | df$trait_unit[df$trait_unit == "Number of eggs" ] <- "offspring number" 290 | df$trait_unit[df$trait_unit == "Total number of offspring" ] <- "offspring number" 291 | df$trait_unit[df$trait_unit == "Number of eggs per female" ] <- "offspring number" 292 | df$trait_unit[df$trait_unit == "number of mature eggs"] <- "offspring number" 293 | df$trait_unit[df$trait_unit == "number of hatched eggs"] <- "offspring number" 294 | df$trait_unit[df$trait_unit == "Number of eggs laid throughout life"] <- "offspring number" 295 | df$trait_unit[df$trait_unit == "number of eggs per female"] <- "offspring number" 296 | df$trait_unit[df$trait_unit == "number of eggs" ] <- "offspring number" 297 | df$trait_unit[df$trait_unit == "cumulative number of eggs per female" ] <- "offspring number" 298 | df$trait_unit[df$trait_unit == "number of eggs by female" ] <- "offspring number" 299 | # check trait units 300 | unique(df$trait_unit) 301 | # Standardize units of development 302 | df$trait_unit[df$trait_unit == "days"] <- "Days" 303 | # check trait units 304 | unique(df$trait_unit) 305 | # The aim of the following lines is to convert all units of metabolic rates to 306 | # mgO2/h/ind. For simplicity, I will use a conversion factor of "1" for 307 | # developmental time and fecundity 308 | # ------------------------------------------------------------------------------ 309 | # Conversion factors for oxygen 310 | # 1 L of oxygen = 20.083 kiloJoule of oxygen = 0.0446 mol oxygen - Schmidt-Nielsen 1997, page 583 311 | # 1 mmHg of oxygen = 1 Torr = 0.133322 kPa 312 | # 1 mol of oxygen = 31.9988 grams of oxygen 313 | # 1 mol of a gas at STP occupies volume = 22.414 L 314 | # ------------------------------------------------------------------------------ 315 | # STEP 1: Convert all units of oxygen to milligram of oxygen (mgO2) 316 | # make a new column and extract the unit of oxygen before the "/" 317 | df$extracted_unit <- str_extract(df$trait_unit, "[^/]+") 318 | sort(unique(df$extracted_unit)) 319 | # Define lockup table for conversion factors. In the case of the metabolic rate, 320 | # I will convert all units to **mg O2** 321 | conversion_table_unit <- data.frame( 322 | extracted_unit = c("days", 323 | "Joule", 324 | "mgO2", 325 | "mlCO2", 326 | "mLO2", 327 | "nmolO2", 328 | "offspring number", 329 | "uLCO2", 330 | "umolO2"), 331 | conversion_factor = c(1, 332 | 0.046 / 20.083 * 1000 * 31.9988, 333 | 1, 334 | 1 / 22.414 * 31.9988 / 0.85, 335 | 1 / 22.414 * 31.9988, 336 | 31.9988 / 1000000, 337 | 1, 338 | 1 / 22.414 * 31.9988 / 0.85 / 1000, 339 | 31.9988 /1000) 340 | ) 341 | # Merge lockup table with original data 342 | df_converted_step_1 <- left_join(df, conversion_table_unit, by = "extracted_unit") 343 | # Calculate trait value rates for all rows and create a new column 344 | df_converted_step_1 <- df_converted_step_1 %>% 345 | mutate(trait_converted = trait_value * conversion_factor) 346 | # STEP 2: Convert all units of time (for metabolic rates) to hours. So we will 347 | # keep the units for the other traits 348 | # select the units of time 349 | time_unit <- "(day|month|min|second|30min|20min|h|Days|offspring number)" 350 | # Extract the text and create a new column 351 | df_converted_step_1$extracted_time_unit <- str_extract(df_converted_step_1$trait_unit, time_unit) 352 | sort(unique(df_converted_step_1$extracted_time_unit)) 353 | # Define lockup table for conversion factors hours 354 | conversion_table_time <- data.frame( 355 | extracted_time_unit = c("day", 356 | "Days", 357 | "h", 358 | "min", 359 | "offspring number"), 360 | conversion_factor_to_hours = c(1 / 24, 361 | 1, 362 | 1, 363 | 60, 364 | 1) 365 | ) 366 | # Merge lookup table with original data 367 | df_converted_step_2 <- left_join(df_converted_step_1, conversion_table_time, by = "extracted_time_unit") 368 | # Calculate respiration rate per hour for all rows 369 | df_converted_step_2 <- df_converted_step_2 %>% 370 | mutate(trait_converted = trait_converted * conversion_factor_to_hours) 371 | # STEP 3: Express all units of oxygen consumption per individual 372 | # select, extract and make a new column the unit of body mass in "trait_unit" 373 | df_converted_step_2$extracted_size_unit <- str_extract(df_converted_step_2$trait_unit, "(Days|offspring number|ugN2|ugDM|ugCarbon|mgDM|mgFM|mgAFDM|gDM|gFM|100gFM|gAFDM|100gram|kgFM|ind)") 374 | sort(unique(df_converted_step_2$extracted_size_unit)) 375 | # check the type of sizes used to express body size and check their units 376 | sort(unique(df_converted_step_2$size_type)) 377 | sort(unique(df_converted_step_2$size_units)) 378 | # convert the units per individual 379 | df_converted_step_3 <- df_converted_step_2 %>% 380 | mutate(trait_converted = case_when( 381 | extracted_size_unit == "ind" ~ trait_converted, 382 | extracted_size_unit == "Days" ~ trait_converted, 383 | extracted_size_unit == "offspring number" ~ trait_converted, 384 | extracted_size_unit == "gDM" & size_type == "dry body mass" & size_units == "gram" ~ trait_converted * size_value, 385 | extracted_size_unit == "kgFM" & size_type == "fresh body mass" & size_units == "kilogram" ~ trait_converted * size_value, 386 | TRUE ~ NA_real_ # The TRUE ~ NA_real_ statement handles the cases where none of the conditions match, assigning NA to trait_converted 387 | )) 388 | View(conversion_table_unit) 389 | 7.329307e+01 390 | sort(unique(df_converted_step_2$size_units)) 391 | # check the type of sizes used to express body size and check their units 392 | sort(unique(df_converted_step_2$size_type)) 393 | # STEP 4: Convert all units of body size to gram of fresh mass 394 | sort(unique(df_converted_step_3$size_type)) 395 | # The following code has been adapted from MetaR (https://github.com/felixpleiva/MetaR) 396 | # by Felix P Leiva 397 | # Cleaning working space 398 | rm(list=ls()) 399 | # check directory 400 | getwd() 401 | #Libraries 402 | library(dplyr) 403 | library(tidyverse) 404 | library(stringr) 405 | #load data 406 | df <- read.csv("../outputs/2_1_ShareTrait_database.csv",sep = ",",header = TRUE) 407 | # check trait units 408 | unique(df$trait_unit) 409 | # Standardize units of fecundity 410 | df$trait_unit[df$trait_unit == "Egg load at adult emergence" ] <- "offspring number" 411 | df$trait_unit[df$trait_unit == "Number of eggs" ] <- "offspring number" 412 | df$trait_unit[df$trait_unit == "Total number of offspring" ] <- "offspring number" 413 | df$trait_unit[df$trait_unit == "Number of eggs per female" ] <- "offspring number" 414 | df$trait_unit[df$trait_unit == "number of mature eggs"] <- "offspring number" 415 | df$trait_unit[df$trait_unit == "number of hatched eggs"] <- "offspring number" 416 | df$trait_unit[df$trait_unit == "Number of eggs laid throughout life"] <- "offspring number" 417 | df$trait_unit[df$trait_unit == "number of eggs per female"] <- "offspring number" 418 | df$trait_unit[df$trait_unit == "number of eggs" ] <- "offspring number" 419 | df$trait_unit[df$trait_unit == "cumulative number of eggs per female" ] <- "offspring number" 420 | df$trait_unit[df$trait_unit == "number of eggs by female" ] <- "offspring number" 421 | # check trait units 422 | unique(df$trait_unit) 423 | # Standardize units of development 424 | df$trait_unit[df$trait_unit == "days"] <- "Days" 425 | # check trait units 426 | unique(df$trait_unit) 427 | # The aim of the following lines is to convert all units of metabolic rates to 428 | # mgO2/h/ind. For simplicity, I will use a conversion factor of "1" for 429 | # developmental time and fecundity 430 | # ------------------------------------------------------------------------------ 431 | # Conversion factors for oxygen 432 | # 1 L of oxygen = 20.083 kiloJoule of oxygen = 0.0446 mol oxygen - Schmidt-Nielsen 1997, page 583 433 | # 1 mmHg of oxygen = 1 Torr = 0.133322 kPa 434 | # 1 mol of oxygen = 31.9988 grams of oxygen 435 | # 1 mol of a gas at STP occupies volume = 22.414 L 436 | # ------------------------------------------------------------------------------ 437 | # STEP 1: Convert all units of oxygen to milligram of oxygen (mgO2) 438 | # make a new column and extract the unit of oxygen before the "/" 439 | df$extracted_unit <- str_extract(df$trait_unit, "[^/]+") 440 | sort(unique(df$extracted_unit)) 441 | # Define lockup table for conversion factors. In the case of the metabolic rate, 442 | # I will convert all units to **mg O2** 443 | conversion_table_unit <- data.frame( 444 | extracted_unit = c("days", 445 | "Joule", 446 | "mgO2", 447 | "mlCO2", 448 | "mLO2", 449 | "nmolO2", 450 | "offspring number", 451 | "uLCO2", 452 | "umolO2"), 453 | conversion_factor = c(1, 454 | 0.046 / 20.083 * 1000 * 31.9988, # I am not sure about this one!! 455 | 1, 456 | 1 / 22.414 * 31.9988 / 0.85, 457 | 1 / 22.414 * 31.9988, 458 | 31.9988 / 1000000, 459 | 1, 460 | 1 / 22.414 * 31.9988 / 0.85 / 1000, 461 | 31.9988 /1000) 462 | ) 463 | # Merge lockup table with original data 464 | df_converted_step_1 <- left_join(df, conversion_table_unit, by = "extracted_unit") 465 | # Calculate trait value rates for all rows and create a new column 466 | df_converted_step_1 <- df_converted_step_1 %>% 467 | mutate(trait_converted = trait_value * conversion_factor) 468 | # STEP 2: Convert all units of time (for metabolic rates) to hours. So we will 469 | # keep the units for the other traits 470 | # select the units of time 471 | time_unit <- "(day|month|min|second|30min|20min|h|Days|offspring number)" 472 | # Extract the text and create a new column 473 | df_converted_step_1$extracted_time_unit <- str_extract(df_converted_step_1$trait_unit, time_unit) 474 | sort(unique(df_converted_step_1$extracted_time_unit)) 475 | # Define lockup table for conversion factors hours 476 | conversion_table_time <- data.frame( 477 | extracted_time_unit = c("day", 478 | "Days", 479 | "h", 480 | "min", 481 | "offspring number"), 482 | conversion_factor_to_hours = c(1 / 24, 483 | 1, 484 | 1, 485 | 60, 486 | 1) 487 | ) 488 | # Merge lookup table with original data 489 | df_converted_step_2 <- left_join(df_converted_step_1, conversion_table_time, by = "extracted_time_unit") 490 | # Calculate respiration rate per hour for all rows 491 | df_converted_step_2 <- df_converted_step_2 %>% 492 | mutate(trait_converted = trait_converted * conversion_factor_to_hours) 493 | # STEP 3: Express all units of oxygen consumption per individual 494 | # select, extract and make a new column the unit of body mass in "trait_unit" 495 | df_converted_step_2$extracted_size_unit <- str_extract(df_converted_step_2$trait_unit, "(Days|offspring number|ugN2|ugDM|ugCarbon|mgDM|mgFM|mgAFDM|gDM|gFM|100gFM|gAFDM|100gram|kgFM|ind)") 496 | sort(unique(df_converted_step_2$extracted_size_unit)) 497 | # check the type of sizes used to express body size and check their units 498 | sort(unique(df_converted_step_2$size_type)) 499 | sort(unique(df_converted_step_2$size_units)) 500 | # convert the units per individual 501 | df_converted_step_3 <- df_converted_step_2 %>% 502 | mutate(trait_converted = case_when( 503 | extracted_size_unit == "ind" ~ trait_converted, 504 | extracted_size_unit == "Days" ~ trait_converted, 505 | extracted_size_unit == "offspring number" ~ trait_converted, 506 | extracted_size_unit == "gDM" & size_type == "dry body mass" & size_units == "gram" ~ trait_converted * size_value, 507 | extracted_size_unit == "kgFM" & size_type == "fresh body mass" & size_units == "kilogram" ~ trait_converted * size_value, 508 | TRUE ~ NA_real_ # The TRUE ~ NA_real_ statement handles the cases where none of the conditions match, assigning NA to trait_converted 509 | )) 510 | # STEP 4: Convert all units of body size to gram of fresh mass 511 | sort(unique(df_converted_step_3$size_type)) 512 | sort(unique(df_converted_step_3$size_units)) 513 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/1_1_compilation_R_session.txt: -------------------------------------------------------------------------------- 1 | R version 4.2.2 (2022-10-31 ucrt) 2 | Platform: x86_64-w64-mingw32/x64 (64-bit) 3 | Running under: Windows 10 x64 (build 19045) 4 | 5 | Matrix products: default 6 | 7 | locale: 8 | [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 9 | [4] LC_NUMERIC=C LC_TIME=English_United States.utf8 10 | 11 | attached base packages: 12 | [1] stats graphics grDevices utils datasets methods base 13 | 14 | other attached packages: 15 | [1] dplyr_1.1.0 data.table_1.14.8 16 | 17 | loaded via a namespace (and not attached): 18 | [1] lattice_0.20-45 fansi_1.0.4 utf8_1.2.3 grid_4.2.2 R6_2.5.1 lifecycle_1.0.3 magrittr_2.0.3 pillar_1.8.1 19 | [9] rlang_1.0.6 cli_3.6.0 rstudioapi_0.14 sp_1.6-0 vctrs_0.5.2 generics_0.1.3 rgdal_1.6-7 tools_4.2.2 20 | [17] glue_1.6.2 purrr_1.0.1 compiler_4.2.2 pkgconfig_2.0.3 tidyselect_1.2.0 tibble_3.1.8 21 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/2_1_ShareTrait_Database.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/outputs/2_1_ShareTrait_Database.csv -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/2_1_standarisation_R_session.txt: -------------------------------------------------------------------------------- 1 | R version 4.2.2 (2022-10-31 ucrt) 2 | Platform: x86_64-w64-mingw32/x64 (64-bit) 3 | Running under: Windows 10 x64 (build 19045) 4 | 5 | Matrix products: default 6 | 7 | locale: 8 | [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 9 | [4] LC_NUMERIC=C LC_TIME=English_United States.utf8 10 | 11 | attached base packages: 12 | [1] stats graphics grDevices utils datasets methods base 13 | 14 | other attached packages: 15 | [1] lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0 purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 tibble_3.1.8 ggplot2_3.4.1 16 | [9] tidyverse_2.0.0 dplyr_1.1.0 17 | 18 | loaded via a namespace (and not attached): 19 | [1] rstudioapi_0.14 magrittr_2.0.3 hms_1.1.3 tidyselect_1.2.0 munsell_0.5.0 timechange_0.2.0 colorspace_2.1-0 R6_2.5.1 20 | [9] rlang_1.0.6 fansi_1.0.4 tools_4.2.2 grid_4.2.2 gtable_0.3.1 utf8_1.2.3 cli_3.6.0 withr_2.5.0 21 | [17] lifecycle_1.0.3 tzdb_0.3.0 vctrs_0.5.2 glue_1.6.2 stringi_1.7.12 compiler_4.2.2 pillar_1.8.1 generics_0.1.3 22 | [25] scales_1.2.1 pkgconfig_2.0.3 23 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/2_2_ShareTrait_DataBase.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/outputs/2_2_ShareTrait_DataBase.csv -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/2_2_trait_units_R_session.txt: -------------------------------------------------------------------------------- 1 | R version 4.2.2 (2022-10-31 ucrt) 2 | Platform: x86_64-w64-mingw32/x64 (64-bit) 3 | Running under: Windows 10 x64 (build 19045) 4 | 5 | Matrix products: default 6 | 7 | locale: 8 | [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 9 | [4] LC_NUMERIC=C LC_TIME=English_United States.utf8 10 | 11 | attached base packages: 12 | [1] stats graphics grDevices utils datasets methods base 13 | 14 | other attached packages: 15 | [1] stringr_1.5.0 dplyr_1.1.0 16 | 17 | loaded via a namespace (and not attached): 18 | [1] rstudioapi_0.15.0 magrittr_2.0.3 tidyselect_1.2.0 R6_2.5.1 rlang_1.0.6 fansi_1.0.4 19 | [7] tools_4.2.2 grid_4.2.2 utf8_1.2.3 cli_3.6.0 withr_2.5.0 tibble_3.1.8 20 | [13] lifecycle_1.0.3 vctrs_0.5.2 glue_1.6.2 tidyverse_2.0.0 stringi_1.7.12 compiler_4.2.2 21 | [19] pillar_1.9.0 generics_0.1.3 pkgconfig_2.0.3 22 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/2_3_harmonize_taxonomy_R_session.txt: -------------------------------------------------------------------------------- 1 | R version 4.2.2 (2022-10-31 ucrt) 2 | Platform: x86_64-w64-mingw32/x64 (64-bit) 3 | Running under: Windows 10 x64 (build 19045) 4 | 5 | Matrix products: default 6 | 7 | locale: 8 | [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 9 | [4] LC_NUMERIC=C LC_TIME=English_United States.utf8 10 | 11 | attached base packages: 12 | [1] stats graphics grDevices utils datasets methods base 13 | 14 | other attached packages: 15 | [1] plyr_1.8.8 taxize_0.9.100 rgbif_3.7.6 lubridate_1.9.2 forcats_1.0.0 purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 16 | [9] tibble_3.1.8 ggplot2_3.4.1 tidyverse_2.0.0 Hmisc_5.0-1 stringr_1.5.0 dplyr_1.1.0 data.table_1.14.8 17 | 18 | loaded via a namespace (and not attached): 19 | [1] httr_1.4.5 foreach_1.5.2 jsonlite_1.8.4 bold_1.2.0 Formula_1.2-5 triebeard_0.4.1 urltools_1.7.3 sp_1.6-0 20 | [9] pillar_1.8.1 backports_1.4.1 lattice_0.20-45 glue_1.6.2 uuid_1.1-0 digest_0.6.31 checkmate_2.1.0 colorspace_2.1-0 21 | [17] htmltools_0.5.4 ritis_1.0.0 pkgconfig_2.0.3 oai_0.4.0 httpcode_0.3.0 scales_1.2.1 whisker_0.4.1 tzdb_0.3.0 22 | [25] solrium_1.2.0 timechange_0.2.0 htmlTable_2.4.1 generics_0.1.3 withr_2.5.0 nnet_7.3-18 lazyeval_0.2.2 cli_3.6.0 23 | [33] magrittr_2.0.3 crayon_1.5.2 evaluate_0.20 fansi_1.0.4 nlme_3.1-160 xml2_1.3.3 foreign_0.8-83 tools_4.2.2 24 | [41] hms_1.1.3 lifecycle_1.0.3 munsell_0.5.0 cluster_2.1.4 compiler_4.2.2 rlang_1.0.6 grid_4.2.2 conditionz_0.1.0 25 | [49] iterators_1.0.14 rstudioapi_0.14 htmlwidgets_1.6.1 base64enc_0.1-3 rmarkdown_2.20 codetools_0.2-18 gtable_0.3.1 reshape_0.8.9 26 | [57] curl_5.0.0 R6_2.5.1 zoo_1.8-11 gridExtra_2.3 knitr_1.42 rgdal_1.6-7 fastmap_1.1.1 utf8_1.2.3 27 | [65] ape_5.7 stringi_1.7.12 parallel_4.2.2 crul_1.3 Rcpp_1.0.10 vctrs_0.5.2 rpart_4.1.19 tidyselect_1.2.0 28 | [73] xfun_0.37 29 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/2_3_harmonized_taxonomy_ShareTrait.csv: -------------------------------------------------------------------------------- 1 | phylum,class,order,family,genus,species,species_reported,source,taxo_level 2 | Arthropoda,Insecta,Hymenoptera,Braconidae,Aphidius,Aphidius platensis, Aphidius_platensis,ncbi,Species 3 | Chordata,Amphibia,Anura,Ranidae,Rana,Rana temporaria, Rana_temporaria,ncbi,Species 4 | Chordata,Amphibia,Anura,Ranidae,Rana,Rana arvalis, Rana_arvalis,ncbi,Species 5 | Arthropoda,Insecta,Diptera,Drosophilidae,Drosophila,Drosophila melanogaster, Drosophila_melanogaster,ncbi,Species 6 | Chordata,Amphibia,Anura,Ranidae,Pelophylax,Pelophylax lessonae, Pelophylax_esculentus,ncbi,Species 7 | Arthropoda,Insecta,Hymenoptera,Braconidae,Aphidius,Aphidius colemani, Aphidius_colemani,ncbi,Species 8 | Arthropoda,Insecta,Odonata,Lestidae,Chalcolestes,Chalcolestes viridis, Lestes_viridis,ncbi,Species 9 | Arthropoda,Insecta,Hymenoptera,Braconidae,Asobara,Asobara tabida, Asobara_tabida,ncbi,Species 10 | Arthropoda,Insecta,Hymenoptera,Figitidae,Leptopilina,Leptopilina heterotoma, Leptopilina_heterotoma,ncbi,Species 11 | Arthropoda,Insecta,Hymenoptera,Pteromalidae,Spalangia,Spalangia erythromera, Spalangia_erythromera,ncbi,Species 12 | Arthropoda,Insecta,Hymenoptera,Diapriidae,Trichopria,Trichopria drosophilae, Trichopria_drosophilae,ncbi,Species 13 | Arthropoda,Insecta,Hymenoptera,Braconidae,Aphidius,Aphidius ervi, Aphidius_ervi,ncbi,Species 14 | Arthropoda,Insecta,Lepidoptera,Lycaenidae,Lycaena,Lycaena phlaeas, Lycaena_phlaeas,ncbi,Species 15 | Arthropoda,Insecta,Hymenoptera,Chalcididae,Brachymeria,Brachymeria nosatoi, Brachymeria_nosatoi,ncbi,Species 16 | Arthropoda,Insecta,Lepidoptera,Oecophoridae,Opisina,Opisina arenosella, Opisina_arenosella,ncbi,Species 17 | Arthropoda,Insecta,Hymenoptera,Braconidae,Aphidius,Aphidius matricariae, Aphidius_matricariae,ncbi,Species 18 | Arthropoda,Insecta,Hemiptera,Aphididae,Dysaphis,Dysaphis plantaginea, Dysaphis_plantaginea,ncbi,Species 19 | Arthropoda,Insecta,Lepidoptera,Geometridae,Operophtera,Operophtera brumata, Operophtera_brumata,ncbi,Species 20 | Arthropoda,Malacostraca,Decapoda,Porcellanidae,Petrolisthes,Petrolisthes laevigatus, Petrolisthes_laevigatus,ncbi,Species 21 | Mollusca,Gastropoda,NA,Lymnaeidae,Lymnaea,Lymnaea stagnalis, Lymnaea_stagnalis,ncbi,Species 22 | Arthropoda,Insecta,Hymenoptera,Encyrtidae,Copidosoma,Copidosoma koehleri, Copidosoma_koehleri,ncbi,Species 23 | Arthropoda,Insecta,Diptera,Drosophilidae,Drosophila,Drosophila subobscura, Drosophila_subobscura,ncbi,Species 24 | Arthropoda,Malacostraca,Decapoda,Lithodidae,Lithodes,Lithodes santolla, Lithodes_santolla,ncbi,Species 25 | Arthropoda,Insecta,Orthoptera,Gryllidae,Gryllus,Gryllus bimaculatus, Gryllus_bimaculatus,ncbi,Species 26 | Arthropoda,Insecta,Orthoptera,Gryllidae,Gryllus,Gryllus campestris, Gryllus_campestris,ncbi,Species 27 | Chordata,Actinopteri,Cypriniformes,Danionidae,Danio,Danio rerio, Danio_rerio,ncbi,Species 28 | Chordata,Actinopteri,Centrarchiformes,Terapontidae,Bidyanus,Bidyanus bidyanus, Bidyanus_bidyanus,ncbi,Species 29 | Chordata,Actinopteri,Centrarchiformes,Terapontidae,Leiopotherapon,Leiopotherapon unicolor, Leiopotherapon_unicolor,ncbi,Species 30 | Arthropoda,Malacostraca,Decapoda,Callianassidae,Neotrypaea,Neotrypaea uncinata, Neotrypaea_uncinata,ncbi,Species 31 | Arthropoda,Malacostraca,Amphipoda,Gammaridae,Gammarus,Gammarus insensibilis, Gammarus_insensibilis,ncbi,Species 32 | Arthropoda,Insecta,Hemiptera,Aphelocheiridae,Aphelocheirus,Aphelocheirus aestivalis, Aphelocheirus_aestivalis,ncbi,Species 33 | Chordata,Lepidosauria,Squamata,Scincidae,Liopholis,Liopholis striata, Liopholis_striata,ncbi,Species 34 | Chordata,Lepidosauria,Squamata,Scincidae,Liopholis,Liopholis inornata, Liopholis_inornata,ncbi,Species 35 | Arthropoda,Insecta,Hymenoptera,Encyrtidae,Trechnites,Trechnites insidiosus, Trechnites_insidiosus,gbif,Species 36 | Arthropoda,Insecta,Hemiptera,Naucoridae,Ilyocoris,Ilyocoris cimicoides, Ilyocorus_cimicoides,gbif,Species 37 | Chordata,Amphibia,Anura,Pelodryadidae,Ranoidea,Ranoidea caerulea, Litoria_caerulea,gbif,Species 38 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/2_4_citations_R_session.txt: -------------------------------------------------------------------------------- 1 | R version 4.2.2 (2022-10-31 ucrt) 2 | Platform: x86_64-w64-mingw32/x64 (64-bit) 3 | Running under: Windows 10 x64 (build 19045) 4 | 5 | Matrix products: default 6 | 7 | locale: 8 | [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 9 | [4] LC_NUMERIC=C LC_TIME=English_United States.utf8 10 | 11 | attached base packages: 12 | [1] stats graphics grDevices utils datasets methods base 13 | 14 | other attached packages: 15 | [1] RefManageR_1.4.0 stringr_1.5.0 dplyr_1.1.0 16 | 17 | loaded via a namespace (and not attached): 18 | [1] Rcpp_1.0.10 rstudioapi_0.15.0 xml2_1.3.5 magrittr_2.0.3 tidyselect_1.2.0 timechange_0.2.0 19 | [7] R6_2.5.1 rlang_1.0.6 bibtex_0.5.1 fansi_1.0.4 httr_1.4.6 plyr_1.8.8 20 | [13] tools_4.2.2 utf8_1.2.3 cli_3.6.0 tibble_3.1.8 lifecycle_1.0.3 vctrs_0.5.2 21 | [19] curl_5.0.0 glue_1.6.2 stringi_1.7.12 compiler_4.2.2 pillar_1.9.0 generics_0.1.3 22 | [25] backports_1.4.1 jsonlite_1.8.4 lubridate_1.9.2 pkgconfig_2.0.3 23 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/3_1_Global_map_ShareTrait_R_session.txt: -------------------------------------------------------------------------------- 1 | R version 4.2.2 (2022-10-31 ucrt) 2 | Platform: x86_64-w64-mingw32/x64 (64-bit) 3 | Running under: Windows 10 x64 (build 19045) 4 | 5 | Matrix products: default 6 | 7 | locale: 8 | [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 LC_NUMERIC=C 9 | [5] LC_TIME=English_United States.utf8 10 | 11 | attached base packages: 12 | [1] stats graphics grDevices utils datasets methods base 13 | 14 | other attached packages: 15 | [1] colorRamps_2.3.1 RColorBrewer_1.1-3 lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0 purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 16 | [9] tibble_3.1.8 tidyverse_2.0.0 cowplot_1.1.1 dplyr_1.1.0 mapview_2.11.0 ggplot2_3.4.1 data.table_1.14.8 rgdal_1.6-7 17 | [17] sp_1.6-0 18 | 19 | loaded via a namespace (and not attached): 20 | [1] jsonlite_1.8.4 stats4_4.2.2 yaml_2.3.7 pillar_1.8.1 lattice_0.20-45 glue_1.6.2 21 | [7] digest_0.6.31 colorspace_2.1-0 leaflet.providers_1.9.0 htmltools_0.5.4 pkgconfig_2.0.3 raster_3.6-20 22 | [13] scales_1.2.1 webshot_0.5.4 terra_1.7-39 satellite_1.0.4 tzdb_0.3.0 timechange_0.2.0 23 | [19] proxy_0.4-27 generics_0.1.3 farver_2.1.1 ellipsis_0.3.2 withr_2.5.0 cli_3.6.0 24 | [25] magrittr_2.0.3 crayon_1.5.2 evaluate_0.20 fansi_1.0.4 class_7.3-20 textshaping_0.3.6 25 | [31] tools_4.2.2 hms_1.1.3 lifecycle_1.0.3 munsell_0.5.0 compiler_4.2.2 e1071_1.7-13 26 | [37] systemfonts_1.0.4 rlang_1.0.6 classInt_0.4-9 units_0.8-1 grid_4.2.2 rstudioapi_0.14 27 | [43] htmlwidgets_1.6.1 crosstalk_1.2.0 leafem_0.2.0 base64enc_0.1-3 labeling_0.4.2 rmarkdown_2.20 28 | [49] gtable_0.3.1 codetools_0.2-18 DBI_1.1.3 R6_2.5.1 knitr_1.42 fastmap_1.1.1 29 | [55] utf8_1.2.3 ragg_1.2.5 KernSmooth_2.23-20 stringi_1.7.12 Rcpp_1.0.10 vctrs_0.5.2 30 | [61] sf_1.0-12 png_0.1-8 leaflet_2.1.2 tidyselect_1.2.0 xfun_0.37 31 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/3_2_Phylogenetic_tree_ShareTrait_R_session.txt: -------------------------------------------------------------------------------- 1 | R version 4.2.1 (2022-06-23 ucrt) 2 | Platform: x86_64-w64-mingw32/x64 (64-bit) 3 | Running under: Windows 10 x64 (build 19045) 4 | 5 | Matrix products: default 6 | 7 | locale: 8 | [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 9 | [4] LC_NUMERIC=C LC_TIME=English_United States.utf8 10 | 11 | attached base packages: 12 | [1] stats graphics grDevices utils datasets methods base 13 | 14 | other attached packages: 15 | [1] dplyr_1.1.2 rotl_3.1.0 phytools_1.9-16 maps_3.4.1 ape_5.7-1 16 | 17 | loaded via a namespace (and not attached): 18 | [1] phangorn_2.11.1 progress_1.2.2 tidyselect_1.2.0 lattice_0.20-45 colorspace_2.1-0 19 | [6] vctrs_0.6.3 generics_0.1.3 expm_0.999-7 utf8_1.2.3 optimParallel_1.0-2 20 | [11] XML_3.99-0.14 rlang_1.1.1 pillar_1.9.0 glue_1.6.2 rentrez_1.2.3 21 | [16] foreach_1.5.2 lifecycle_1.0.3 munsell_0.5.0 combinat_0.0-8 gtable_0.3.3 22 | [21] codetools_0.2-18 coda_0.19-4 doParallel_1.0.17 curl_5.0.1 parallel_4.2.1 23 | [26] fansi_1.0.4 Rcpp_1.0.11 scales_1.2.1 plotrix_3.8-2 clusterGeneration_1.3.7 24 | [31] scatterplot3d_0.3-44 jsonlite_1.8.7 fastmatch_1.1-3 mnormt_2.1.1 hms_1.1.3 25 | [36] ggplot2_3.4.2 digest_0.6.33 rncl_0.8.7 numDeriv_2016.8-1.1 cowplot_1.1.1 26 | [41] grid_4.2.1 quadprog_1.5-8 cli_3.6.1 tools_4.2.1 magrittr_2.0.3 27 | [46] tibble_3.2.1 crayon_1.5.2 pkgconfig_2.0.3 MASS_7.3-57 Matrix_1.6-0 28 | [51] prettyunits_1.1.1 httr_1.4.6 rstudioapi_0.15.0 iterators_1.0.14 R6_2.5.1 29 | [56] igraph_1.5.0.1 nlme_3.1-157 compiler_4.2.1 30 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/3_3_Exploratory_plots_ShareTrait.txt: -------------------------------------------------------------------------------- 1 | R version 4.2.1 (2022-06-23 ucrt) 2 | Platform: x86_64-w64-mingw32/x64 (64-bit) 3 | Running under: Windows 10 x64 (build 19045) 4 | 5 | Matrix products: default 6 | 7 | locale: 8 | [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 9 | [4] LC_NUMERIC=C LC_TIME=English_United States.utf8 10 | 11 | attached base packages: 12 | [1] stats graphics grDevices utils datasets methods base 13 | 14 | other attached packages: 15 | [1] colorRamps_2.3.1 ggrepel_0.9.3 cowplot_1.1.1 ggpubr_0.6.0 RColorBrewer_1.1-3 ggExtra_0.10.0 16 | [7] lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0 purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 17 | [13] tibble_3.2.1 ggplot2_3.4.2 tidyverse_2.0.0 dplyr_1.1.2 18 | 19 | loaded via a namespace (and not attached): 20 | [1] tidyselect_1.2.0 carData_3.0-5 colorspace_2.1-0 vctrs_0.6.3 generics_0.1.3 miniUI_0.1.1.1 21 | [7] htmltools_0.5.5 utf8_1.2.3 rlang_1.1.1 pillar_1.9.0 later_1.3.1 glue_1.6.2 22 | [13] withr_2.5.0 lifecycle_1.0.3 munsell_0.5.0 ggsignif_0.6.4 gtable_0.3.3 ragg_1.2.5 23 | [19] labeling_0.4.2 tzdb_0.4.0 fastmap_1.1.1 httpuv_1.6.11 fansi_1.0.4 broom_1.0.5 24 | [25] Rcpp_1.0.11 xtable_1.8-4 scales_1.2.1 promises_1.2.0.1 backports_1.4.1 abind_1.4-5 25 | [31] systemfonts_1.0.4 mime_0.12 farver_2.1.1 textshaping_0.3.6 hms_1.1.3 digest_0.6.33 26 | [37] stringi_1.7.12 rstatix_0.7.2 shiny_1.7.4.1 grid_4.2.1 cli_3.6.1 tools_4.2.1 27 | [43] magrittr_2.0.3 car_3.1-2 pkgconfig_2.0.3 ellipsis_0.3.2 timechange_0.2.0 rstudioapi_0.15.0 28 | [49] R6_2.5.1 compiler_4.2.1 29 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/Retrieve_taxonomy.R: -------------------------------------------------------------------------------- 1 | #---- FUNCTIONS #### 2 | 3 | GB_classif <- function(x) { 4 | gb <- name_backbone(x) 5 | 6 | classif <- c( 7 | phylum = if (length(gb$phylum) > 0) gb$phylum else NA, 8 | class = if (length(gb$class) > 0) gb$class else NA, 9 | order = if (length(gb$order) > 0) gb$order else NA, 10 | family = if (length(gb$family) > 0) gb$family else NA, 11 | genus = if (length(gb$genus) > 0) gb$genus else NA, 12 | species = if (length(gb$species) > 0) gb$species else NA, 13 | x 14 | ) 15 | 16 | return(classif) 17 | } 18 | 19 | 20 | NCBI_classif <- function(x, db) { 21 | gb <- try(classification(x, db = db, rows = 1), silent = TRUE) 22 | 23 | if (class(gb) == "try-error") { 24 | classif <- c(NA, NA, NA, NA, NA, NA, as.character(x)) 25 | } else { 26 | rows <- length(gb[[1]]) 27 | classification_levels <- c("phylum", "class", "order", "family", "genus", "species") 28 | 29 | classif <- sapply(classification_levels, function(level) { 30 | if (rows == 1) { 31 | NA 32 | } else { 33 | value <- as.character(gb[[1]][, 1][gb[[1]][, 2] %in% c(level, toupper(level))]) 34 | ifelse(length(value) > 0, value, NA) 35 | } 36 | }) 37 | 38 | classif <- c(classif, as.character(x)) 39 | } 40 | 41 | return(classif) 42 | } 43 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/ShareTrait_Development.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/outputs/ShareTrait_Development.csv -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/ShareTrait_Metabolic_Rates.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShareTraitProject/ShareTrait/5b7e3ad975efc6c661f520d5bbfa92f5458b885e/ShareTrait_DB/v1.0.0/outputs/ShareTrait_Metabolic_Rates.csv -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/dfnames.gbif.txt: -------------------------------------------------------------------------------- 1 | "phylum" "class" "order" "family" "genus" "species" "species_reported" 2 | "1" "Arthropoda" "Insecta" "Hymenoptera" "Encyrtidae" "Trechnites" "Trechnites insidiosus" " Trechnites_insidiosus" 3 | "2" "Arthropoda" "Insecta" "Hemiptera" "Naucoridae" "Ilyocoris" "Ilyocoris cimicoides" " Ilyocorus_cimicoides" 4 | "3" "Chordata" "Amphibia" "Anura" "Pelodryadidae" "Ranoidea" "Ranoidea caerulea" " Litoria_caerulea" 5 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/dfnames.itis.txt: -------------------------------------------------------------------------------- 1 | "phylum" "class" "order" "family" "genus" "species" "species_reported" 2 | -------------------------------------------------------------------------------- /ShareTrait_DB/v1.0.0/outputs/dfnames.ncbi.txt: -------------------------------------------------------------------------------- 1 | "phylum" "class" "order" "family" "genus" "species" "species_reported" 2 | "1" "Arthropoda" "Insecta" "Hymenoptera" "Braconidae" "Aphidius" "Aphidius platensis" " Aphidius_platensis" 3 | "2" "Chordata" "Amphibia" "Anura" "Ranidae" "Rana" "Rana temporaria" " Rana_temporaria" 4 | "3" "Chordata" "Amphibia" "Anura" "Ranidae" "Rana" "Rana arvalis" " Rana_arvalis" 5 | "4" "Arthropoda" "Insecta" "Diptera" "Drosophilidae" "Drosophila" "Drosophila melanogaster" " Drosophila_melanogaster" 6 | "5" "Chordata" "Amphibia" "Anura" "Ranidae" "Pelophylax" "Pelophylax lessonae" " Pelophylax_esculentus" 7 | "6" "Arthropoda" "Insecta" "Hymenoptera" "Braconidae" "Aphidius" "Aphidius colemani" " Aphidius_colemani" 8 | "7" "Arthropoda" "Insecta" "Odonata" "Lestidae" "Chalcolestes" "Chalcolestes viridis" " Lestes_viridis" 9 | "8" "Arthropoda" "Insecta" "Hymenoptera" "Braconidae" "Asobara" "Asobara tabida" " Asobara_tabida" 10 | "9" "Arthropoda" "Insecta" "Hymenoptera" "Figitidae" "Leptopilina" "Leptopilina heterotoma" " Leptopilina_heterotoma" 11 | "10" "Arthropoda" "Insecta" "Hymenoptera" "Pteromalidae" "Spalangia" "Spalangia erythromera" " Spalangia_erythromera" 12 | "11" "Arthropoda" "Insecta" "Hymenoptera" "Diapriidae" "Trichopria" "Trichopria drosophilae" " Trichopria_drosophilae" 13 | "12" "Arthropoda" "Insecta" "Hymenoptera" "Braconidae" "Aphidius" "Aphidius ervi" " Aphidius_ervi" 14 | "13" "Arthropoda" "Insecta" "Lepidoptera" "Lycaenidae" "Lycaena" "Lycaena phlaeas" " Lycaena_phlaeas" 15 | "14" "Arthropoda" "Insecta" "Hymenoptera" "Chalcididae" "Brachymeria" "Brachymeria nosatoi" " Brachymeria_nosatoi" 16 | "15" "Arthropoda" "Insecta" "Lepidoptera" "Oecophoridae" "Opisina" "Opisina arenosella" " Opisina_arenosella" 17 | "16" "Arthropoda" "Insecta" "Hymenoptera" "Braconidae" "Aphidius" "Aphidius matricariae" " Aphidius_matricariae" 18 | "17" "Arthropoda" "Insecta" "Hemiptera" "Aphididae" "Dysaphis" "Dysaphis plantaginea" " Dysaphis_plantaginea" 19 | "18" "Arthropoda" "Insecta" "Lepidoptera" "Geometridae" "Operophtera" "Operophtera brumata" " Operophtera_brumata" 20 | "19" "Arthropoda" "Malacostraca" "Decapoda" "Porcellanidae" "Petrolisthes" "Petrolisthes laevigatus" " Petrolisthes_laevigatus" 21 | "20" "Mollusca" "Gastropoda" NA "Lymnaeidae" "Lymnaea" "Lymnaea stagnalis" " Lymnaea_stagnalis" 22 | "21" "Arthropoda" "Insecta" "Hymenoptera" "Encyrtidae" "Copidosoma" "Copidosoma koehleri" " Copidosoma_koehleri" 23 | "22" "Arthropoda" "Insecta" "Diptera" "Drosophilidae" "Drosophila" "Drosophila subobscura" " Drosophila_subobscura" 24 | "23" "Arthropoda" "Malacostraca" "Decapoda" "Lithodidae" "Lithodes" "Lithodes santolla" " Lithodes_santolla" 25 | "24" "Arthropoda" "Insecta" "Orthoptera" "Gryllidae" "Gryllus" "Gryllus bimaculatus" " Gryllus_bimaculatus" 26 | "25" "Arthropoda" "Insecta" "Orthoptera" "Gryllidae" "Gryllus" "Gryllus campestris" " Gryllus_campestris" 27 | "26" "Chordata" "Actinopteri" "Cypriniformes" "Danionidae" "Danio" "Danio rerio" " Danio_rerio" 28 | "27" "Chordata" "Actinopteri" "Centrarchiformes" "Terapontidae" "Bidyanus" "Bidyanus bidyanus" " Bidyanus_bidyanus" 29 | "28" "Chordata" "Actinopteri" "Centrarchiformes" "Terapontidae" "Leiopotherapon" "Leiopotherapon unicolor" " Leiopotherapon_unicolor" 30 | "29" "Arthropoda" "Malacostraca" "Decapoda" "Callianassidae" "Neotrypaea" "Neotrypaea uncinata" " Neotrypaea_uncinata" 31 | "30" "Arthropoda" "Malacostraca" "Amphipoda" "Gammaridae" "Gammarus" "Gammarus insensibilis" " Gammarus_insensibilis" 32 | "31" "Arthropoda" "Insecta" "Hemiptera" "Aphelocheiridae" "Aphelocheirus" "Aphelocheirus aestivalis" " Aphelocheirus_aestivalis" 33 | "32" "Chordata" "Lepidosauria" "Squamata" "Scincidae" "Liopholis" "Liopholis striata" " Liopholis_striata" 34 | "33" "Chordata" "Lepidosauria" "Squamata" "Scincidae" "Liopholis" "Liopholis inornata" " Liopholis_inornata" 35 | --------------------------------------------------------------------------------