You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,15 @@
3
3
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
4
4
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
6
-
## v1.5.2 - [2026-05-]
6
+
## v1.6.0 - [2026-05-19]
7
7
8
8
### `Added`
9
9
-[#34](https://github.com/agusinac/OmicFlow/issues/34) Extra argument `group_by` in `foldchange`.
10
10
11
11
### `Changed`
12
-
-[#33](https://github.com/agusinac/OmicFlow/issues/33) Combined two methods into a single `omics$scale()`, added euclidean method and aitchison
12
+
-[#33](https://github.com/agusinac/OmicFlow/issues/33) Combined two methods into a single `omics$scale()`, added euclidean method and aitchison. Improved all dissimilarity metrics (except for UniFrac) by 2x speed & 7x less memory, UniFrac is 4x faster.
13
13
-[#36](https://github.com/agusinac/OmicFlow/issues/36) Created `foldchange` method in `omics` abstract class and in `metagenomics` subclass
14
+
- Adapted & tested `autoFlow` with new changes
14
15
15
16
### `Fixed`
16
17
-[#35](https://github.com/agusinac/OmicFlow/issues/35) changed removezeros by using `@p` of `CsparseMatrix`
#' @description This is the abstract class 'omics', contains a variety of methods that are inherited and applied in the omics classes:
4
-
#' \link{metagenomics}, proteomics and metabolomics.
4
+
#' \link{metagenomics}and \link{proteomics}.
5
5
#'
6
6
#' @details
7
7
#' Every class is created with the \link[R6]{R6Class} method. Methods are either public or private, and only the public components are inherited by other omic classes.
@@ -608,9 +608,9 @@ omics <- R6::R6Class(
608
608
},
609
609
#' @description
610
610
#' Feature scaling on the `countData`. The `scale` function is able to apply transformations element-wise on the positive values, (optional: add pseudocounts) and perform normalisation or standardisation methods.
611
-
#' @param method A character to choose a standardisation/normalisation method, options: `tss`, `clr`, `binary`, `hellinger` (default: \code{"tss"}).
612
-
#' @param transform A function to apply on the positive values of `countData` (default: \code{NULL}).
613
-
#' @param base Input for \link[base]{log} to use natural logarithmic scale, log2, log10 or other (default: \code{exp(1)}).
611
+
#' @param method A character to choose a standardisation/normalisation method, options: `tss`, `clr`, `binary`, `hellinger`, `none` (default: \code{"tss"}).
612
+
#' @param transform A function to apply on the positive values of `countData`, skip standardisation/normalisation with \code{method = "none"} (default: \code{NULL}).
613
+
#' @param base Input for \link[base]{log} to use natural logarithmic scale, log2, log10 or other (default: \code{exp(1)}) in CLR.
614
614
#' @param pseudocount A numeric value to replace zero's (default: \code{NULL}).
if (!is.null(method) &&!is.character(method) && length(method) !=1) {
648
652
cli::cli_abort("{.val {method}} needs to contain characters with length of 1.")
649
653
} elseif (!method%in%OPTIONS) {
@@ -684,7 +688,8 @@ omics <- R6::R6Class(
684
688
ref<- tss(private$.countData)
685
689
ref@x<- sqrt(ref@x)
686
690
ref
687
-
}
691
+
},
692
+
"none"=private$.countData
688
693
)
689
694
690
695
invisible(self)
@@ -1318,7 +1323,7 @@ omics <- R6::R6Class(
1318
1323
#' @description
1319
1324
#' Differential feature expression (DFE) on log-transformed values for both paired and non-paired test.
1320
1325
#'
1321
-
#' The function performs feature agglomeration, subsetting to remove NAs in `condition.group` and finding samplepairs.
1326
+
#' The function performs feature agglomeration, subsetting to remove NAs in `condition.group` and finding samplepairs. It expects that the data is already log-transformed, this can be accomplished via [`scale()`](#method-scale)
1322
1327
#'
1323
1328
#' @param feature_rank A character or vector of characters in the `featureData` to aggregate via [`feature_merge()`](#method-feature_merge) (default: \code{"FEATURE_ID"}).
1324
1329
#' @param feature_filter A character or vector of characters to remove features via regex pattern (default: \code{NULL}).
@@ -1549,29 +1554,27 @@ omics <- R6::R6Class(
1549
1554
},
1550
1555
#' @description
1551
1556
#' Automated Omics Analysis based on the `metaData`, see [`validate()`](#method-validate).
1552
-
#' For now only works with headers that start with prefix `CONTRAST_`. If the data is from the class `omics` or `proteomics` than FDR adjusted p-values are computed for the volcano plots.
1557
+
#' For now only works with headers that start with prefix `CONTRAST_`. If the data is from the class `omics` or `proteomics` than FDR adjusted p-values are computed for the volcano plots. Log-transformed values will lead to the skipping of [`composition()`](#method-composition) and [`alpha_diversity()`](#method-alpha_diversity) methods.
1553
1558
#' @param feature_contrast A character vector of feature columns in the `featureData` to aggregate via [`feature_merge()`](#method-feature_merge) (default: \code{"FEATURE_ID"}).
1554
1559
#' @param feature_filter A character vector to filter unwanted features, (default: \code{NULL}).
1555
1560
#' @param feature_ranks A character vector as input to [`rankstat()`](#method-rankstat) (default: \code{NULL}).
1556
-
#' @param distance_metrics A character vector specifying what (dis)similarity metrics to use (default: \code{c("unifrac")}).
1557
-
#' @param beta_div_table A path to an existing file or a dense/sparse \link[Matrix]{Matrix} format (default: \code{NULL}).
1558
-
#' @param alpha_div_table A path to pre-computed alpha diversity table, with columns: `alpha_div` (containing diversity values) and the same CONTRAST columns from `metaData` (default: \code{NULL}).
1561
+
#' @param distance_metrics A character vector specifying what (dis)similarity metrics to use (default: \code{c("bray")}) When you are working with log-transformed data it is advised to use the `euclidean`.
1562
+
#' @param distmat A path to an existing file or a dense/sparse \link[Matrix]{Matrix} format (default: \code{NULL}).
1559
1563
#' @param weighted A boolean value, whether to compute weighted or unweighted dissimilarities (default: \code{TRUE}).
1560
1564
#' @param pvalue.threshold A numeric value, the p-value is used to include/exclude composition and foldchanges plots coming from alpha- and beta diversity analysis (default: 0.05).
1561
1565
#' @param logfold.threshold A numeric value used as a fold-change threshold to label and color significantly expressed features, see [`foldchange()`](#method-foldchange) (Default: 1).
1562
1566
#' @param abundance.threshold A numeric value used as an abundance threshold to size the scatter dots based on their mean abundance, see [`foldchange()`](#method-foldchange) (default: 0.01).
1563
1567
#' @param perm A wholenumber, number of permutations to compare against the null hypothesis of \link[vegan]{adonis2} or \link[vegan]{anosim} (default: 999).
1564
-
#' @param threads Number of threads to use, only used in [`distance()`](#method-distance) when beta_div_table is not supplied (default: 1).
1568
+
#' @param threads Number of threads to use, only used in [`distance()`](#method-distance) when distmat is not supplied (default: 1).
1565
1569
#' @param report A boolean value to create a HTML markdown report (default: \code{FALSE}). If \code{FALSE} a nested list of the plots and data is returned.
1566
1570
#' @param filename A character to name the HTML report to be saved in the current working directory (default: \code{paste0(getwd(), "/report.html")}). The \code{getwd()} is required for rmarkdown to save it in the right path.
1567
1571
#' @importFrom patchwork plot_layout wrap_plots
1568
1572
#' @return List of plots/data or rendered HTML report
1569
1573
autoFlow=function(feature_contrast="FEATURE_ID",
1570
1574
feature_filter=NULL,
1571
1575
feature_ranks=NULL,
1572
-
distance_metrics= c("unifrac"),
1573
-
beta_div_table=NULL,
1574
-
alpha_div_table=NULL,
1576
+
distance_metrics= c("bray"),
1577
+
distmat=NULL,
1575
1578
weighted=TRUE,
1576
1579
pvalue.threshold=0.05,
1577
1580
logfold.threshold=1,
@@ -1593,27 +1596,24 @@ omics <- R6::R6Class(
1593
1596
cli::cli_abort("{.val {feature_contrast}} does not exist in {.field featureData}!")
1594
1597
}
1595
1598
1596
-
if (!is.null(beta_div_table) &&!is.character(beta_div_table) && length(beta_div_table) !=1) {
1597
-
cli::cli_abort("{.arg beta_div_table} needs to be a character with a length of 1")
1599
+
if (!is.null(distmat) &&!is.character(distmat) && length(distmat) !=1) {
1600
+
cli::cli_abort("{.arg distmat} needs to be a character with a length of 1")
1598
1601
1599
-
if (!file.exists(beta_div_table))
1600
-
cli::cli_abort("{.arg beta_div_table} does not exists!")
1601
-
}
1602
-
1603
-
if (!is.null(alpha_div_table) &&!is.character(alpha_div_table) && length(alpha_div_table) !=1) {
1604
-
cli::cli_abort("{.arg alpha_div_table} needs to be a character with a length of 1")
1605
-
1606
-
if (!file.exists(alpha_div_table))
1607
-
cli::cli_abort("{.arg alpha_div_table} does not exists!")
0 commit comments