Skip to content

Commit

Permalink
Merge pull request #84 from adrientaudiere/dev
Browse files Browse the repository at this point in the history
v0.7.5-beta
  • Loading branch information
adrientaudiere authored Feb 10, 2024
2 parents 0053012 + 93c6473 commit ad104f3
Show file tree
Hide file tree
Showing 22 changed files with 103 additions and 61 deletions.
2 changes: 1 addition & 1 deletion R/Deseq2_edgeR.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' or \code{\link[ggplot2]{ggplot}}
#'
#' @export
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' data("GlobalPatterns", package = "phyloseq")
#' GP_archae <- subset_taxa(GlobalPatterns, GlobalPatterns@tax_table[, 1] == "Archaea")
#' plot_edgeR_pq(GP_archae, c("SampleType", "Soil", "Feces"),
Expand Down
2 changes: 1 addition & 1 deletion R/beta_div_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ plot_SCBD_pq <- function(physeq,
#'
#' @return A ggplot object
#' @export
#' @examples
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' data(data_fungi)
#' data_fungi_ab <- subset_taxa_pq(data_fungi, taxa_sums(data_fungi) > 10000)
#' multipatt_pq(subset_samples(data_fungi_ab, !is.na(Time)), fact = "Time")
Expand Down
13 changes: 5 additions & 8 deletions R/dada_phyloseq.R
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ clean_pq <- function(physeq,
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' data(enterotype)
#' track_wkflow(list(data_fungi, enterotype), taxonomy_rank = c(3, 5))

track_wkflow <- function(list_of_objects,
obj_names = NULL,
clean_pq = FALSE,
Expand Down Expand Up @@ -666,8 +665,8 @@ asv2otu <- function(physeq = NULL,
#' @author Adrien Taudière
#' @examples
#' \dontrun{
#' write_pq(data_fungi, path = "phyloseq")
#' write_pq(data_fungi, path = "phyloseq", one_file = TRUE)
#' write_pq(data_fungi, path = "phyloseq")
#' write_pq(data_fungi, path = "phyloseq", one_file = TRUE)
#' }

#' @seealso [MiscMetabar::save_pq()]
Expand Down Expand Up @@ -872,9 +871,8 @@ write_pq <- function(physeq,
#' [base::load()] function + if present a phylogenetic tree in Newick format (`phy_tree.txt`)
#' @export
#' @author Adrien Taudière
#' @examples
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' \dontrun{
#'
#' save_pq(data_fungi, path = "phyloseq")
#' }
#' @seealso [MiscMetabar::write_pq()]
Expand Down Expand Up @@ -1928,9 +1926,8 @@ plot_guild_pq <-
#' This function is mainly a wrapper of the work of others.
#' Please make a reference to `phangorn` package if you
#' use this function.
#' @examples
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' library("phangorn")
#'
#' 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)
Expand Down Expand Up @@ -2311,7 +2308,7 @@ physeq_or_string_to_dna <- function(physeq = NULL,
#' @export
#' @author Adrien Taudière
#'
#' @examples
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' \dontrun{
#' cutadapt_remove_primers("inst/extdata", "TTC", "GAA",
#' folder_output = tempdir()
Expand Down
23 changes: 11 additions & 12 deletions R/krona.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
#' @param name A name for intermediary files, Useful to name
#' your krona result files before merging using [merge_krona()]
#'
#' @examples
#'
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' data("GlobalPatterns", package = "phyloseq")
#' GA <- subset_taxa(GlobalPatterns, Phylum == "Acidobacteria")
#' \dontrun{
#' krona(GA, "Number.of.sequences.html")
#' krona(GA, "Number.of.ASVs.html", nb_seq = FALSE)
#' merge_krona(c("Number.of.sequences.html", "Number.of.ASVs.html"))
#' krona(GA, "Number.of.sequences.html")
#' krona(GA, "Number.of.ASVs.html", nb_seq = FALSE)
#' merge_krona(c("Number.of.sequences.html", "Number.of.ASVs.html"))
#' }
#' @return A html file
#' @export
Expand Down Expand Up @@ -109,14 +108,14 @@ krona <-
#' @param files (required) path to html files to merged
#' @param output path to the output file
#'
#' @examples
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' \dontrun{
#' data("GlobalPatterns", package = "phyloseq")
#' GA <- subset_taxa(GlobalPatterns, Phylum == "Acidobacteria")
#' krona(GA, "Number.of.sequences.html", name = "Nb_seq_GP_acidobacteria")
#' krona(GA, "Number.of.ASVs.html", nb_seq = FALSE, name = "Nb_asv_GP_acidobacteria")
#' merge_krona(c("Number.of.sequences.html", "Number.of.ASVs.html"), "mergeKrona.html")
#' unlink(c("Number.of.sequences.html", "Number.of.ASVs.html", "mergeKrona.html"))
#' data("GlobalPatterns", package = "phyloseq")
#' GA <- subset_taxa(GlobalPatterns, Phylum == "Acidobacteria")
#' krona(GA, "Number.of.sequences.html", name = "Nb_seq_GP_acidobacteria")
#' krona(GA, "Number.of.ASVs.html", nb_seq = FALSE, name = "Nb_asv_GP_acidobacteria")
#' merge_krona(c("Number.of.sequences.html", "Number.of.ASVs.html"), "mergeKrona.html")
#' unlink(c("Number.of.sequences.html", "Number.of.ASVs.html", "mergeKrona.html"))
#' }
#' @return A html file
#' @seealso \code{\link{krona}}
Expand Down
22 changes: 11 additions & 11 deletions R/plot_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1711,15 +1711,15 @@ summary_plot_pq <- function(physeq,
#' This function is mainly a wrapper of the work of others.
#' Please make a reference to `rotl` package if you
#' use this function.
#' @examples
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' library("rotl")
#' tr <- rotl_pq(data_fungi_mini, species_colnames = "Genus_species")
#' plot(tr)
#' \dontrun{
#' tr_Asco <- rotl_pq(data_fungi, species_colnames = "Genus_species", context_name = "Ascomycetes")
#' plot(tr_Asco)
#' tr_Asco <- rotl_pq(data_fungi, species_colnames = "Genus_species", context_name = "Ascomycetes")
#' plot(tr_Asco)
#' }
#'
#'
rotl_pq <- function(physeq,
species_colnames = "Genus_species",
context_name = "All life") {
Expand Down Expand Up @@ -1796,13 +1796,13 @@ rotl_pq <- function(physeq,
#' )
#'
#' \dontrun{
#' heat_tree_pq(GPsubset,
#' node_size = nb_sequences,
#' node_color = n_obs,
#' node_label = taxon_names,
#' tree_label = taxon_names,
#' node_size_trans = "log10 area"
#' )
#' heat_tree_pq(GPsubset,
#' node_size = nb_sequences,
#' node_color = n_obs,
#' node_label = taxon_names,
#' tree_label = taxon_names,
#' node_size_trans = "log10 area"
#' )
#' }
#'
heat_tree_pq <- function(physeq, taxonomic_level = NULL, ...) {
Expand Down
2 changes: 1 addition & 1 deletion R/table_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @return A datatable
#' @export
#'
#' @examples
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' data("GlobalPatterns", package = "phyloseq")
#' tax_datatable(subset_taxa(
#' GlobalPatterns,
Expand Down
15 changes: 15 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,21 @@ ggvenn_pq(data_fungi, fact = "Height") +

Some functions may not work on windows (*e.g.* [track_wflow()], [cutadapt_remove_primers()], [krona()], [vsearch_clustering()], ...). A solution is to exploit docker container, for example the using the great [rocker project](https://rocker-project.org/).

Here is a list of functions with some limitations or not working at all on windows OS:

- [build_phytree_pq()]
- [count_seq()]
- [cutadapt_remove_primers()]
- [krona()]
- [merge_krona()]
- [multipatt_pq()]
- [plot_tsne_pq()]
- [rotl_pq()]
- [save_pq()]
- [tax_datatable()]
- [track_wkflow()]
- [track_wkflow_samples()]

MiscMetabar is developed under Linux and the vast majority of functions may works on Unix system, but its functionning is not test under iOS.

### Installation of other softwares for debian Linux distributions
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,22 @@ Some functions may not work on windows (*e.g.* \[track_wflow()\],
…). A solution is to exploit docker container, for example the using the
great [rocker project](https://rocker-project.org/).

Here is a list of functions with some limitations or not working at all
on windows OS:

- \[build_phytree_pq()\]
- \[count_seq()\]
- \[cutadapt_remove_primers()\]
- \[krona()\]
- \[merge_krona()\]
- \[multipatt_pq()\]
- \[plot_tsne_pq()\]
- \[rotl_pq()\]
- \[save_pq()\]
- \[tax_datatable()\]
- \[track_wkflow()\]
- \[track_wkflow_samples()\]

MiscMetabar is developed under Linux and the vast majority of functions
may works on Unix system, but its functionning is not test under iOS.

Expand Down
3 changes: 2 additions & 1 deletion man/build_phytree_pq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/cutadapt_remove_primers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions man/heat_tree_pq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions man/krona.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions man/merge_krona.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/multipatt_pq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/plot_edgeR_pq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/rotl_pq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/save_pq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/tax_datatable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/write_pq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test_cutadapt.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if (!MiscMetabar:::is_cutadapt_installed()) {
"cutadapt_remove_primers() can't be
tested when cutadapt is not installed"
)
} else {
} else if (FALSE) { # Not running test for the moment because can't fix for test-coverage.yaml github action
test_that("cutadapt_remove_primers works fine", {
skip_on_cran()
skip_on_os("windows")
Expand Down
Loading

0 comments on commit ad104f3

Please sign in to comment.