Skip to content

Commit

Permalink
Removal of the LahtiWAdata and HintikkaXOData datasets #38 (#39)
Browse files Browse the repository at this point in the history
* Removal of the LahtiWAdata and HintikkaXOData datasets #38

* Removal of the LahtiWAdata and HintikkaXOData datasets #38

* Delete .DS_Store

* Delete inst/.DS_Store

* Delete microbiomeDataSets.Rproj

* update gitignore
  • Loading branch information
ake123 authored Sep 21, 2024
1 parent dbba9e0 commit 107be70
Show file tree
Hide file tree
Showing 10 changed files with 199 additions and 140 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_Store
inst/extras/
.Rproj
.Rproj.user
.Rhistory
.RData
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ Suggests:
SingleCellExperiment,
testthat
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
VignetteBuilder: knitr
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ importFrom(TreeSummarizedExperiment,TreeSummarizedExperiment)
importFrom(TreeSummarizedExperiment,changeTree)
importFrom(ape,read.tree)
importFrom(methods,as)
importFrom(utils,data)
importFrom(utils,read.csv)
196 changes: 98 additions & 98 deletions R/GrieneisenTSData.R
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
#' Retrieve GrieneisenTS data
#'
#' Obtain longitudinal gut microbiome data in wild baboons from
#' Grieneisen et al. (2021).
#'
#' @details
#' The GrieneisenTS dataset contains 16,234 16S rRNA gene
#' sequencing-based microbiome profiles from 585 baboon samples
#' collected over 14 years to determine the heritability of the
#' gut microbiome on various environmental factors such as
#' diet, age, season. Each baboon had an average of 28 samples
#' collected over 4.5 years. The data set can be used to
#' investigate significance of longitudinal sampling at large
#' sample sizes.
#'
#' This data set contains the 613 most prevalent taxa with a
#' phylogenetic tree.
#'
#' Column metadata includes the following fields:
#'\itemize{
#' \item{sample: } {Sample ID (character)}
#' \item{baboon_id: } {Baboon ID (factor)}
#' \item{collection_date: } {Sample collection date (date ; YYYY-MM-DD)}
#' \item{sex: } {Sex (factor; F/M)}
#' \item{age: } {Age (numeric)}
#' \item{social_group: } {Social group ID (factor)}
#' \item{group_size: } {Social group size (integer)}
#' \item{rain_month_mm: } {Rain per month(mm) (numeric)}
#' \item{season: } {Season (factor; dry/wet)}
#' \item{hydro_year: } {Hydro year (integer)}
#' \item{month: } {Month (integer)}
#' \item{readcount: } {Read count (numeric)}
#' \item{plate: } {Plate (factor)}
#' \item{post_pcr_dna_ng: } {Post PCR DNA(ng) (numeric)}
#' \item{diet_PC1: } {Diet Principal coordinate 1 (numeric)}
#' \item{diet_PC2: } {Diet Principal coordinate 2 (numeric)}
#' \item{diet_PC3: } {Diet Principal coordinate 3 (numeric)}
#' \item{diet_PC4: } {Diet Principal coordinate 4 (numeric)}
#' \item{diet_PC5: } {Diet Principal coordinate 5 (numeric)}
#' \item{diet_PC6: } {Diet Principal coordinate 6 (numeric)}
#' \item{diet_PC7: } {Diet Principal coordinate 7 (numeric)}
#' \item{diet_PC8: } {Diet Principal coordinate 8 (numeric)}
#' \item{diet_PC9: } {Diet Principal coordinate 9 (numeric)}
#' \item{diet_PC10: } {Diet Principal coordinate 10 (numeric)}
#' \item{diet_PC11: } {Diet Principal coordinate 11 (numeric)}
#' \item{diet_PC12: } {Diet Principal coordinate 12 (numeric)}
#' \item{diet_PC13: } {Diet Principal coordinate 13 (numeric)}
#' \item{diet_shannon_h: } {Dietary Shannon's H index (numeric)}
#' \item{asv_richness: } {Amplicon sequence variant (ASV) richness (integer)}
#' \item{asv_shannon_h: } {ASV Shannon's H index (numeric)}
#' \item{pc1_bc: } {Principal coordinate 1 Bray-Curtis dissimilarity (numeric)}
#' \item{pc2_bc: } {Principal coordinate 2 Bray-Curtis dissimilarity (numeric)}
#' \item{pc3_bc: } {Principal coordinate 3 Bray-Curtis dissimilarity (numeric)}
#' \item{pc4_bc: } {Principal coordinate 4 Bray-Curtis dissimilarity (numeric)}
#' \item{pc5_bc: } {Principal coordinate 5 Bray-Curtis dissimilarity (numeric)}
#'}
#'
#' Row metadata of the microbiome data contains taxonomic information on the
#' Domain, Phylum, Class, Order, Family, Genus, and ASV levels.
#'
#' The row tree consists of a phylogenetic tree build using sequence
#' information of 613 taxa.
#'
#' As reference sequences the ASV are provided.
#'
#' @return A \linkS4class{TreeSummarizedExperiment} object.
#'
#' @author Yagmur Simsek and Leo Lahti
#'
#' @references
#' Grieneisen et al. (2021):
#' Gut microbiome heritability is nearly universal but
#' environmentally contingent
#' \emph{Science}
#' 373:6551 \url{https://science.sciencemag.org/content/373/6551/181.full}
#'
#' @name GrieneisenTSData
#' @aliases baboongut
#' @export
#'
#' @examples
#' tse <- GrieneisenTSData()
#'
GrieneisenTSData <- function() {
dataset <- "3.14/grieneisen-ts"
tse <- .create_tse(dataset,
assays = "counts",
has.rowdata = TRUE,
has.coldata = TRUE,
has.rowtree = TRUE,
has.refseq = TRUE,
prefix = NULL)
tse
}

