Skip to content

Commit

Permalink
Merge pull request #20 from JuliaTurkuDataScience/rename
Browse files Browse the repository at this point in the history
Replace MiaTools with MicrobiomeAnalysis globally
  • Loading branch information
RiboRings authored Mar 20, 2022
2 parents e908ace + c5acc48 commit f4a33da
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "MiaTools"
name = "MicrobiomeAnalysis"
uuid = "09137a06-29c6-4e66-9476-ab7e4b8c7492"
authors = ["Giulio Benedetti <giuliobene2000@gmail.com> and contributors"]
version = "0.1.0"
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# MiaTools.jl
# MicrobiomeAnalysis.jl

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaturkudatascience.github.io/MiaTools.jl/stable/readme/)
[![CI](https://github.com/JuliaTurkuDataScience/MiaTools.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaTurkuDataScience/MiaTools.jl/actions/workflows/CI.yml)
[![codecov](https://codecov.io/gh/JuliaTurkuDataScience/MiaTools.jl/branch/main/graph/badge.svg?token=VHEH1ZQLPA)](https://codecov.io/gh/JuliaTurkuDataScience/MiaTools.jl)
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaturkudatascience.github.io/MicrobiomeAnalysis.jl/stable/readme/)
[![CI](https://github.com/JuliaTurkuDataScience/MicrobiomeAnalysis.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaTurkuDataScience/MicrobiomeAnalysis.jl/actions/workflows/CI.yml)
[![codecov](https://codecov.io/gh/JuliaTurkuDataScience/MicrobiomeAnalysis.jl/branch/main/graph/badge.svg?token=VHEH1ZQLPA)](https://codecov.io/gh/JuliaTurkuDataScience/MicrobiomeAnalysis.jl)

This package aims to integrate the R-based [SummarizedExperiment](https://github.com/LTLA/SummarizedExperiments.jl) objects with common methods for microbiome analysis, and intends to reflect the [mia project](https://github.com/microbiome/mia/) in the Julia ecosystem.

Expand All @@ -13,15 +13,15 @@ Microbial community dynamics and time series are simulated through [FdeSolver.jl
To avail of its functionality, clone this repository on your local machine with:

```bash
git clone https://github.com/JuliaTurkuDataScience/MiaTools.jl.git
cd MiaTools.jl
git clone https://github.com/JuliaTurkuDataScience/MicrobiomeAnalysis.jl.git
cd MicrobiomeAnalysis.jl
```

and run the following in Julia:

```julia
]activate .
[esc]using MiaTools
[esc]using MicrobiomeAnalysis
```

Now you should be able to access and use all exported functions, for instance:
Expand All @@ -33,4 +33,4 @@ shannon

## Documentation

Available functions are described in the [Manual page](https://juliaturkudatascience.github.io/MiaTools.jl/stable/) and used for a basic microbiome workflow in the [Examples page](https://juliaturkudatascience.github.io/MiaTools.jl/stable/examples/).
Available functions are described in the [Manual page](https://juliaturkudatascience.github.io/MicrobiomeAnalysis.jl/stable/) and used for a basic microbiome workflow in the [Examples page](https://juliaturkudatascience.github.io/MicrobiomeAnalysis.jl/stable/examples/).
10 changes: 5 additions & 5 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
push!(LOAD_PATH,"../src/")
using MiaTools, Documenter
using MicrobiomeAnalysis, Documenter
ENV["GKSwstype"] = "100"

generated_path = joinpath(@__DIR__, "src")
base_url = "https://github.com/JuliaTurkuDataScience/MiaTools.jl/blob/main/"
base_url = "https://github.com/JuliaTurkuDataScience/MicrobiomeAnalysis.jl/blob/main/"
isdir(generated_path) || mkdir(generated_path)

open(joinpath(generated_path, "readme.md"), "w") do io
Expand All @@ -24,12 +24,12 @@ end

makedocs(format = Documenter.HTML(),
authors = "Giulio Benedetti, Leo Lahti",
sitename = "MiaTools.jl",
modules = [MiaTools],
sitename = "MicrobiomeAnalysis.jl",
modules = [MicrobiomeAnalysis],
pages=[
"Home" => "readme.md",
"Manual" => "index.md",
"Examples" => "examples.md"
])

deploydocs(repo="github.com/JuliaTurkuDataScience/MiaTools.jl", push_preview=true)
deploydocs(repo="github.com/JuliaTurkuDataScience/MicrobiomeAnalysis.jl", push_preview=true)
4 changes: 2 additions & 2 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Dependencies

MiaTools.jl enables the analysis of microbial but also more generic data cantained by SummarizedExperiment objects, therefore its usage is closely related and applicable to the utilities from a few other packages:
MicrobiomeAnalysis.jl enables the analysis of microbial but also more generic data cantained by SummarizedExperiment objects, therefore its usage is closely related and applicable to the utilities from a few other packages:

- SummarizedExperiments.jl
- Microbiome.jl
Expand All @@ -12,7 +12,7 @@ MiaTools.jl enables the analysis of microbial but also more generic data cantain
- DataStructures.jl

```@setup mia
using MiaTools, SummarizedExperiments
using MicrobiomeAnalysis, SummarizedExperiments
using DataFrames, DataStructures
using Plots, MultivariateStats
```
Expand Down
2 changes: 1 addition & 1 deletion examples/MAEexample.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MiaTools
using MicrobiomeAnalysis
using MultiAssayExperiments, SummarizedExperiments
using DataFrames, DataStructures
using Plots, MultivariateStats
Expand Down
2 changes: 1 addition & 1 deletion examples/SEexample.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##### DEPENDENCIES #####

using MiaTools
using MicrobiomeAnalysis
using SummarizedExperiments
using DataFrames, DataStructures
using Plots, MultivariateStats
Expand Down
2 changes: 1 addition & 1 deletion src/MiaTools.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module MiaTools
module MicrobiomeAnalysis

import SummarizedExperiments: SummarizedExperiment, assay, rowdata, coldata
import Distances: pairwise, BrayCurtis, HellingerDist, Jaccard
Expand Down
4 changes: 2 additions & 2 deletions src/alpha.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Evaluates the shannon diversity index for each sample and returns it as a vector
- `se::SummarizedExperiment`: the experiment object of interest.
- `assay_name::String`: the name of the assay to base the evaluation on.
"""
function MiaTools.shannon(se::SummarizedExperiment, assay_name::String)
function MicrobiomeAnalysis.shannon(se::SummarizedExperiment, assay_name::String)

# create empty vector with length = n° samples
shannon_vector = zeros(size(assay(se, assay_name))[2])
Expand Down Expand Up @@ -57,7 +57,7 @@ Evaluates the ginisimpson diversity index for each sample and returns it as a ve
- `se::SummarizedExperiment`: the experiment object of interest.
- `assay_name::String`: the name of the assay to base the evaluation on.
"""
function MiaTools.ginisimpson(se::SummarizedExperiment, assay_name::String)
function MicrobiomeAnalysis.ginisimpson(se::SummarizedExperiment, assay_name::String)

ginisimpson_vector = zeros(size(assay(se, assay_name))[2])

Expand Down
12 changes: 6 additions & 6 deletions test/test_alpha.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using MiaTools
using MicrobiomeAnalysis
using SummarizedExperiments, Microbiome
using Test

@testset "MiaTools.jl" begin
@testset "MicrobiomeAnalysis.jl" begin

se = exampleobject(40, 20)

shannon_output = MiaTools.shannon(se, "foo")
MiaTools.shannon!(se, "foo")
shannon_output = MicrobiomeAnalysis.shannon(se, "foo")
MicrobiomeAnalysis.shannon!(se, "foo")
@test shannon_output == coldata(se).shannon

ginisimpson_output = MiaTools.ginisimpson(se, "bar")
MiaTools.ginisimpson!(se, "bar")
ginisimpson_output = MicrobiomeAnalysis.ginisimpson(se, "bar")
MicrobiomeAnalysis.ginisimpson!(se, "bar")
@test ginisimpson_output == coldata(se).ginisimpson

@test Microbiome.shannon(assay(se, "foo")[:, 1]) == coldata(se).shannon[1]
Expand Down
12 changes: 6 additions & 6 deletions test/test_beta.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using MiaTools
using MicrobiomeAnalysis
using SummarizedExperiments, Microbiome
using Test

@testset "MiaTools.jl" begin
@testset "MicrobiomeAnalysis.jl" begin

se = exampleobject(40, 20)

Expand All @@ -12,23 +12,23 @@ using Test
comm = CommunityProfile(mat, taxa, samps)

microjack = Microbiome.jaccard(comm)
miajack = MiaTools.jaccard(se, "bar")
miajack = MicrobiomeAnalysis.jaccard(se, "bar")

@test microjack == miajack

microbray = Microbiome.braycurtis(comm)
miabray = MiaTools.braycurtis(se, "bar")
miabray = MicrobiomeAnalysis.braycurtis(se, "bar")

@test microbray == miabray

microhell = Microbiome.hellinger(comm)
miahell = MiaTools.hellinger(se, "bar")
miahell = MicrobiomeAnalysis.hellinger(se, "bar")

@test microhell == miahell

end

# MiaTools.jl: Error During Test at /Users/giuliobene3000/Desktop/Projects/JuliaProjects/MiaTools.jl/test/test_beta.jl:5
# MicrobiomeAnalysis.jl: Error During Test at /Users/giuliobene3000/Desktop/Projects/JuliaProjects/MicrobiomeAnalysis.jl/test/test_beta.jl:5
# Got exception outside of a @test
# MethodError: no method matching pairwise(::Distances.BrayCurtis, ::Array{Float32, 3}, ::Array{Float32, 3}; dims=2)
# Closest candidates are:
Expand Down
4 changes: 2 additions & 2 deletions test/test_lv.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using MiaTools
using MicrobiomeAnalysis
using SummarizedExperiments, FdeSolver
using Test

@testset "MiaTools.jl" begin
@testset "MicrobiomeAnalysis.jl" begin

t, Xapp = LVmodel()

Expand Down
4 changes: 2 additions & 2 deletions test/test_plot.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using MiaTools
using MicrobiomeAnalysis
using SummarizedExperiments
using Test

@testset "MiaTools.jl" begin
@testset "MicrobiomeAnalysis.jl" begin

se = exampleobject(40, 20)

Expand Down

0 comments on commit f4a33da

Please sign in to comment.