Skip to content

Commit

Permalink
Remove trailing whitespaces (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-sannikov authored Jul 29, 2024
1 parent d81f29d commit d85b187
Show file tree
Hide file tree
Showing 34 changed files with 902 additions and 882 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: OMA
Title: Orchestrating Microbiome Analysis with Bioconductor
Version: 0.98.25
Date: 2024-04-26
Authors@R:
Authors@R:
c(person("Leo", "Lahti", role = c("aut"),
comment = c(ORCID = "0000-0001-5537-637X")),
person(given = "Tuomas", family = "Borman", role = c("aut", "cre"),
Expand All @@ -11,11 +11,11 @@ Authors@R:
person("Felix GM", "Ernst", email = "[email protected]",
role = c("aut"),
comment = c(ORCID = "0000-0001-5064-0928")),
person("and others", "(see the full list of contributors)",
person("and others", "(see the full list of contributors)",
role = c("ctb"))
)
Description:
This is a reference cookbook for **Microbiome Data Science** with
This is a reference cookbook for **Microbiome Data Science** with
R and Bioconductor.
License: CC BY-NC-SA 4.0
Encoding: UTF-8
Expand Down Expand Up @@ -59,6 +59,7 @@ Suggests:
glmnet,
glue,
grid,
gtools,
gsEasy,
igraph,
kableExtra,
Expand Down
18 changes: 9 additions & 9 deletions inst/pages/acknowledgments.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ coordinated by:
and runs regular training workshops in microbiome data science.

- *Tuomas Borman*, PhD researcher and the lead developer of OMA/mia at
the Department of Computing, University of Turku.
the Department of Computing, University of Turku.

### Contributors {-}

Expand Down Expand Up @@ -70,7 +70,7 @@ and the OMA book

- *Matti Ruuskanen, PhD*, added machine learning techniques for
microbiome analysis

- *Stefanie Peschel* has contributed chapters on the construction, analysis,
and comparison of microbial association networks.

Expand All @@ -80,15 +80,15 @@ and a Professor for Biomedical Statistics and Data Science at
[LMU Munich](https://www.en.statistik.uni-muenchen.de/index.html). He assisted
in writing the chapters on network learning and comparison.

- *Shigdel Rajesh, PhD*
- *Shigdel Rajesh, PhD*

- *Artur Sannikov*
- *Artur Sannikov*

- *Akewak Jeba*
- *Akewak Jeba*

- *Himmi Lindgren*

- *Lu Yang*
- *Lu Yang*

- *Katariina Pärnänen*

Expand All @@ -114,8 +114,8 @@ in writing the chapters on network learning and comparison.

-*Matteo Calgaro*

- *Jacques Serizay* converted the _OMA_ book to the `BiocBook` format. This
allows the _OMA_ book to be built and distributed by Bioconductor.
- *Jacques Serizay* converted the _OMA_ book to the `BiocBook` format. This
allows the _OMA_ book to be built and distributed by Bioconductor.

- *Himel Mallick, PhD, FASA*, principal investigator and tenure-track faculty
at Cornell University’s Department of Population Health Sciences and an adjunct
Expand All @@ -124,7 +124,7 @@ Information Science. He contributed to the chapters on meta-analyses, microbe
set enrichment analysis (MSEA) and multi-omics prediction and classification.

- *Yihan Liu*, assisted Dr. Mallick in writing the chapters on meta-anlayses,
MSEA and multi-omics prediction and classification.
MSEA and multi-omics prediction and classification.

### Acknowledgments {-}

Expand Down
20 changes: 10 additions & 10 deletions inst/pages/agglomeration.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ with counts aggregated from the lower-level taxa associated with them.
## Agglomerate data to certain rank {#sec-data-agglomeration}

One of the main applications of taxonomic information in regards to count data
is to agglomerate count data on taxonomic levels and track the influence of
is to agglomerate count data on taxonomic levels and track the influence of
changing conditions through these levels. For this `mia` contains the
`agglomerateByRank` function. The ideal location to store the agglomerated data
is as an alternative experiment.
Expand All @@ -45,12 +45,12 @@ assayNames(altExp(tse, "Family"))
```{r}
assay(altExp(tse, "Family"), "relabundance")[1:5, 1:7]
```

```{r taxinfo_altexp_example}
assay(altExp(tse, "Family"), "counts")[1:5, 1:7]
```

`altExpNames` now consists of `Family` level data. This can be extended to use
`altExpNames` now consists of `Family` level data. This can be extended to use
any taxonomic level listed in `taxonomyRanks(tse)`.

We can also aggregate the data across all available ranks in one step using
Expand Down Expand Up @@ -102,18 +102,18 @@ dim(tse_sub)

## Agglomerate based on prevalence

Rare taxa can also be aggregated into a single group "Other" instead of
Rare taxa can also be aggregated into a single group "Other" instead of
filtering them out. A suitable function for this is `agglomerateByPrevalence`.
The number of rare taxa is higher on the species level, which causes the need
The number of rare taxa is higher on the species level, which causes the need
for data agglomeration by prevalence.

```{r}
altExp(tse, "Species_byPrevalence") <- agglomerateByPrevalence(
tse,
rank = "Species",
other.label = "Other",
prevalence = 5 / 100,
detection = 1 / 100,
tse,
rank = "Species",
other.label = "Other",
prevalence = 5 / 100,
detection = 1 / 100,
as.relative = TRUE)
altExp(tse, "Species_byPrevalence")
Expand Down
18 changes: 9 additions & 9 deletions inst/pages/alpha_diversity.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ indices of dominance or rarity:
a high share of the total species abundance in the community. Note
that dominance indices are generally inversely correlated with other
alpha diversity indices.

**Rarity** indices characterize the concentration of species at low
abundance. Prevalence and detection thresholds determine rare
species whose total concentration will determine the value of a
Expand Down Expand Up @@ -112,11 +112,11 @@ type and final barcode).
```{r plot-div-obs, message=FALSE, fig.cap="Shannon diversity estimates plotted grouped by sample type with colour-labeled barcode.", cache=TRUE}
library(scater)
plotColData(
tse,
"observed",
"SampleType",
tse,
"observed",
"SampleType",
colour_by = "Final_Barcode") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(expression(Richness[Observed]))
```

Expand Down Expand Up @@ -187,7 +187,7 @@ plots <- lapply(
# Fine-tune visual appearance
plots <- lapply(
plots, "+",
plots, "+",
theme(axis.text.x = element_blank(),
axis.title.x = element_blank(),
axis.ticks.x = element_blank()))
Expand All @@ -197,7 +197,7 @@ wrap_plots(plots, ncol = 1) +
plot_layout(guides = "collect")
```

## Visualizing significance in group-wise comparisons
## Visualizing significance in group-wise comparisons

Next, let's compare the Shannon index between sample groups and visualize the
statistical significance. Using the `stat_compare_means` function from the
Expand Down Expand Up @@ -233,8 +233,8 @@ pvals <- reshape(
pvals,
direction = "long",
varying = colnames(pvals)[ !colnames(pvals) %in% varname ],
times = colnames(pvals)[ !colnames(pvals) %in% varname ],
v.names = "p",
times = colnames(pvals)[ !colnames(pvals) %in% varname ],
v.names = "p",
timevar = "group2",
idvar = "group1"
) |>
Expand Down
Loading

0 comments on commit d85b187

Please sign in to comment.