From 0f08d78757afb44e7d4836ffcf55e303314bc814 Mon Sep 17 00:00:00 2001 From: adrien Date: Mon, 9 Sep 2024 09:46:43 +0200 Subject: [PATCH 1/4] docs: Fix bugs for devel cran test --- R/blast.R | 2 +- R/dada_phyloseq.R | 2 +- R/funguild.R | 2 +- cran-comments.md | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/R/blast.R b/R/blast.R index b585c54b..57adcc3d 100644 --- a/R/blast.R +++ b/R/blast.R @@ -437,7 +437,7 @@ filter_taxa_blast <- filter_asv_blast ################################################################################ -#' Blast some sequence against sequences from of a \code{\link{derep-class}} +#' Blast some sequence against sequences from of a \code{\link[dada2]{derep-class}} #' object. #' #' @description diff --git a/R/dada_phyloseq.R b/R/dada_phyloseq.R index 46d187e8..69f193d7 100644 --- a/R/dada_phyloseq.R +++ b/R/dada_phyloseq.R @@ -1786,7 +1786,7 @@ tbl_sum_samdata <- function(physeq, remove_col_unique_value = TRUE, ...) { #' @details #' This function is mainly a wrapper of the work of others. #' Please make a reference to `FUNGuildR` package and the associate -#' [publication](https://www.sciencedirect.com/science/article/abs/pii/S1754504815000847) if you +#' publication (\doi{10.1016/j.funeco.2015.06.006}) if you #' use this function. #' @seealso [plot_guild_pq()] diff --git a/R/funguild.R b/R/funguild.R index 6f6f47ea..574af2e5 100644 --- a/R/funguild.R +++ b/R/funguild.R @@ -7,7 +7,7 @@ #' The original function and documentation was written by Brendan Furneaux #' in the [FUNGuildR](https://github.com/brendanf/FUNGuildR/) package. #' -#' Please cite this [publication](https://www.sciencedirect.com/science/article/abs/pii/S1754504815000847). +#' Please cite this publication (\doi{10.1016/j.funeco.2015.06.006}). #' #' @param db_url a length 1 character string giving the URL to retrieve the database #' from diff --git a/cran-comments.md b/cran-comments.md index 01f5ee63..23100dc3 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -10,7 +10,8 @@ Found the following (possibly) invalid URLs: Status: 403 Message: Forbidden -> I don't understand why the URL is invalid. It works for me. +> I don't understand why the URL is invalid. It works for me. I change the url +> by (\doi{10.1016/j.funeco.2015.06.006}) # Bad \link{} for external packages From 0a85fcb33b15ed5336503c3f4fb771373d2b6c60 Mon Sep 17 00:00:00 2001 From: adrien Date: Wed, 25 Sep 2024 16:30:59 +0200 Subject: [PATCH 2/4] feat(ggvenn_pq): Add param return_data_for_venn --- NEWS.md | 7 +++---- R/plot_functions.R | 31 ++++++++++++++++++++++++++++++- man/add_funguild_info.Rd | 2 +- man/blast_to_derep.Rd | 2 +- man/get_funguild_db.Rd | 2 +- 5 files changed, 36 insertions(+), 8 deletions(-) diff --git a/NEWS.md b/NEWS.md index ef4cf6c0..a0d59683 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,10 +2,9 @@ # MiscMetabar 0.9.3 (in development) - Homogenize terminology replacing ASV by taxa/taxon in documentation and code -- Build an alias function `filter_taxa_blast()` for -`filter_asv_blast()` -- Build an alias function `postcluster_pq()` for -`asv2otu()` +- Build an alias function `filter_taxa_blast()` for `filter_asv_blast()` +- Build an alias function `postcluster_pq()` for `asv2otu()` +- Add param `return_data_for_venn` in function `ggvenn_pq` in order to make more customizable plot following [ggVennDiagram tutorial](https://gaospecial.github.io/ggVennDiagram/articles/fully-customed.html) ## BREAKING CHANGES diff --git a/R/plot_functions.R b/R/plot_functions.R index c72be46d..7dabb071 100644 --- a/R/plot_functions.R +++ b/R/plot_functions.R @@ -1195,6 +1195,9 @@ venn_pq <- #' modalities of args `fact`. Use `phyloseq::rarefy_even_depth()` function #' @param rarefy_after_merging Rarefy each sample after merging by the #' modalities of args `fact`. +#' @param return_data_for_venn (logical, default FALSE) If TRUE, the plot is +#' not returned, but the resulting dataframe to plot with ggVennDiagram package +#' is returned. #' @param ... Other arguments for the `ggVennDiagram::ggVennDiagram` function #' for ex. `category.names`. #' @return A \code{\link[ggplot2]{ggplot}}2 plot representing Venn diagram of @@ -1225,6 +1228,27 @@ venn_pq <- #' ggvenn_pq(data_fungi, fact = "Height", rarefy_before_merging = TRUE) #' ggvenn_pq(data_fungi, fact = "Height", rarefy_after_merging = TRUE) + #' scale_x_continuous(expand = expansion(mult = 0.5)) +#' +#' # For more flexibility, you can save the dataset for more precise construction +#' # with ggplot2 and ggVennDiagramm (https://gaospecial.github.io/ggVennDiagram/articles/fully-customed.html) +#' res_venn <- ggvenn_pq(data_fungi, fact = "Height", return_data_for_venn = TRUE) +#' +#' ggplot() + +#' # 1. region count layer +#' geom_polygon(aes(X, Y, group = id, fill =name), +#' data = venn_regionedge(res_venn)) + +#' # 2. set edge layer +#' geom_path(aes(X, Y, color = id, group = id), +#' data = venn_setedge(res_venn), +#' show.legend = FALSE, linewidth = 3) + +#' # 3. set label layer +#' geom_text(aes(X, Y, label = name), +#' data = venn_setlabel(res_venn)) + +#' # 4. region label layer +#' geom_label(aes(X, Y, label = paste0(count, " (", scales::percent(count/sum(count), accuracy = 2), ")")), +#' data = venn_regionlabel(res_venn)) + +#' theme_void() +#' #' } #' } #' @export @@ -1240,6 +1264,7 @@ ggvenn_pq <- function(physeq = NULL, add_nb_seq = FALSE, rarefy_before_merging = FALSE, rarefy_after_merging = FALSE, + return_data_for_venn = FALSE, ...) { if (!is.factor(physeq@sam_data[[fact]])) { physeq@sam_data[[fact]] <- as.factor(physeq@sam_data[[fact]]) @@ -1323,7 +1348,11 @@ ggvenn_pq <- function(physeq = NULL, ggtitle(moda) } } - return(p) + if(return_data_for_venn) { + return(process_data(Venn(res))) + } else { + return(p) + } } ################################################################################ diff --git a/man/add_funguild_info.Rd b/man/add_funguild_info.Rd index cc6634c1..9c91746d 100644 --- a/man/add_funguild_info.Rd +++ b/man/add_funguild_info.Rd @@ -31,7 +31,7 @@ Please cite Nguyen et al. 2016 (\doi{doi:10.1016/j.funeco.2015.06.006}) \details{ This function is mainly a wrapper of the work of others. Please make a reference to \code{FUNGuildR} package and the associate -\href{https://www.sciencedirect.com/science/article/abs/pii/S1754504815000847}{publication} if you +publication (\doi{10.1016/j.funeco.2015.06.006}) if you use this function. } \examples{ diff --git a/man/blast_to_derep.Rd b/man/blast_to_derep.Rd index 1b96ba63..e660a3f3 100644 --- a/man/blast_to_derep.Rd +++ b/man/blast_to_derep.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/blast.R \name{blast_to_derep} \alias{blast_to_derep} -\title{Blast some sequence against sequences from of a \code{\link{derep-class}} +\title{Blast some sequence against sequences from of a \code{\link[dada2]{derep-class}} object.} \usage{ blast_to_derep( diff --git a/man/get_funguild_db.Rd b/man/get_funguild_db.Rd index baaaacab..82f6fb9d 100644 --- a/man/get_funguild_db.Rd +++ b/man/get_funguild_db.Rd @@ -24,7 +24,7 @@ to the \code{db} argument of \code{\link[=funguild_assign]{funguild_assign()}} The original function and documentation was written by Brendan Furneaux in the \href{https://github.com/brendanf/FUNGuildR/}{FUNGuildR} package. -Please cite this \href{https://www.sciencedirect.com/science/article/abs/pii/S1754504815000847}{publication}. +Please cite this publication (\doi{10.1016/j.funeco.2015.06.006}). } \references{ Nguyen NH, Song Z, Bates ST, Branco S, Tedersoo L, Menke J, From 6c098cb8ec543095232b4824977e340610910039 Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 27 Sep 2024 12:02:49 +0200 Subject: [PATCH 3/4] docs: Propose pak to install MiscMetabar --- README.Rmd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.Rmd b/README.Rmd index 86fe5107..ca950b87 100644 --- a/README.Rmd +++ b/README.Rmd @@ -42,6 +42,15 @@ A CRAN version of MiscMetabar is available. install.packages("MiscMetabar") ``` +You may need to install required bioconductor packages (dada2 and phyloseq) first. See their installation pages. +One other solution is to use the package [pak](https://pak.r-lib.org/) to install MiscMetabar. It comes with the benefit to check for +uninstalled dependencies on your computer (system requirements), thank you [pak](https://pak.r-lib.org/)! + +```{r, results = 'hide', eval=FALSE} +pak::pkg_install("MiscMetabar") +``` + + You can also install the stable development version from [GitHub](https://github.com/) with: From 3f565a2f49cde3acb9031a71883c97184117bd30 Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 27 Sep 2024 16:04:31 +0200 Subject: [PATCH 4/4] fix(v.-0.9.4): Fix a bug in example for CRAN resubmission --- DESCRIPTION | 2 +- NEWS.md | 8 ++- R/dada_phyloseq.R | 1 + R/plot_functions.R | 56 ++++++++++-------- README.md | 13 +++- cran-comments.md | 22 +------ docs/404.html | 2 +- docs/CODE_OF_CONDUCT.html | 2 +- docs/CONTRIBUTING.html | 2 +- docs/LICENSE.html | 2 +- docs/articles/MiscMetabar.html | 4 +- docs/articles/Reclustering.html | 6 +- docs/articles/Rules.html | 2 +- docs/articles/alpha-div.html | 4 +- docs/articles/beta-div.html | 4 +- docs/articles/explore_data.html | 2 +- docs/articles/fastq_quality_check.html | 2 +- docs/articles/filter.html | 4 +- docs/articles/import_export_track.html | 4 +- docs/articles/index.html | 2 +- docs/articles/states_of_fields_in_R.html | 2 +- docs/articles/tengeler.html | 4 +- docs/articles/tree_visualization.html | 4 +- docs/authors.html | 6 +- docs/index.html | 41 +++++++------ docs/news/index.html | 21 +++++-- docs/pkgdown.yml | 4 +- docs/reference/LCBD_pq.html | 2 +- docs/reference/MiscMetabar-deprecated.html | 2 +- docs/reference/MiscMetabar-package.html | 2 +- docs/reference/Rplot006.png | Bin 28045 -> 43347 bytes docs/reference/Rplot007.png | Bin 21073 -> 21699 bytes docs/reference/Rplot008.png | Bin 19145 -> 21778 bytes docs/reference/SRS_curve_pq-1.png | Bin 76214 -> 72915 bytes docs/reference/SRS_curve_pq.html | 2 +- docs/reference/Tengeler2020_pq.html | 2 +- docs/reference/accu_plot-1.png | Bin 153779 -> 156503 bytes docs/reference/accu_plot-2.png | Bin 116703 -> 115337 bytes docs/reference/accu_plot.html | 4 +- .../accu_plot_balanced_modality.html | 2 +- docs/reference/accu_samp_threshold.html | 2 +- docs/reference/add_blast_info.html | 2 +- docs/reference/add_dna_to_phyloseq.html | 2 +- docs/reference/add_funguild_info.html | 5 +- docs/reference/add_info_to_sam_data.html | 2 +- docs/reference/add_new_taxonomy_pq.html | 2 +- docs/reference/adonis_pq.html | 2 +- docs/reference/adonis_rarperm_pq.html | 2 +- docs/reference/all_object_size.html | 2 +- docs/reference/ancombc_pq.html | 2 +- docs/reference/are_modality_even_depth.html | 2 +- docs/reference/as_binary_otu_table.html | 2 +- docs/reference/biplot_pq.html | 2 +- docs/reference/blast_pq.html | 2 +- docs/reference/blast_to_derep.html | 2 +- docs/reference/blast_to_phyloseq.html | 2 +- docs/reference/build_phytree_pq-2.png | Bin 56143 -> 57312 bytes docs/reference/build_phytree_pq-5.png | Bin 83878 -> 91112 bytes docs/reference/build_phytree_pq-6.png | Bin 102485 -> 105780 bytes docs/reference/build_phytree_pq-7.png | Bin 50074 -> 51658 bytes docs/reference/build_phytree_pq-8.png | Bin 48261 -> 51752 bytes docs/reference/build_phytree_pq.html | 24 ++++---- docs/reference/chimera_detection_vs.html | 2 +- docs/reference/chimera_removal_vs.html | 2 +- docs/reference/circle_pq.html | 2 +- docs/reference/clean_pq.html | 2 +- docs/reference/compare_pairs_pq.html | 2 +- docs/reference/count_seq.html | 2 +- docs/reference/cutadapt_remove_primers.html | 2 +- docs/reference/data_fungi.html | 2 +- docs/reference/data_fungi_mini.html | 2 +- docs/reference/data_fungi_sp_known.html | 2 +- docs/reference/diff_fct_diff_class.html | 2 +- docs/reference/dist_bycol.html | 2 +- docs/reference/dist_pos_control.html | 2 +- docs/reference/distri_1_taxa.html | 2 +- docs/reference/fac2col.html | 2 +- .../figures/README-unnamed-chunk-8-1.png | Bin 41828 -> 54011 bytes docs/reference/filter_asv_blast.html | 2 +- docs/reference/filter_trim.html | 2 +- docs/reference/formattable_pq.html | 2 +- docs/reference/funguild_assign.html | 2 +- docs/reference/funky_color.html | 2 +- docs/reference/get_file_extension.html | 2 +- docs/reference/get_funguild_db.html | 11 ++-- docs/reference/ggaluv_pq.html | 2 +- docs/reference/ggbetween_pq-1.png | Bin 175470 -> 177230 bytes docs/reference/ggbetween_pq.html | 4 +- docs/reference/ggscatt_pq-1.png | Bin 104655 -> 104696 bytes docs/reference/ggscatt_pq-2.png | Bin 109174 -> 108944 bytes docs/reference/ggscatt_pq.html | 2 +- docs/reference/ggvenn_pq-6.png | Bin 93816 -> 127577 bytes docs/reference/ggvenn_pq.html | 42 ++++++++++++- docs/reference/glmutli_pq.html | 2 +- docs/reference/graph_test_pq-1.png | Bin 127212 -> 122663 bytes docs/reference/graph_test_pq.html | 2 +- docs/reference/heat_tree_pq.html | 2 +- docs/reference/hill_pq.html | 2 +- docs/reference/hill_test_rarperm_pq.html | 2 +- docs/reference/hill_tuckey_pq.html | 2 +- docs/reference/iNEXT_pq.html | 2 +- docs/reference/index.html | 24 ++++---- docs/reference/is_cutadapt_installed.html | 4 +- docs/reference/is_falco_installed.html | 2 +- docs/reference/is_krona_installed.html | 2 +- docs/reference/is_mumu_installed.html | 2 +- docs/reference/is_swarm_installed.html | 4 +- docs/reference/is_vsearch_installed.html | 2 +- docs/reference/krona.html | 2 +- docs/reference/list_fastq_files.html | 2 +- docs/reference/lulu.html | 2 +- docs/reference/lulu_pq.html | 7 +-- docs/reference/merge_krona.html | 2 +- docs/reference/merge_samples2.html | 2 +- docs/reference/merge_taxa_vec.html | 2 +- docs/reference/multi_biplot_pq.html | 2 +- docs/reference/multipatt_pq.html | 2 +- docs/reference/multiplot.html | 2 +- docs/reference/multitax_bar_pq.html | 2 +- docs/reference/mumu_pq.html | 2 +- docs/reference/normalize_prop_pq.html | 2 +- docs/reference/perc.html | 2 +- docs/reference/phyloseq_to_edgeR.html | 2 +- docs/reference/physeq_or_string_to_dna.html | 2 +- docs/reference/plot_LCBD_pq.html | 2 +- docs/reference/plot_SCBD_pq.html | 2 +- docs/reference/plot_ancombc_pq.html | 2 +- docs/reference/plot_deseq2_pq.html | 2 +- docs/reference/plot_edgeR_pq.html | 2 +- docs/reference/plot_guild_pq.html | 2 +- docs/reference/plot_mt.html | 2 +- docs/reference/plot_tax_pq.html | 2 +- docs/reference/plot_tsne_pq.html | 2 +- docs/reference/plot_var_part_pq.html | 2 +- docs/reference/postcluster_pq.html | 2 +- docs/reference/psmelt_samples_pq.html | 2 +- .../rarefy_sample_count_by_modality.html | 2 +- docs/reference/read_pq.html | 2 +- docs/reference/rename_samples.html | 2 +- docs/reference/rename_samples_otu_table.html | 2 +- docs/reference/reorder_taxa_pq.html | 2 +- docs/reference/ridges_pq.html | 2 +- docs/reference/rotl_pq.html | 2 +- .../reference/sample_data_with_new_names.html | 2 +- docs/reference/sankey_pq.html | 2 +- docs/reference/save_pq.html | 2 +- docs/reference/search_exact_seq_pq.html | 2 +- docs/reference/select_one_sample.html | 2 +- docs/reference/select_taxa-methods.html | 2 +- docs/reference/signif_ancombc.html | 2 +- docs/reference/simplify_taxo.html | 2 +- docs/reference/subsample_fastq.html | 2 +- docs/reference/subset_samples_pq.html | 2 +- docs/reference/subset_taxa_pq.html | 2 +- docs/reference/subset_taxa_tax_control.html | 2 +- docs/reference/summary_plot_pq.html | 2 +- docs/reference/swarm_clustering.html | 2 +- docs/reference/tax_bar_pq.html | 2 +- docs/reference/tax_datatable.html | 2 +- docs/reference/taxa_as_columns.html | 2 +- docs/reference/taxa_as_rows.html | 2 +- docs/reference/taxa_only_in_one_level.html | 2 +- docs/reference/tbl_sum_samdata.html | 2 +- docs/reference/track_wkflow.html | 2 +- docs/reference/track_wkflow_samples.html | 2 +- docs/reference/transp.html | 2 +- docs/reference/treemap_pq.html | 2 +- docs/reference/tsne_pq.html | 2 +- docs/reference/unique_or_na.html | 2 +- docs/reference/upset_pq.html | 2 +- docs/reference/upset_test_pq.html | 2 +- docs/reference/var_par_pq.html | 2 +- docs/reference/var_par_rarperm_pq.html | 2 +- docs/reference/venn_pq.html | 2 +- docs/reference/verify_pq.html | 2 +- docs/reference/vs_search_global.html | 2 +- docs/reference/vsearch_clustering.html | 2 +- docs/reference/write_pq.html | 2 +- docs/search.json | 2 +- man/build_phytree_pq.Rd | 1 + man/figures/README-unnamed-chunk-8-1.png | Bin 0 -> 54011 bytes man/ggvenn_pq.Rd | 34 +++++++++++ 182 files changed, 369 insertions(+), 271 deletions(-) create mode 100644 man/figures/README-unnamed-chunk-8-1.png diff --git a/DESCRIPTION b/DESCRIPTION index 425b4a78..0a623408 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: MiscMetabar Type: Package Title: Miscellaneous Functions for Metabarcoding Analysis -Version: 0.9.3 +Version: 0.9.4 Authors@R: person("Adrien", "Taudière", email = "adrien.taudiere@zaclys.net", 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) . diff --git a/NEWS.md b/NEWS.md index a0d59683..2fafdf52 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,11 @@ -# MiscMetabar 0.9.3 (in development) +# MiscMetabar 0.9.5 (in development) + +# MiscMetabar 0.9.4 + +- Set a seed in the example of `build_tree_pq` to resubmit to CRAN + +# MiscMetabar 0.9.3 - Homogenize terminology replacing ASV by taxa/taxon in documentation and code - Build an alias function `filter_taxa_blast()` for `filter_asv_blast()` diff --git a/R/dada_phyloseq.R b/R/dada_phyloseq.R index 69f193d7..92797473 100644 --- a/R/dada_phyloseq.R +++ b/R/dada_phyloseq.R @@ -2019,6 +2019,7 @@ plot_guild_pq <- #' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows" #' \donttest{ #' if (requireNamespace("phangorn")) { +#' set.seed(22) #' df <- subset_taxa_pq(data_fungi_mini, taxa_sums(data_fungi_mini) > 9000) #' df_tree <- build_phytree_pq(df, nb_bootstrap = 2) #' plot(df_tree$UPGMA) diff --git a/R/plot_functions.R b/R/plot_functions.R index 7dabb071..1fccdd94 100644 --- a/R/plot_functions.R +++ b/R/plot_functions.R @@ -1195,9 +1195,9 @@ venn_pq <- #' modalities of args `fact`. Use `phyloseq::rarefy_even_depth()` function #' @param rarefy_after_merging Rarefy each sample after merging by the #' modalities of args `fact`. -#' @param return_data_for_venn (logical, default FALSE) If TRUE, the plot is +#' @param return_data_for_venn (logical, default FALSE) If TRUE, the plot is #' not returned, but the resulting dataframe to plot with ggVennDiagram package -#' is returned. +#' is returned. #' @param ... Other arguments for the `ggVennDiagram::ggVennDiagram` function #' for ex. `category.names`. #' @return A \code{\link[ggplot2]{ggplot}}2 plot representing Venn diagram of @@ -1228,27 +1228,35 @@ venn_pq <- #' ggvenn_pq(data_fungi, fact = "Height", rarefy_before_merging = TRUE) #' ggvenn_pq(data_fungi, fact = "Height", rarefy_after_merging = TRUE) + #' scale_x_continuous(expand = expansion(mult = 0.5)) -#' -#' # For more flexibility, you can save the dataset for more precise construction -#' # with ggplot2 and ggVennDiagramm (https://gaospecial.github.io/ggVennDiagram/articles/fully-customed.html) +#' +#' # For more flexibility, you can save the dataset for more precise construction +#' # with ggplot2 and ggVennDiagramm +#' # (https://gaospecial.github.io/ggVennDiagram/articles/fully-customed.html) #' res_venn <- ggvenn_pq(data_fungi, fact = "Height", return_data_for_venn = TRUE) -#' -#' ggplot() + -#' # 1. region count layer -#' geom_polygon(aes(X, Y, group = id, fill =name), -#' data = venn_regionedge(res_venn)) + -#' # 2. set edge layer -#' geom_path(aes(X, Y, color = id, group = id), -#' data = venn_setedge(res_venn), -#' show.legend = FALSE, linewidth = 3) + -#' # 3. set label layer -#' geom_text(aes(X, Y, label = name), -#' data = venn_setlabel(res_venn)) + -#' # 4. region label layer -#' geom_label(aes(X, Y, label = paste0(count, " (", scales::percent(count/sum(count), accuracy = 2), ")")), -#' data = venn_regionlabel(res_venn)) + -#' theme_void() -#' +#' +#' ggplot() + +#' # 1. region count layer +#' geom_polygon(aes(X, Y, group = id, fill = name), +#' data = ggVennDiagram::venn_regionedge(res_venn) +#' ) + +#' # 2. set edge layer +#' geom_path(aes(X, Y, color = id, group = id), +#' data = ggVennDiagram::venn_setedge(res_venn), +#' show.legend = FALSE, linewidth = 3 +#' ) + +#' # 3. set label layer +#' geom_text(aes(X, Y, label = name), +#' data = ggVennDiagram::venn_setlabel(res_venn) +#' ) + +#' # 4. region label layer +#' geom_label( +#' aes(X, Y, label = paste0( +#' count, " (", +#' scales::percent(count / sum(count), accuracy = 2), ")" +#' )), +#' data = ggVennDiagram::venn_regionlabel(res_venn) +#' ) + +#' theme_void() #' } #' } #' @export @@ -1348,8 +1356,8 @@ ggvenn_pq <- function(physeq = NULL, ggtitle(moda) } } - if(return_data_for_venn) { - return(process_data(Venn(res))) + if (return_data_for_venn) { + return(ggVennDiagram::process_data(ggVennDiagram::Venn(res))) } else { return(p) } diff --git a/README.md b/README.md index b3e4de53..86114e03 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org [![DOI](https://joss.theoj.org/papers/10.21105/joss.06038/status.svg)](https://doi.org/10.21105/joss.06038) + # MiscMetabar MiscMetabar website @@ -48,6 +49,16 @@ A CRAN version of MiscMetabar is available. install.packages("MiscMetabar") ``` +You may need to install required bioconductor packages (dada2 and +phyloseq) first. See their installation pages. One other solution is to +use the package [pak](https://pak.r-lib.org/) to install MiscMetabar. It +comes with the benefit to check for uninstalled dependencies on your +computer (system requirements), thank you [pak](https://pak.r-lib.org/)! + +``` r +pak::pkg_install("MiscMetabar") +``` + You can also install the stable development version from [GitHub](https://github.com/) with: @@ -138,7 +149,7 @@ ggvenn_pq(data_fungi, fact = "Height") + labs(title = "Share number of ASV among Height in tree") ``` - + ### Note for non-Linux users diff --git a/cran-comments.md b/cran-comments.md index 23100dc3..5d152d81 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,21 +1,3 @@ -Resolved 2 Notes from CRAN submission +Resolved 1 Error from CRAN "Additional issue" - -# Invalid URLs - -Found the following (possibly) invalid URLs: - URL: https://www.sciencedirect.com/science/article/abs/pii/S1754504815000847 - From: man/add_funguild_info.Rd - man/get_funguild_db.Rd - Status: 403 - Message: Forbidden - -> I don't understand why the URL is invalid. It works for me. I change the url -> by (\doi{10.1016/j.funeco.2015.06.006}) - - -# Bad \link{} for external packages - -Found the following Rd file(s) with Rd \link{} targets missing package - -> Solved in v. 0.9.3 \ No newline at end of file +I add a seed (`set.seed(22)`) in the offending example of `build_phytree_pq`. I tried to find the error using a loop, but after 50 different seed numbers, the examples still work on my side. \ No newline at end of file diff --git a/docs/404.html b/docs/404.html index 46be9e99..db605e84 100644 --- a/docs/404.html +++ b/docs/404.html @@ -27,7 +27,7 @@ MiscMetabar - 0.9.3 + 0.9.4