Skip to content

Commit

Permalink
Merge pull request #107 from adrientaudiere/dev
Browse files Browse the repository at this point in the history
v 0.11
  • Loading branch information
adrientaudiere authored Dec 17, 2024
2 parents 10ec9d0 + d92aeb1 commit 193e6aa
Show file tree
Hide file tree
Showing 253 changed files with 14,921 additions and 1,056 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: MiscMetabar
Type: Package
Title: Miscellaneous Functions for Metabarcoding Analysis
Version: 0.10.4
Version: 0.11.0
Authors@R: person("Adrien", "Taudière", email = "[email protected]",
role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0003-1088-1182"))
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>.
Expand Down Expand Up @@ -74,6 +74,8 @@ Suggests:
tibble,
tidyr,
treemapify,
umap,
uwot,
vegan,
venneuler,
vctrs,
Expand Down
1 change: 1 addition & 0 deletions MiscMetabar.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 3859fc88-3ad3-46d5-8186-259f982e0e31

RestoreWorkspace: No
SaveWorkspace: No
Expand Down
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export(all_object_size)
export(ancombc_pq)
export(are_modality_even_depth)
export(as_binary_otu_table)
export(assign_sintax)
export(assign_vsearch_lca)
export(asv2otu)
export(biplot_physeq)
export(biplot_pq)
Expand All @@ -39,6 +41,7 @@ export(dist_bycol)
export(dist_pos_control)
export(distri_1_taxa)
export(fac2col)
export(filt_taxa_pq)
export(filter_asv_blast)
export(filter_taxa_blast)
export(filter_trim)
Expand All @@ -54,6 +57,7 @@ export(ggscatt_pq)
export(ggvenn_pq)
export(glmutli_pq)
export(graph_test_pq)
export(hill_curves_pq)
export(hill_phyloseq)
export(hill_pq)
export(hill_test_rarperm_pq)
Expand All @@ -79,6 +83,7 @@ export(multipatt_pq)
export(multiplot)
export(multitax_bar_pq)
export(mumu_pq)
export(no_legend)
export(normalize_prop_pq)
export(otu_circle)
export(perc)
Expand All @@ -88,6 +93,7 @@ export(physeq_or_string_to_dna)
export(plot_LCBD_pq)
export(plot_SCBD_pq)
export(plot_ancombc_pq)
export(plot_complexity_pq)
export(plot_deseq2_phyloseq)
export(plot_deseq2_pq)
export(plot_edgeR_phyloseq)
Expand Down Expand Up @@ -136,6 +142,7 @@ export(track_wkflow_samples)
export(transp)
export(treemap_pq)
export(tsne_pq)
export(umap_pq)
export(unique_or_na)
export(upset_pq)
export(upset_test_pq)
Expand Down
12 changes: 11 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# MiscMetabar 0.10.5 (in development)
# MiscMetabar 0.11 (in development)

- Add function `filt_taxa_pq()` to filter taxa based on the number of sequences/occurences
- Add functions `no_legend()` and `hill_curves_pq()` to plot hill diversity accumulation curves for phyloseq
- Add function `umap_pq()` to compute Dimensionality Reduction with UMAP
- Add function `plot_complexity_pq()` to plot kmer complexity of references sequences of a phyloseq object
- Add param `type` to `ridge_pq()` to plot a cumulative version (type="ecdf") version of ridge
- 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.
- Add functions [assign_vsearch_lca()], [assign_sintax()] and internal function [write_temp_fasta()]
- 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()]


# MiscMetabar 0.10.4

Expand Down
3 changes: 2 additions & 1 deletion R/MiscMetabar-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ if (getRversion() >= "2.15.1") {
"chim_rm", "condition", "physeq", "seq_tab_Pairs", "nb_samp", "silent",
"X1_lim1", "X1_lim2", "aicc", "variable", "pos_letters", "alluvium",
"na_remove", "stratum", "to_lodes_form", "clean_fastq", "clean_sam",
"samples_names_common", "seq_id"
"samples_names_common", "seq_id", "alpha_hill", "Modality", "Type", "complexity",
"value_bootstrap"
))
}

