Skip to content

Commit

Permalink
Merge pull request #49 from adrientaudiere/dev
Browse files Browse the repository at this point in the history
Merge pull request #36 from adrientaudiere/master
  • Loading branch information
adrientaudiere authored Dec 11, 2023
2 parents d599627 + 5aa3dd3 commit cd84cf3
Show file tree
Hide file tree
Showing 107 changed files with 3,325 additions and 2,778 deletions.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
^LICENSE\.md$
^doc$
^Meta$
^CODE_OF_CONDUCT\.md$
^CONTRIBUTING\.md$
^paper$
^.vscode$
23 changes: 6 additions & 17 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,17 @@ assignees: ''
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
Please provide a Minimal Reproducible Example (MRE). See
[Wikipedia](https://en.wikipedia.org/wiki/Minimal_reproducible_example)
and [stackoverflow](https://stackoverflow.com/help/minimal-reproducible-example) for more information.


**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**System information (please complete the following information):**
Please copy the result of the commande `sessionInfo()`

**Additional context**
Add any other context about the problem here.
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
27 changes: 21 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: MiscMetabar
Type: Package
Title: Miscellaneous functions for metabarcoding analysis
Version: 0.5
Title: Miscellaneous Functions for Metabarcoding Analysis
Version: 0.51
Authors@R: person("Adrien", "Taudière", email = "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0003-1088-1182"))
Maintainer: Adrien Taudière <[email protected]>
Description: Functions to help analyze and visualize metabarcoding data. Mainly build on the top of phyloseq, dada2 and targets R packages.
License: AGPL-3 + file LICENSE
License: AGPL-3
Encoding: UTF-8
LazyData: true
Depends:
Expand All @@ -17,35 +17,46 @@ Depends:
magrittr,
phyloseq
Suggests:
adespatial,
BiocManager,
Biostrings,
circlize,
ComplexUpset,
data.table,
DECIPHER,
DESeq2,
devtools,
DT,
edgeR,
formattable,
FUNGuildR,
gghalves,
ggh4x,
ggtree,
ggridges,
ggVennDiagram,
gtsummary,
graphics,
grDevices,
grid,
gridExtra,
here,
iNEXT,
indicspecies,
knitr,
lulu,
metacoder,
methods,
mia,
MicrobiotaProcess,
microViz,
mixtools,
multcompView,
networkD3,
networkD3,
pak,
patchwork,
permute,
phangorn,
pbapply,
plotly,
plyr,
Expand All @@ -60,7 +71,10 @@ Suggests:
testthat (>= 3.0.0),
tibble,
tidyr,
tidytree,
treeio,
treemapify,
utils,
vegan,
venneuler,
viridis
Expand All @@ -81,8 +95,9 @@ Remotes:
github::adrientaudiere/lulu,
github::david-barnett/microViz,
github::erocoar/gghalves,
bioc::phyloseq,
bioc::dada2
bioc::release/phyloseq,
bioc::release/dada2,
github::brendanf/FUNGuildR
Config/testthat/edition: 3
Config/testthat/parallel: true
VignetteBuilder: knitr
2 changes: 0 additions & 2 deletions LICENSE

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MiscMetabar is licensed under the GNU AGPLv3. MiscMetabar takes some code and
MiscMetabar is licensed under the GNU AGPL-3.0. MiscMetabar takes some code and
documentation from the Speedyseq R package. Speedyseq is also licensed under the
GNU AGPLv3; its source code is available at https://github.com/mikemc/speedyseq/.
GNU AGPL-3.0; its source code is available at https://github.com/mikemc/speedyseq/.

GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Expand Down
6 changes: 3 additions & 3 deletions MiscMetabar.Rproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: No

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
Expand Down
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(accu_plot)
export(accu_samp_threshold)
export(add_blast_info)
export(add_dna_to_phyloseq)
export(add_funguild_info)
export(add_new_taxonomy_pq)
export(adonis_phyloseq)
export(adonis_pq)
Expand All @@ -17,6 +18,7 @@ export(biplot_pq)
export(blast_pq)
export(blast_to_derep)
export(blast_to_phyloseq)
export(build_phytree_pq)
export(circle_pq)
export(clean_physeq)
export(clean_pq)
Expand All @@ -37,6 +39,7 @@ export(hill_pq)
export(hill_tuckey_phyloseq)
export(hill_tuckey_pq)
export(iNEXT_pq)
export(install_pkg_needed)
export(krona)
export(list_fastq_files)
export(lulu_phyloseq)
Expand All @@ -46,6 +49,7 @@ export(multi_biplot_pq)
export(multipatt_pq)
export(multiplot)
export(multitax_bar_pq)
export(mumu_pq)
export(otu_circle)
export(perc)
export(phyloseq_to_edgeR)
Expand All @@ -56,6 +60,7 @@ export(plot_deseq2_phyloseq)
export(plot_deseq2_pq)
export(plot_edgeR_phyloseq)
export(plot_edgeR_pq)
export(plot_guild_pq)
export(plot_mt)
export(plot_tax_pq)
export(plot_tsne_pq)
Expand Down
16 changes: 10 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Add function `LCBD_pq()` and `plot_LCBD_pq()` to compute, test and plot local contributions to beta diversity (LCBD) of samples
- Add function `tbl_sum_samdata()` to summarize information from sample data in a table
- Add function `mumu_pq()` to use [mumu](https://github.com/frederic-mahe/mumu), a fast and robust C++ implementation of lulu.
- Add (a mostly internal) function `install_pkg_needed()` to install pkg (mostly for package list in *Suggest* in DESCRIPTION) if needed by a function.
- Add function `add_funguild_info()` and `plot_guild_pq()` to add and plot fungal guild information from taxonomy using `FUNGuild` package
- Add function `build_phytree_pq()` to build 3 phylogenetic trees (NJ, UPGMA and ML using `phangorn` R package) from the `refseq` slot of a `phyloseq` object, possibly with bootstrap values. See the vignettes [Tree visualization](https://adrientaudiere.github.io/MiscMetabar/articles/tree_visualization.html) for an introduction to tree visualization using `ggtree` R package.

# MiscMetabar 0.5

Expand All @@ -10,7 +14,7 @@
## BREAKING CHANGES

- Rename param `log_10` in function `biplot_pq()` into `log10trans`
- Rename param `log10trans` in function `circle_pq()` into `log10trans`
- Rename param `log10transform` in function `circle_pq()` into `log10trans`

# MiscMetabar 0.42

Expand All @@ -23,8 +27,8 @@
# MiscMetabar 0.41

- Add function `iNEXT_pq()` to calculate hill diversity using the [iNEXT](https://github.com/AnneChao/iNEXT) package.
- Add argument `paires` to `multi_biplot_pq()` in order to indicate all paires of samples we want to print.
- Improve `compare_pairs_pq()` with information about the number of shared sequences among paires.
- Add argument `pairs` to `multi_biplot_pq()` in order to indicate all pairs of samples we want to print.
- Improve `compare_pairs_pq()` with information about the number of shared sequences among pairs.
- Add function `upset_pq()` to plot upset of phyloseq object using the [ComplexUpset](https://krassowski.github.io/complex-upset/) package.
- Add function `upset_test_pq` to test for differences between intersections (wrapper of `ComplexUpset::upset_test()` for `phyloseq-object`).
- Add info (param `add_info`) in subtitle of the `hill_pq()` function.
Expand Down Expand Up @@ -52,7 +56,7 @@
* Improve the documentation of `asv2otu()` and fix a little bug in the name of the conserved ASV after `asv2otu()`.
* Test coverage largely improved leading to numerous minor bug fixes.
* Add function `search_exact_seq_pq()` to search for exact matching of sequences using complement, reverse and reverse-complement against a phyloseq object.
* Add function `add_new_taxonomy_pq()` to add new taxonomic rank to a phyloseq object. For exemple to add taxonomic assignment from a new database.
* Add function `add_new_taxonomy_pq()` to add new taxonomic rank to a phyloseq object. For example to add taxonomic assignment from a new database.
* Add a battery of test using `test_that` package and improve code compatibility with cran recommendations.

## BREAKING CHANGES
Expand All @@ -64,7 +68,7 @@
# MiscMetabar 0.34

* Add option `add_nb_samples` to `ggvenn_pq()` which add the number of samples to level name in the plot. Useful to see disequilibrium in the number of samples among the factor's levels.
* Add option `args_makedb` and `args_blastn` to funtions `blast_pq()`, `blast_to_phyloseq()`, `blast_to_derep()` and `filter_asv_blast()`.
* Add option `args_makedb` and `args_blastn` to functions `blast_pq()`, `blast_to_phyloseq()`, `blast_to_derep()` and `filter_asv_blast()`.
* Add option `rarefy_nb_seqs` to `ggven_pq()` in order to rarefy samples before plotting.
* Add function `SRS_curve_pq()` to plot scaling with ranked subsampling (SRS) curves using the `SRS::SRS_curve()` function (see citation("SRS") for reference).
* Add option `nb_samples_info` to `biplot_pq()` in order to add the number of samples merged by level of factors.
Expand Down Expand Up @@ -158,7 +162,7 @@

* Add a function `multiple_share_bisamples()` to help compare samples by pairs

* Add a new function (`ggVenn_phyloseq()`) for better venn diagramm but without area calculation (use `venn_phyloseq()` in this case).
* Add a new function (`ggVenn_phyloseq()`) for better venn diagram but without area calculation (use `venn_phyloseq()` in this case).

* Add two functions helpful for beta-diversity analysis (`adonis_phyloseq()` and `physeq_graph_test()`)

Expand Down
10 changes: 6 additions & 4 deletions R/Deseq2_edgeR.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#' or \code{\link[ggplot2]{ggplot}}
#'
#' @export
#'
#' @examples
#' \dontrun{
#' data(GlobalPatterns)
Expand Down Expand Up @@ -150,11 +149,12 @@ plot_edgeR_pq <-
#' or \code{\link[ggplot2]{ggplot}}
#'
#' @export
#'
#' @details
#' Please cite `DESeq2` package if you use chis function.
#' @examples
#' data("GlobalPatterns")
#' data("GlobalPatterns", package = "phyloseq")
#' GP <- subset_taxa(GlobalPatterns, GlobalPatterns@tax_table[, 1] == "Archaea")
#' GP <- subset_samples(GP, GP@sam_data$SampleType %in% c("Soil", "Skin"))
#' GP <- subset_samples(GP, SampleType %in% c("Soil", "Skin"))
#' res <- DESeq2::DESeq(phyloseq_to_deseq2(GP, ~SampleType),
#' test = "Wald", fitType = "local"
#' )
Expand Down Expand Up @@ -380,6 +380,8 @@ plot_deseq2_pq <-
#'
#' \code{c("TMM", "RLE", "upperquartile", "none")}.
#'
#' @return A DGEList object. See [edgeR::estimateTagwiseDisp()] for more details.
#'
#' @param ... Additional arguments passed on to \code{\link[edgeR]{DGEList}}
#' @export
#'
Expand Down
2 changes: 1 addition & 1 deletion R/MiscMetabar-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ NULL

if (getRversion() >= "2.15.1") {
utils::globalVariables(c(
".id", "%>%", "Ab", "Abundance", "character_method", "col_tax", "combn", "complement", "devtools", "e-value", "Family", "Genus", "grid.draw", "grid.layout", "group_by", "Hill_0", "Hill_1", "Hill_2", "install_github", "log2FoldChange", "logFC", "lwr", "max_Hill", "modality", "multcompLetters", "nb_values", "ott_id", "OTU", "Proportion", "pushViewport", "Query name", "rarefy", "reverse", "rgb", "reverseComplement", "rrarefy", "Sample", "Species", "summarise", "tax", "tax_col", "teststat", "tnrs_match_names", "tol_induced_subtree", "upr", "upViewport", "val", "vegdist", "viewport", "x", "x1", "X1", "x2", "y", "y1", "y2", "ymax", "ymin", "Class", "LVL1", "LVL3", "Time", "calc_taxon_abund", "heat_tree", "parse_phyloseq"
".id", "%>%", "Ab", "Abundance", "character_method", "col_tax", "combn", "complement", "devtools", "e-value", "Family", "Genus", "grid.draw", "grid.layout", "group_by", "Hill_0", "Hill_1", "Hill_2", "install_github", "log2FoldChange", "logFC", "lwr", "max_Hill", "modality", "multcompLetters", "nb_values", "ott_id", "OTU", "Proportion", "pushViewport", "Query name", "rarefy", "reverse", "rgb", "reverseComplement", "rrarefy", "Sample", "Species", "summarise", "tax", "tax_col", "teststat", "tnrs_match_names", "tol_induced_subtree", "upr", "upViewport", "val", "vegdist", "viewport", "x", "x1", "X1", "x2", "y", "y1", "y2", "ymax", "ymin", "Class", "LVL1", "LVL3", "Time", "calc_taxon_abund", "heat_tree", "parse_phyloseq", "ASV_names", "LCBD", "Sample_names", "beta.div", "how name", "p.adj", "p.adjust", "plot_layout value", "Guild", "colors", "install.packages", "name", "nb_asv", "nb_seq", "plot_layout", "read.delim", "update", "value", "write.table"
))
}

Expand Down
Loading

0 comments on commit cd84cf3

Please sign in to comment.