Skip to contents

Rules for the package development

Documentation

  • Always indicate required params (required)
  • Indicate default values only when (i) a set of values is possible [e.g "bray" for the parameter method in vegan::vegdist()] or (ii) when this value is well thought out and a good default value for most users [e.g. the number of permutation or processors, or the level of identity to cluster at 97%].
  • Indicate the type for logical and integer params.
  • Homogenize the params names across function.
  • Prefer ASVs to OTUs denomination, even thought both are almost interchangeable in the MiscMetabar package.

Lifecycle

  • Experimental: First status for a function
  • Maturing: Some tests and/or analyses make stronger these functions
  • Stable: Good level of confidence

Tests and examples

Special cases of external softwares

Some examples and test required the installation of external softwares. I used MiscMetabar internal functions (such as [is_vsearch_installed()]) to conditionnaly test (if(is_vsearch_installed()){...test...}) and run examples #' @examplesIf is_vsearch_installed().

Special case of CRAN

I use \donttest{} for some long examples (in roxygen documentation) and testthat::skip_on_cran() in long test.

Special case of windows

Some tests and examples are not tested on windows. I used testthat::skip_on_os("windows") inside test and #' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows" in examples (roxygen documentation). 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()]
  • [tsne_pq()]
  • [venn_pq()]

Session information

## R version 4.3.3 (2024-02-29)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Debian GNU/Linux 11 (bullseye)
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.13.so;  LAPACK version 3.9.0
## 
## locale:
##  [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=fr_FR.UTF-8    
##  [5] LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=fr_FR.UTF-8   
##  [7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: Europe/Paris
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## loaded via a namespace (and not attached):
##  [1] digest_0.6.35     desc_1.4.3        R6_2.5.1          fastmap_1.1.1    
##  [5] xfun_0.43         magrittr_2.0.3    cachem_1.0.8      knitr_1.46       
##  [9] memoise_2.0.1     htmltools_0.5.8.1 rmarkdown_2.26    lifecycle_1.0.4  
## [13] cli_3.6.2         vctrs_0.6.5       sass_0.4.9        pkgdown_2.0.7    
## [17] textshaping_0.3.7 jquerylib_0.1.4   systemfonts_1.0.6 compiler_4.3.3   
## [21] purrr_1.0.2       rstudioapi_0.16.0 tools_4.3.3       ragg_1.3.0       
## [25] bslib_0.7.0       evaluate_0.23     yaml_2.3.8        jsonlite_1.8.8   
## [29] rlang_1.1.3       fs_1.6.3