#' @rdname GrieneisenTSData
#' @export
baboongut <- GrieneisenTSData
#' Retrieve GrieneisenTS data
#'
#' Obtain longitudinal gut microbiome data in wild baboons from
#' Grieneisen et al. (2021).
#'
#' @details
#' The GrieneisenTS dataset contains 16,234 16S rRNA gene
#' sequencing-based microbiome profiles from 585 baboon samples
#' collected over 14 years to determine the heritability of the
#' gut microbiome on various environmental factors such as
#' diet, age, season. Each baboon had an average of 28 samples
#' collected over 4.5 years. The data set can be used to
#' investigate significance of longitudinal sampling at large
#' sample sizes.
#'
#' This data set contains the 613 most prevalent taxa with a
#' phylogenetic tree.
#'
#' Column metadata includes the following fields:
#'\describe{
#' \item{sample}{Sample ID (character)}
#' \item{baboon_id}{Baboon ID (factor)}
#' \item{collection_date}{Sample collection date (date; YYYY-MM-DD)}
#' \item{sex}{Sex (factor; F/M)}
#' \item{age}{Age (numeric)}
#' \item{social_group}{Social group ID (factor)}
#' \item{group_size}{Social group size (integer)}
#' \item{rain_month_mm}{Rain per month(mm) (numeric)}
#' \item{season}{Season (factor; dry/wet)}
#' \item{hydro_year}{Hydro year (integer)}
#' \item{month}{Month (integer)}
#' \item{readcount}{Read count (numeric)}
#' \item{plate}{Plate (factor)}
#' \item{post_pcr_dna_ng}{Post PCR DNA(ng) (numeric)}
#' \item{diet_PC1}{Diet Principal coordinate 1 (numeric)}
#' \item{diet_PC2}{Diet Principal coordinate 2 (numeric)}
#' \item{diet_PC3}{Diet Principal coordinate 3 (numeric)}
#' \item{diet_PC4}{Diet Principal coordinate 4 (numeric)}
#' \item{diet_PC5}{Diet Principal coordinate 5 (numeric)}
#' \item{diet_PC6}{Diet Principal coordinate 6 (numeric)}
#' \item{diet_PC7}{Diet Principal coordinate 7 (numeric)}
#' \item{diet_PC8}{Diet Principal coordinate 8 (numeric)}
#' \item{diet_PC9}{Diet Principal coordinate 9 (numeric)}
#' \item{diet_PC10}{Diet Principal coordinate 10 (numeric)}
#' \item{diet_PC11}{Diet Principal coordinate 11 (numeric)}
#' \item{diet_PC12}{Diet Principal coordinate 12 (numeric)}
#' \item{diet_PC13}{Diet Principal coordinate 13 (numeric)}
#' \item{diet_shannon_h}{Dietary Shannon's H index (numeric)}
#' \item{asv_richness}{Amplicon sequence variant (ASV) richness (integer)}
#' \item{asv_shannon_h}{ASV Shannon's H index (numeric)}
#' \item{pc1_bc}{Principal coordinate 1 Bray-Curtis dissimilarity (numeric)}
#' \item{pc2_bc}{Principal coordinate 2 Bray-Curtis dissimilarity (numeric)}
#' \item{pc3_bc}{Principal coordinate 3 Bray-Curtis dissimilarity (numeric)}
#' \item{pc4_bc}{Principal coordinate 4 Bray-Curtis dissimilarity (numeric)}
#' \item{pc5_bc}{Principal coordinate 5 Bray-Curtis dissimilarity (numeric)}
#'}
#'
#' Row metadata of the microbiome data contains taxonomic information on the
#' Domain, Phylum, Class, Order, Family, Genus, and ASV levels.
#'
#' The row tree consists of a phylogenetic tree build using sequence
#' information of 613 taxa.
#'
#' As reference sequences the ASV are provided.
#'
#' @return A \linkS4class{TreeSummarizedExperiment} object.
#'
#' @author Yagmur Simsek and Leo Lahti
#'
#' @references
#' Grieneisen et al. (2021):
#' Gut microbiome heritability is nearly universal but
#' environmentally contingent
#' \emph{Science}
#' 373:6551 \url{https://science.sciencemag.org/content/373/6551/181.full}
#'
#' @name GrieneisenTSData
#' @aliases baboongut
#' @export
#'
#' @examples
#' tse <- GrieneisenTSData()
#'
GrieneisenTSData <- function() {
dataset <- "3.14/grieneisen-ts"
tse <- .create_tse(dataset,
assays = "counts",
has.rowdata = TRUE,
has.coldata = TRUE,
has.rowtree = TRUE,
has.refseq = TRUE,
prefix = NULL)
tse
}

