Skip to content

Commit 193e6aa

Browse files
Merge pull request #107 from adrientaudiere/dev
v 0.11
2 parents 10ec9d0 + d92aeb1 commit 193e6aa

File tree

253 files changed

+14921
-1056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+14921
-1056
lines changed

DESCRIPTION

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: MiscMetabar
22
Type: Package
33
Title: Miscellaneous Functions for Metabarcoding Analysis
4-
Version: 0.10.4
4+
Version: 0.11.0
55
Authors@R: person("Adrien", "Taudière", email = "adrien.taudiere@zaclys.net",
66
role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0003-1088-1182"))
77
Description: Facilitate the description, transformation, exploration, and reproducibility of metabarcoding analyses. 'MiscMetabar' is mainly built on top of the 'phyloseq', 'dada2' and 'targets' R packages. It helps to build reproducible and robust bioinformatics pipelines in R. 'MiscMetabar' makes ecological analysis of alpha and beta-diversity easier, more reproducible and more powerful by integrating a large number of tools. Important features are described in Taudière A. (2023) <doi:10.21105/joss.06038>.
@@ -74,6 +74,8 @@ Suggests:
7474
tibble,
7575
tidyr,
7676
treemapify,
77+
umap,
78+
uwot,
7779
vegan,
7880
venneuler,
7981
vctrs,

MiscMetabar.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: 3859fc88-3ad3-46d5-8186-259f982e0e31
23

34
RestoreWorkspace: No
45
SaveWorkspace: No

NAMESPACE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export(all_object_size)
1919
export(ancombc_pq)
2020
export(are_modality_even_depth)
2121
export(as_binary_otu_table)
22+
export(assign_sintax)
23+
export(assign_vsearch_lca)
2224
export(asv2otu)
2325
export(biplot_physeq)
2426
export(biplot_pq)
@@ -39,6 +41,7 @@ export(dist_bycol)
3941
export(dist_pos_control)
4042
export(distri_1_taxa)
4143
export(fac2col)
44+
export(filt_taxa_pq)
4245
export(filter_asv_blast)
4346
export(filter_taxa_blast)
4447
export(filter_trim)
@@ -54,6 +57,7 @@ export(ggscatt_pq)
5457
export(ggvenn_pq)
5558
export(glmutli_pq)
5659
export(graph_test_pq)
60+
export(hill_curves_pq)
5761
export(hill_phyloseq)
5862
export(hill_pq)
5963
export(hill_test_rarperm_pq)
@@ -79,6 +83,7 @@ export(multipatt_pq)
7983
export(multiplot)
8084
export(multitax_bar_pq)
8185
export(mumu_pq)
86+
export(no_legend)
8287
export(normalize_prop_pq)
8388
export(otu_circle)
8489
export(perc)
@@ -88,6 +93,7 @@ export(physeq_or_string_to_dna)
8893
export(plot_LCBD_pq)
8994
export(plot_SCBD_pq)
9095
export(plot_ancombc_pq)
96+
export(plot_complexity_pq)
9197
export(plot_deseq2_phyloseq)
9298
export(plot_deseq2_pq)
9399
export(plot_edgeR_phyloseq)
@@ -136,6 +142,7 @@ export(track_wkflow_samples)
136142
export(transp)
137143
export(treemap_pq)
138144
export(tsne_pq)
145+
export(umap_pq)
139146
export(unique_or_na)
140147
export(upset_pq)
141148
export(upset_test_pq)

NEWS.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
# MiscMetabar 0.10.5 (in development)
1+
# MiscMetabar 0.11 (in development)
2+
3+
- Add function `filt_taxa_pq()` to filter taxa based on the number of sequences/occurences
4+
- Add functions `no_legend()` and `hill_curves_pq()` to plot hill diversity accumulation curves for phyloseq
5+
- Add function `umap_pq()` to compute Dimensionality Reduction with UMAP
6+
- Add function `plot_complexity_pq()` to plot kmer complexity of references sequences of a phyloseq object
7+
- Add param `type` to `ridge_pq()` to plot a cumulative version (type="ecdf") version of ridge
8+
- Introduce the idea of a pq-verse: some other packages will complete the MiscMetabar packages to make package maintenance easier. The [comparpq](https://github.com/adrientaudiere/comparpq) package will facilitate the comparison of phyloseq object with different taxonomy, different clustering method, different samples with same modality or different primers.
9+
- Add functions [assign_vsearch_lca()], [assign_sintax()] and internal function [write_temp_fasta()]
10+
- Add param `method` to `add_new_taxonomy_pq()` to allow the use of [dada2::assign_taxonomy()] (default, precedent only method available), [assign_sintax()] or [assign_vsearch_lca()]
11+
212

313
# MiscMetabar 0.10.4
414

R/MiscMetabar-package.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ if (getRversion() >= "2.15.1") {
2626
"chim_rm", "condition", "physeq", "seq_tab_Pairs", "nb_samp", "silent",
2727
"X1_lim1", "X1_lim2", "aicc", "variable", "pos_letters", "alluvium",
2828
"na_remove", "stratum", "to_lodes_form", "clean_fastq", "clean_sam",
29-
"samples_names_common", "seq_id"
29+
"samples_names_common", "seq_id", "alpha_hill", "Modality", "Type", "complexity",
30+
"value_bootstrap"
3031
))
3132
}
3233

