API

MicrobiomeAnalysis.jl offers the following features

  • functions and workflows for the analysis of microbiome data
  • real time-series simulation
  • ready-to-use example datasets
  • easy conversion from and to EcoJulia objects

α diversity

Microbiome.shannonFunction
shannon(se::SummarizedExperiment, assay_name::String)

Evaluates the shannon diversity index for each sample and returns it as a vector.

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
source
Microbiome.shannon!Function
shannon!(se::SummarizedExperiment, assay_name::String)

Evaluates the shannon diversity index for each sample and stores it into coldata(se).

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
source
Microbiome.ginisimpsonFunction
ginisimpson(se::SummarizedExperiment, assay_name::String)

Evaluates the ginisimpson diversity index for each sample and returns it as a vector.

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
source
Microbiome.ginisimpson!Function
ginisimpson!(se::SummarizedExperiment, assay_name::String)

Evaluates the ginisimpson diversity index for each sample and stores it into coldata(se).

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
source

β diversity

Microbiome.braycurtisFunction
braycurtis(se::SummarizedExperiment, assay_name::String)

Evaluates the braycurtis dissimilarity index for each sample and rturns it as a matrix.

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
source
Microbiome.jaccardFunction
jaccard(se::SummarizedExperiment, assay_name::String)

Evaluates the jaccard dissimilarity index for each sample and rturns it as a matrix.

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
source
Microbiome.hellingerFunction
hellinger(se::SummarizedExperiment, assay_name::String)

Evaluates the hellinger dissimilarity index for each sample and rturns it as a matrix.

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
source
Microbiome.pcoaFunction
pcoa(se::SummarizedExperiment, assay_name::String)

Runs a Multidimensional Scaling (MDS) for the selected assay of se and returns a model that can be executed with predict(model).

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
source

Modelling and Simulations

MicrobiomeAnalysis.LVmodelFunction
LVmodel(N::Int64 = 20, tSpan::Vector{<:Real} = [0, 50]; β = 1, h = 0.1, random = false)

Generates a Lotka-Volterra model for N species over the given time span. The output is a time series of abundance values that can be stored as two separate objects: t, Xapp = LVmodel()

Arguments

  • N::Int64: the size of the model community, that is, the number of species in the system.
  • tSpan::Vector{<:Real}: the time span along which computation is performed.
  • β::Real: the order of derivation for all the differential equations of the LV model.
  • h::Real: the step size for correction.
  • random::Bool: whether the function should return a randomised (true) or constant (false) model.
source

Assay Transformation

Missing docstring.

Missing docstring for transform. Check Documenter's build log for details.

DataFrames.transform!Function
transform(se::SummarizedExperiment, assay_name::String, method::Function, kwargs...; output_name::String = "transformed_" * assay_name)

Applies a transformation to a given assay and stores it into se as a new assay.

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
  • method::Function: the transformation to apply. It can entail the following values: log10, pa, ztransform, clr.
  • kwargs...: additional parameters specific to some methods.
  • output_name::String: custom name for the newly created assay.
source

Sorting and Filtering

MicrobiomeAnalysis.select_top_taxaFunction
select_top_taxa(se::SummarizedExperiment, assay_name::String; top_n::Int64 = 10, sel_method::Function = mean)

Sorts rows / features by one specific assay and returns the top elements.

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the evaluation on.
  • top_n::Int64: the number of top elements that are returned.
  • sel_method::Function: statistical measure to perform sorting (mean by default).
source
select_top_taxa(se::SummarizedExperiment, assay_names::Vector{String}; top_n::Int64 = 10, sel_method::Function = mean)

Sorts rows / features by multiple assays and returns the top elements.

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_names::Vector{String}: a vector of multiple assay names to base the evaluation on.
  • top_n::Int64: the number of top elements that are returned.
  • sel_method::Function: statistical measure to perform sorting (mean by default).
source
DataFrames.dropmissingFunction
dropmissing(se::SummarizedExperiment, assay_name::String)