Expand Down
2 changes: 1 addition & 1 deletion R/alpha_div_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ hill_tuckey_pq <- function(
#' @param sample.size (int) A single integer value equal to the number of
#' reads being simulated, also known as the depth. See
#' [phyloseq::rarefy_even_depth()].
#' @param verbose (logical). If TRUE, print additional informations.
#' @param verbose (logical). If TRUE, print additional information.
#' @param progress_bar (logical, default TRUE) Do we print progress during
#' the calculation?
#' @param p_val_signif (float, `[0:1]`) The mimimum value of p-value to count a
Expand Down
39 changes: 19 additions & 20 deletions R/beta_div_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ graph_test_pq <- function(physeq,
#' @param verbose (logical, default TRUE) If TRUE, prompt some messages.
#' @param ... Other arguments passed on to [vegan::adonis2()] function.
#' Note that the parameter `by` is important. If by is set to NULL
#' (default) the p-value is computed for the entire model.
#' by = NULL will assess the overall significance of all terms together,
#' by = "terms" will assess significance for each term (sequentially from first to last),
#' setting by = "margin" will assess the marginal effects of the terms (each marginal term analysed in a model with all other variables),
#' (default) the p-value is computed for the entire model.
#' by = NULL will assess the overall significance of all terms together,
#' by = "terms" will assess significance for each term (sequentially from first to last),
#' setting by = "margin" will assess the marginal effects of the terms (each marginal term analysed in a model with all other variables),
#' by = "onedf" will analyse one-degree-of-freedom contrasts sequentially. The argument is passed on to anova.cca.
#' @return The function returns an anova.cca result object with a
#' new column for partial R^2. See help of [vegan::adonis2()] for
Expand All @@ -143,7 +143,7 @@ graph_test_pq <- function(physeq,
#' adonis_pq(enterotype, "SeqTech*Enterotype", na_remove = TRUE, by = "terms")
#' adonis_pq(enterotype, "SeqTech*Enterotype", na_remove = TRUE, by = "onedf")
#' adonis_pq(enterotype, "SeqTech*Enterotype", na_remove = TRUE, by = "margin")
#'
#'
#' adonis_pq(enterotype, "SeqTech", dist_method = "jaccard", by = "terms")
#' adonis_pq(enterotype, "SeqTech", dist_method = "robust.aitchison", by = "terms")
#' }
Expand Down Expand Up @@ -1048,20 +1048,19 @@ plot_ancombc_pq <-
#'
#' @author Adrien Taudière
#' @examples
#' data_fungi_mini_woNA4height <- subset_samples(
#' data_fungi_mini,
#' !is.na(data_fungi_mini@sam_data$Height)
#' )
#' taxa_only_in_one_level(data_fungi_mini_woNA4height, "Height", "High")
#' #' # Taxa present only in low height samples
#' suppressMessages(suppressWarnings(
#' taxa_only_in_one_level(data_fungi, "Height", "Low")
#' ))
#' # Number of taxa present only in sample of time equal to 15
#' suppressMessages(suppressWarnings(
#' length(taxa_only_in_one_level(data_fungi, "Time", "15"))
#' ))

#' data_fungi_mini_woNA4height <- subset_samples(
#' data_fungi_mini,
#' !is.na(data_fungi_mini@sam_data$Height)
#' )
#' taxa_only_in_one_level(data_fungi_mini_woNA4height, "Height", "High")
#' #' # Taxa present only in low height samples
#' suppressMessages(suppressWarnings(
#' taxa_only_in_one_level(data_fungi, "Height", "Low")
#' ))
#' # Number of taxa present only in sample of time equal to 15
#' suppressMessages(suppressWarnings(
#' length(taxa_only_in_one_level(data_fungi, "Time", "15"))
#' ))
taxa_only_in_one_level <- function(physeq,
modality,
level,
Expand Down Expand Up @@ -1309,7 +1308,7 @@ var_par_pq <-
#' @param sample.size (int) A single integer value equal to the number of
#' reads being simulated, also known as the depth. See
#' [phyloseq::rarefy_even_depth()].
#' @param verbose (logical). If TRUE, print additional informations.
#' @param verbose (logical). If TRUE, print additional information.
#' @param progress_bar (logical, default TRUE) Do we print progress during
#' the calculation?
#'
Expand Down
3 changes: 2 additions & 1 deletion R/controls.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#' <img src="https://img.shields.io/badge/lifecycle-experimental-orange" alt="lifecycle-experimental"></a>
#'
#' Search for exact matching of sequences using complement,
#' reverse and reverse-complement
#' reverse and reverse-complement. It is useful to check for
#' primers issues after cutadapt step.
#'
#' @inheritParams clean_pq
#' @param seq2search A DNAStringSet object of sequences to search for.
Expand Down
Loading

0 comments on commit 193e6aa

Please sign in to comment.