R/alpha_div_test.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ hill_tuckey_pq <- function(
122122
#' @param sample.size (int) A single integer value equal to the number of
123123
#' reads being simulated, also known as the depth. See
124124
#' [phyloseq::rarefy_even_depth()].
125-
#' @param verbose (logical). If TRUE, print additional informations.
125+
#' @param verbose (logical). If TRUE, print additional information.
126126
#' @param progress_bar (logical, default TRUE) Do we print progress during
127127
#' the calculation?
128128
#' @param p_val_signif (float, `[0:1]`) The mimimum value of p-value to count a

R/beta_div_test.R

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ graph_test_pq <- function(physeq,
128128
#' @param verbose (logical, default TRUE) If TRUE, prompt some messages.
129129
#' @param ... Other arguments passed on to [vegan::adonis2()] function.
130130
#' Note that the parameter `by` is important. If by is set to NULL
131-
#' (default) the p-value is computed for the entire model.
132-
#' by = NULL will assess the overall significance of all terms together,
133-
#' by = "terms" will assess significance for each term (sequentially from first to last),
134-
#' setting by = "margin" will assess the marginal effects of the terms (each marginal term analysed in a model with all other variables),
131+
#' (default) the p-value is computed for the entire model.
132+
#' by = NULL will assess the overall significance of all terms together,
133+
#' by = "terms" will assess significance for each term (sequentially from first to last),
134+
#' setting by = "margin" will assess the marginal effects of the terms (each marginal term analysed in a model with all other variables),
135135
#' by = "onedf" will analyse one-degree-of-freedom contrasts sequentially. The argument is passed on to anova.cca.
136136
#' @return The function returns an anova.cca result object with a
137137
#' new column for partial R^2. See help of [vegan::adonis2()] for
@@ -143,7 +143,7 @@ graph_test_pq <- function(physeq,
143143
#' adonis_pq(enterotype, "SeqTech*Enterotype", na_remove = TRUE, by = "terms")
144144
#' adonis_pq(enterotype, "SeqTech*Enterotype", na_remove = TRUE, by = "onedf")
145145
#' adonis_pq(enterotype, "SeqTech*Enterotype", na_remove = TRUE, by = "margin")
146-
#'
146+
#'
147147
#' adonis_pq(enterotype, "SeqTech", dist_method = "jaccard", by = "terms")
148148
#' adonis_pq(enterotype, "SeqTech", dist_method = "robust.aitchison", by = "terms")
149149
#' }
@@ -1048,20 +1048,19 @@ plot_ancombc_pq <-
10481048
#'
10491049
#' @author Adrien Taudière
10501050
#' @examples
1051-
#' data_fungi_mini_woNA4height <- subset_samples(
1052-
#' data_fungi_mini,
1053-
#' !is.na(data_fungi_mini@sam_data$Height)
1054-
#' )
1055-
#' taxa_only_in_one_level(data_fungi_mini_woNA4height, "Height", "High")
1056-
#' #' # Taxa present only in low height samples
1057-
#' suppressMessages(suppressWarnings(
1058-
#' taxa_only_in_one_level(data_fungi, "Height", "Low")
1059-
#' ))
1060-
#' # Number of taxa present only in sample of time equal to 15
1061-
#' suppressMessages(suppressWarnings(
1062-
#' length(taxa_only_in_one_level(data_fungi, "Time", "15"))
1063-
#' ))
1064-
1051+
#' data_fungi_mini_woNA4height <- subset_samples(
1052+
#' data_fungi_mini,
1053+
#' !is.na(data_fungi_mini@sam_data$Height)
1054+
#' )
1055+
#' taxa_only_in_one_level(data_fungi_mini_woNA4height, "Height", "High")
1056+
#' #' # Taxa present only in low height samples
1057+
#' suppressMessages(suppressWarnings(
1058+
#' taxa_only_in_one_level(data_fungi, "Height", "Low")
1059+
#' ))
1060+
#' # Number of taxa present only in sample of time equal to 15
1061+
#' suppressMessages(suppressWarnings(
1062+
#' length(taxa_only_in_one_level(data_fungi, "Time", "15"))
1063+
#' ))
10651064
taxa_only_in_one_level <- function(physeq,
10661065
modality,
10671066
level,
@@ -1309,7 +1308,7 @@ var_par_pq <-
13091308
#' @param sample.size (int) A single integer value equal to the number of
13101309
#' reads being simulated, also known as the depth. See
13111310
#' [phyloseq::rarefy_even_depth()].
1312-
#' @param verbose (logical). If TRUE, print additional informations.
1311+
#' @param verbose (logical). If TRUE, print additional information.
13131312
#' @param progress_bar (logical, default TRUE) Do we print progress during
13141313
#' the calculation?
13151314
#'

R/controls.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
#' <img src="https://img.shields.io/badge/lifecycle-experimental-orange" alt="lifecycle-experimental"></a>
88
#'
99
#' Search for exact matching of sequences using complement,
10-
#' reverse and reverse-complement
10+
#' reverse and reverse-complement. It is useful to check for
11+
#' primers issues after cutadapt step.
1112
#'
1213
#' @inheritParams clean_pq
1314
#' @param seq2search A DNAStringSet object of sequences to search for.

0 commit comments

Comments
 (0)