Drop rows / features with missing elements for a specific assay.

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay whose missing values should be dropped.
source

Visualisation

MicrobiomeAnalysis.abundance_plotFunction
abundance_plot(se::SummarizedExperiment, assay_name::String)

Plots a time series of the abundance for each feature (row) of an assay in a SummarizedExperiment object. The corresponding should include a column named 'time' containing an array of sampling times

Arguments

  • se::SummarizedExperiment: the experiment object of interest.
  • assay_name::String: the name of the assay to base the visualisation on.
source

Importing Datasets

MicrobiomeAnalysis.HintikkaXODataFunction
HintikkaXOData()

Retrieves the HintikkaXO MultiAssayExperiment, consisting of the microbiota, metabolite and biomarker SummarizedExperiment data, by Hintikka et al. (2021), https://doi.org/10.3390/ijerph18084049.

source
MicrobiomeAnalysis.OKeefeDSDataFunction
OKeefeDSData()

Retrieves the OKeefeDS SummarizedExperiment, consisting of the microbiota, contains microbiome data from a study with African and African American groups undergoing a two-week diet swap, by O'Keefe et al. (2015), https://dx.doi.org/10.1038/ncomms7342.

source
MicrobiomeAnalysis.import_se_from_csvFunction
import_se_from_csv(assays_file::AbstractString, rowdata_file::AbstractString, coldata_file::AbstractString)

Imports a SummarizedExperiment object from its components stored as csv files.

Arguments

  • assays_file::AbstractString: the path to a csv file containing the assays. It is produced in R with write.csv(assays(se), "assays_file.csv").
  • rowdata_file::AbstractString: the path to a csv file containing the rowdata. It is produced in R with write.csv(rowData(se), "rowdata_file.csv").
  • coldata_file::AbstractString: the path to a csv file containing the coldata. It is produced in R with write.csv(colData(se), "coldata_file.csv").
source
import_se_from_csv(assays_file::AbstractString)

Imports a SummarizedExperiment object from a csv file containing the assays. Rowdata and coldata are generated based on the information stored in the row and column names of assays_file. This is the method of choice if the rowdata and coldata of the original SummarizedExperiment object does not provide valuable information either because they are empty or because they are part of a MultiAssayExperiment object.

Arguments

  • assays_file::AbstractString: the path to a csv file containing the assays. It is produced in R with write.csv(assays(se), "assays_file.csv").
source
MicrobiomeAnalysis.import_mae_from_csvFunction
import_mae_from_csv(experiment_files::Vector{<:AbstractString}, sample_data_file::AbstractString, sample_map_file::AbstractString; experiment_names::Vector{<:AbstractString} = experiment_files)

Imports a MultiAssayExperiment object from its components stored as csv files.

Arguments

  • experiment_files::Vector{<:AbstractString}: a list of paths to the csv files containing the assays of different experiments. For example, if a MultiAssayExperiment object has 3 experiments, experiment_files is defined as: [assays_file1, assays_file2, assays_file3] Each assays_file is produced in R with write.csv(assays(se), "assays_file.csv"). It is produced in R with write.csv(assays(se), "assays_file.csv").
  • sample_data_file::AbstractString: the path to a csv file containing the sample data. It is produced in R with write.csv(colData(mae), "sample_data_file.csv").
  • sample_map_file::AbstractString: the path to a csv file containing the sample map. It is produced in R with write.csv(colData(mae), "sample_map_file.csv", row.names = FALSE).
  • experiment_names::Vector{<:AbstractString}: a vector of names to assign to the experiments listed in experiment_files. By default, the experiments are named with the filepaths specified in experiment_files.
source
Microbiome.CommunityProfileType
CommunityProfile(se::SummarizedExperiment)

Converts a SummarizedExperiment object to a CommunityProfile.

Arguments

  • se::SummarizedExperiment: the SummarizedExperiment object to be converted.
source