#' @rdname GrieneisenTSData
#' @export
baboongut <- GrieneisenTSData
33 changes: 32 additions & 1 deletion R/microbiomeDataSets.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,40 @@
#' Bioconductor project. It is loaded as \code{TreeSummarizedExperiment}
#' object or a \code{MultiAssayExperiment} objects.
#'
#' @section Deprecated functions:
#' The following functions are deprecated and will be removed in a future
#' release:
#' \itemize{
#' \item \code{LahtiWAdata}: Please use the \code{data()} function from the
#' \code{mia} package to load this dataset.
#' \item \code{HintikkaXOData}: Please use the \code{data()} function from
#' the \code{miaViz} package to load this dataset.
#' }
#'
#' @name microbiomeDataSets-package
NULL

#' @importFrom BiocGenerics updateObject
#' @importFrom methods as
NULL
NULL

# Wrapper for LahtiWAdata
LahtiWAdata <- function() {
.Deprecated("This function is deprecated and will be removed in a future
release. Please load the dataset directly using the `data()`
function from the mia/miaViz/mitTime packages.")
data_env <- new.env()
data("LahtiWAdata", package = "mia", envir = data_env)
return(data_env$LahtiWAdata)
}

# Wrapper for HintikkaXOData
HintikkaXOData <- function() {
.Deprecated("This function is deprecated and will be removed in a future
release. Please load the dataset directly using the `data()`
function from the mia/miaViz/mitTime packages.")
data_env <- new.env()
data("HintikkaXOData", package = "miaViz", envir = data_env)
return(data_env$HintikkaXOData)
}

5 changes: 3 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
#'
#' @return
#' A \code{data.frame} containing the following columns:
#' \itemize{
#' \item{Dataset:} {the name of the function to load a dataset}
#' \describe{
#' \item{Dataset}{The name of the function to load a dataset}
#' }
#'
#' @export
#'
#' @importFrom utils read.csv
#' @importFrom utils data
#'
#' @examples
#' availableDataSets()
Expand Down
12 changes: 12 additions & 0 deletions inst/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DS_Store
inst/extras/
.Rproj.user
.Rhistory
.RData
.Ruserdata
inst/doc
inst/scripts/*-original
inst/scripts/microbiomeDataSets
inst/scripts/*.gz
*~

72 changes: 36 additions & 36 deletions man/GrieneisenTSData.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/availableDataSets.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions man/microbiomeDataSets-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 107be70

Please sign in to comment.