MiscMetabar 0.16.8.9000
-
biplot_pq()fixes a bug where usinginverse_side = TRUEtogether withmerge_sample_byandnb_samples_info = TRUEcaused sample counts to be attached to the wrong modality label. -
plot_deseq2_pq(),plot_edgeR_pq(), andplot_mt()rename thecolor_taxparameter tocolor_rank, which more explicitly names the@tax_tableas the source of the colouring variable.color_taxis kept as a deprecated alias and will warn withlifecycle::deprecate_warn()until removed in a future version. - Rarefaction across the package is now performed by an internal R-version-robust reimplementation rather than
phyloseq::rarefy_even_depth(), whosereplace = FALSEcode path errors withinvalid 'length.out' valueunder recent R-devel (phyloseq issue #1753). The reimplementation is bit-identical tophyloseq::rarefy_even_depth()for the sameseed, depth andreplacevalue (and is more correct in the degenerate case where a retained sample has a single read). This affectsrarefy_pq(),adonis_pq(),adonis_rarperm_pq(),hill_test_rarperm_pq(),hill_pq(),biplot_pq(),ggvenn_pq(),upset_pq(),ggaluv_pq()andggscatt_pq(). -
simplify_taxo()replaces the logicalremove_spaceandremove_NAparameters withranks_to_remove_spaceandranks_to_remove_NA(character vectors oftax_tablecolumn names), and addsranks_for_pattern_to_removeandranks_for_pattern_to_NAto control which columnspattern_to_removeandpattern_to_NAare applied to. All four default to the relevant rank names derived from the phyloseq object; passNULLto skip the operation. Breaking change:ranks_to_remove_NAnow defaults to all ranks (previouslyremove_NA = FALSE); passNULLto restore the old behaviour. -
clean_pq()gains atax_replace_NA_stringargument (defaultFALSE) to replace the literal strings"NA","NA NA","NA NA NA"(whitespace-separated repetitions ofNA, a common artifact of pasting taxonomic ranks) in thetax_tablewith true<NA>values. -
fastp()is a new wrapper for the fastp software performing adapter detection, quality control and preprocessing of paired-end or single-end FASTQ files, with a companionis_fastp_installed()tool-presence helper. -
fastq_to_fasta()converts one or several FASTQ files (optionally gzip-compressed, with.fastqor.fqextensions) to FASTA format, dropping the quality lines and returning the paths of the written files. -
hill_bar_pq()now sets the “Error bars / Tukey HSD” caption once for the whole figure (viapatchwork::plot_annotation()) instead of repeating it on everyqpanel, fixing the overlapping captions seen with several values ofq. Panels where Tukey HSD pairwise comparisons were not run (no global Kruskal-Wallis significance) are flagged with asig_symbol(default"∅", the empty set, new argument) appended to their subtitle and explained once in the shared caption. -
hill_test_rarperm_pq()is deprecated; it has moved to thebootpqpackage. Usebootpq::hill_test_rarperm_pq()instead. -
is_blastn_installed()andis_multiqc_installed()are new tool-presence helpers, following the existingis_cutadapt_installed()/is_vsearch_installed()pattern. -
load_pq()loads a phyloseq object from thephyseq.RDatafile written bysave_pq()orwrite_pq(rdata = TRUE)and returns it so it can be assigned to any name, contrary tobase::load()which always restores it under the namephyseq. -
phyloseq_to_MDT_csv()exports the OTU table, taxonomy and sample data of a phyloseq object to separate CSV (or TSV) files following the GBIF Metabarcoding Data Toolkit (MDT) template layout (OTU IDs in rows, sample IDs in columns), the plain-text counterpart ofphyloseq_to_MDT_excel(). -
phyloseq_to_MDT_excel()exports the OTU table, sample data, taxonomy and reference sequences of a phyloseq object to a multi-sheet Excel file for GBIF Metabarcoding Data Toolkit (MDT) submission, with an optional Darwin Core sample-term check. -
plot_ordination_pq()gains anadd_envfitargument to overlay environmental vectors (continuous variables as arrows) and factor centroids fitted withvegan::envfit()onto the ordination, controlled by the newenvfit_fact,envfit_pval,envfit_arrow_mult,envfit_text_sizeandenvfit_colarguments. -
plot_overview_pq()produces a single-call alpha- and beta-diversity overview of a phyloseq object for one sample variable, adapting the panels to the variable type: a Hill-number scatter viaggscatt_pq()for a numeric variable (gradient-colored ordination and UMAP, Venn/UpSet skipped), or Hill-number bar plots viahill_bar_pq()plus a Venn diagram (or an UpSet plot abovevenn_maxlevels) for a factor. Panels are returned as a named list by default, or assembled into apatchworkfigure withone_plot = TRUE. -
plot_volcano_pq()draws a volcano plot (log2 fold change versus -log10 adjusted p-value) from a differential abundance result table such asDESeq2,ancombc_pq()oraldex_pq()output, coloring taxa as up, down or not differentially abundant. Thefcandpadjarguments now default toNULLand are auto-detected from the input type: the raw list fromancombc_pq()is unwrapped to$resand itslfc_*/q_*columns are detected automatically (intercept excluded);aldex_pq()output is detected viaeffect/wi.eBHcolumns;DESeq2::results()is detected vialog2FoldChange/padjcolumns. -
rarefy_pq()gains areplaceargument (defaultFALSE, sampling without replacement) and acceptsseed = FALSEto leave the random number generator untouched, mirroringphyloseq::rarefy_even_depth(). -
reshape_ggplot()auto-wraps the title, subtitle, caption and axis labels of a ggplot2 object usingstringr::str_wrap(), useful before combining several plots withpatchwork. It gains dedicatedwidth_captionandfontsize_captionarguments to control the caption wrapping width and font size. -
simplify_taxo()gains apattern_to_NAargument (defaultNULL): any cell whose value matches the regex is replaced withNA. Designed for PR2-style placeholder unknowns such asEmbryophyceae_X,Embryophyceae_XX,Embryophyceae_XXX,Embryophyceae_XXX_sp., orMortierella_sp.; use"_X+$|_sp\\.$"to cover all such patterns in one pass. -
strassoc_pq()is a new wrapper aroundindicspecies::strassoc()computing the strength of association (e.g.IndVal, the phi coefficient, the specificity componentAor the fidelity componentB) between each taxon and the groups of a sample variable, complementingmultipatt_pq(). -
tax_bar_pq()gains anorder_modalityargument (defaultNULL) to set the order of thefactmodalities (the order of the bars); listing only a subset of modalities keeps just those bars (with an informative message) and an unknown value triggers an error listing the offending values. -
tax_bar_pq()gains aribbon_hide_zeroargument (defaultTRUE) that, whenadd_ribbon = TRUE, suppresses the ribbon of a taxon between two adjacent bars whenever its value is zero in either connected bar, avoiding ribbons that collapse to a flat line. -
var_par_rarperm_pq()is deprecated; it has moved to thebootpqpackage. Usebootpq::var_par_rarperm_pq()instead. -
vsearch_clustering()(andpostcluster_pq()withmethod = "vsearch") gainquery_covandtarget_covarguments to set the vsearch--query_covand--target_covalignment-coverage thresholds directly, instead of only throughvsearch_args. -
wheat_plot()draws a wheat plot (a histogram/dot-plot hybrid) of a numeric variable, binning values along the x-axis and stacking individual observations as points, useful to inspect distributions such astaxa_sums()orsample_sums().
MiscMetabar 0.16.8
CRAN release: 2026-06-08
- Further check-time reductions for CRAN compliance: extra examples
\dontrun{}(kept for documentation, not run during checks). - Added file-level
skip_on_cran()to some heavy test files. - Example speed-ups for some functions.
- Fix several bugs when using Windows paths by quoting system call arguments with
shQuote()
MiscMetabar 0.16.6
-
verify_tax_table()is now ~10× faster on full-size taxonomy tables. -
divent_hill_matrix_pq()no longer recomputes the per-sample positive-subset (x <- x[x > 0]) once per Hill order. The loop is now sample-outer / q-inner, so each row is sliced once. Numeric output is bitwise-identical. Speeds up every Hill-diversity computation in the package:hill_pq(),hill_bar_pq(),hill_tuckey_pq(),profile_hill_pq(),psmelt_samples_pq(),plot_refseq_extremity_pq(), and the*_rarperm_pqfamily. -
circle_pq()replaces a nestedpbapply(., 2, pbtapply(., group, sum))over the OTU table with tworowsum()calls. Ondata_fungi(1420 taxa × 185 samples) the example dropped from ~18 s to ~1.8 s (≈ 10× faster). Output unchanged. -
format2dada2(fasta_db = …),hill_acc_pq(type = "sample"),adonis_rarperm_pq()are also faster. - New pkgdown article:
vignettes/articles/timing.Rmddocuments wall-clock cost of the main functions ondata_fungianddata_fungi_mini, with a CSV refreshed byinst/benchmark/function_timings.R. - Pkgdown articles use fewer permutations / simulations to keep the site build under a few minutes.
- Reduced
R CMD checktime to keep CRAN’s 10-minute budget. Examples forverify_tax_table(),adonis_pq(),plot_SCBD_pq(),multipatt_pq(),hill_pq(),plot_tsne_pq(),upset_test_pq(),summary_plot_pq(),ggvenn_pq(),plot_refseq_pq(),plot_seq_ratio_pq(),plot_refseq_extremity_pq(),glmutli_pq(),adonis_rarperm_pq(),lefser_pq(),var_par_pq(),var_par_rarperm_pq(),taxa_only_in_one_level(),distri_1_taxa(),accu_plot_balanced_modality(),multi_biplot_pq(),tax_bar_pq(),plot_var_part_pq(),track_wkflow(),reorder_taxa_pq()andtransform_pq()now usedata_fungi_mini(137 × 45) instead of the fulldata_fungi(185 × 1420), keeping behaviour identical but much faster. -
hill_acc_pq(),iNEXT_pq(),format2dada2()andhill_test_rarperm_pq()examples moved from\donttest{}to\dontrun{}. These functions are inherently CPU-bound (sample-based accumulation, fasta reformatting, permutation × rarefaction × q-loop) and were the largest individual contributors to the 10-min CRAN budget. Their behaviour is documented in the corresponding vignettes. -
verify_pq()example switched fromdata_fungitodata_fungi_mini(82 s → < 5 s). - Tests:
plot_LCBD_pq()/LCBD_pq()smoke tests intests/testthat/test_figures_beta_div.Rlowerednpermfrom 100 to 9 (they only assert return class, not numeric stability). - Function defaults (
nperm,n_permutations) are unchanged.
MiscMetabar 0.16.5
-
funguild_assign()androtl_pq()examples now use\dontrun{}instead of\donttest{}. Both examples call external APIs (www.stbates.organd the Open Tree of Life respectively) that are not always reachable during CRAN’s--run-donttestcheck, causing spurious ERRORs. -
verify_tax_table()’s introductory example was moved inside the existing\donttest{}block. The call against the fulldata_fungidataset took ~70 s, which triggered the CRAN “examples > 5 s” NOTE on every check. -
XVectorremoved fromDESCRIPTIONImports. It was declared but never imported inNAMESPACEor used directly;Biostringsalready loads it transitively. CRAN flagged this as “Namespace in Imports field not imported from”. - Bibliography: corrected the DOI for Taberlet et al. (2012) “Environmental DNA” in
paper/bibliography.bib,paper/paper.bib, and the twovignettes/*.bibfiles (was the journal ISSN landing10.1002/(issn)2637-4943, now the paper DOI10.1111/j.1365-294X.2012.05542.x).README.mdand the pkgdown site regenerate accordingly.
MiscMetabar 0.16.3
-
verify_tax_table()now recognises non-breaking space (U+00A0) and other Unicode separators (em space, ideographic space, …) as border / internal whitespace. Previously the detection regex^\s|\s$(TRE) and the stripping calltrimws()only handled ASCII[ \t\r\n], so taxonomic values padded with NBSP — common in spreadsheet- or copy-paste-derived metadata — were silently kept as e.g."Archaeospora ", causing duplicate genera and broken grouping downstream. Detection now usesgrepl("^[\\s\\p{Z}]|[\\s\\p{Z}]$", val, perl = TRUE)and stripping usesgsub("^[\\s\\p{Z}]+|[\\s\\p{Z}]+$", "", val, perl = TRUE). Bothclean_pq(..., tax_remove_border_spaces = TRUE)andclean_pq(..., tax_remove_all_space = TRUE)benefit from the fix. -
verify_tax_table()gains a new check for invisible / unusual characters in taxonomic values: anything in Unicode category\p{C}(control / format / surrogate / private use / unassigned) or any\p{Z}separator other than plain ASCII space or tab. Typical offenders are NBSP (U+00A0), zero-width space (U+200B), zero-width joiner (U+200D) and C0 control characters. Three new parameters drive the check:detect_invisible_chars(defaultTRUE, warns whenverbose = TRUE),replace_invisible_chars(defaultFALSE, requiresmodify_phyloseq = TRUEto strip), andinvisible_chars_replacement(default""). Warnings/messages report each offending value with the hexadecimal code points of the offending characters so the user can see what is hiding inside the string. -
clean_pq()gainstax_replace_invisible_chars(defaultFALSE) which forwards toverify_tax_table()and strips invisible characters from the cleanedtax_table. - CRAN resubmission. Fixes the incoming-checks failure reported for 0.16.2:
write_pq()no longer passes aDNAStringSetrefseqslot directly toutils::write.table()— sequences are now coerced viaas.character()first. This avoids dispatching toas.data.frame,XStringSet-methodfrom R-devel’sdata.frame(), which now forwards an internalvalidRN = FALSEargument that the XStringSet method’s.localdoes not accept. -
Biostringsis now anImports(moved fromSuggests), so that theXVectorclasses stored indata/data_fungi*.rdaare covered byMiscMetabar’s recursive strong dependency graph. - Replaced an unreachable
ggstatsplotlink inNEWS.md(www.indrapatil.com) with the CRAN page. -
clean_pq()gains four FALSE-by-default toggles to applyverify_tax_table()modifications on the cleanedtax_table:remove_border_spaces(trim leading/trailing whitespace),remove_all_space(replace internal whitespace viareplace_space_with, default"_"),replace_to_NA(set values matchingunwanted_tax_patternstoNA; accepts a custom pattern vector), andredundant_suffix(drop redundant"_sp"tips where the genus is already filled; accepts a custom suffix string such as"_var"). Toggles can be enabled independently or combined in a single call; each modification emits a message and nothing fires when all toggles areFALSE.
MiscMetabar 0.16.1
-
cutadapt_remove_primers()gains acutadapt_argsparameter (default"") to pass additional arguments directly to cutadapt, such as"-e 0.01"to lower the maximum error rate from the cutadapt default of 10% to 1%.
MiscMetabar 0.15.2
-
hill_test_rarperm_pq(): fixed defaulttypefrom"non-parametrique"to"nonparametric"to match the documented valid values and avoid confusion. -
hill_test_rarperm_pq(): fixed example that incorrectly passedp.val = 0.9(not a valid parameter); it now usesp_val_signif = 0.9as intended. -
ggstatsplot 1.0.0 compatibility notes: ggstatsplot 1.0.0 removes
var.equal,nboot, andeffsize.typefromggbetweenstats(); if you were passing these through...toggbetween_pq()orhill_test_rarperm_pq(), they will now be silently ignored. Thepaletteargument now requires"package::palette"format (e.g.palette = "ggthemes::gdoc"), and the separatepackageargument has been removed from ggstatsplot. -
hill_bar_pq()gains five parameters:error_fun(a function returningc(lower, upper)bounds, enabling asymmetric intervals such as quantile ranges; default mean ± SE),error_fun_lab(caption label; default"mean ± SE"),error_bar_alpha(transparency of the secondary top-half error bar drawn over jittered points; default0.35),point_alpha(transparency of jittered data points; default0.7), andletters_below_bar(whenTRUE, compact letters are placed below the x-axis at a fixed position, giving a clean layout independent of data spread; defaultFALSE). Groups withNAvalues in the grouping variable now receive"n.d."letters when Tukey HSD is run, instead of being silently dropped. -
umap_pq()no longer emits a tibble.name_repairdeprecation warning when usingpkg = "umap"(fixes #134). -
hill_bar_pq()new function plotting Hill diversity bar charts (mean ±SE, jittered points, Kruskal-Wallis subtitle, optional Tukey HSD compact letter display) for one or multiple Hill orders via a patchwork layout. -
tax_bar_pq()fixes a bug wherenb_seq = FALSEwith a groupingfactwould sum binary per-sample presence values across samples sharing the same modality, inflating bar heights beyond the true OTU count. Each OTU is now counted at most once per group (present in ≥1 sample of that group), so bar segments correctly show the number of distinct OTUs in each taxonomic rank per modality. -
tax_bar_pq()gains an_sample_text_sizeparameter (default2) controlling the font size of the per-group sample count label. The(n=X)annotation is now displayed below each bar rather than appended to the group x-axis label. - New transformation/normalisation functions collected in
R/normalize_pq.R, documented in a new article (articles/normalization.html). -
css_pq()new function wrappingmetagenomeSeq::cumNorm()for Cumulative Sum Scaling normalization. -
gmpr_pq()new function implementing the Geometric Mean of Pairwise Ratios normalization (Chen et al. 2018) in pure R. -
mcknight_residuals_pq()new function computing depth-robust alpha diversity as residuals of log-richness on log-depth (McKnight 2018; Mikryukov 2023). -
rarefy_pq()new function wrappingphyloseq::rarefy_even_depth()with optional averaging overnrarefaction repetitions. -
srs_pq()new function wrappingSRS::SRS()for Scaling with Ranked Subsampling normalization. -
tmm_pq()new function wrappingedgeR::calcNormFactors(method = "TMM")for Trimmed Mean of M-values normalization. -
transform_pq()new function providing a unified interface to common count transformations (tss,hellinger,clr,rclr,log1p,z,pa,rank) viavegan::decostand(). -
vst_pq()new function wrappingDESeq2::varianceStabilizingTransformation(). -
biplot_pq()gains acolor_rankparameter (defaultNULL): when set to a taxonomic rank (e.g."Class"), bars are colored by that rank instead of by sample modality, giving a taxonomic-composition view of the biplot. The fill legend is automatically titled with the rank name. -
biplot_pq()gains ataxa_names_rankparameter (defaultNULL): when set to a taxonomic rank (e.g."Genus"), the taxon axis labels display that rank instead oftaxa_names(). Each OTU remains a separate bar regardless of shared rank values. -
biplot_pq()no longer displays “Samples” on the taxon axis; the position used for the modality name annotations is now unlabeled.
MiscMetabar 0.15.1
New features
-
unwanted_tax_patternsis a new exported named character vector of regex patterns for common problematic taxonomy values (NA-like strings,"unclassified","unknown","Incertae_sedis", empty QIIME-style ranks, etc.).verify_tax_table()now uses it as the default forreplace_to_NA, and other pqverse packages (e.g.dbpq::count_unwanted_tax()) can reuse it to keep patterns in sync.
Breaking changes
-
compare_pairs_pq(),ggbetween_pq(),hill_pq(),hill_tuckey_pq(),plot_refseq_extremity_pq(), andpsmelt_samples_pq()now usedivent::div_hill()instead ofvegan::renyi()for Hill number computation, andcompare_pairs_pq()usesdivent::ent_shannon()/divent::ent_simpson()instead ofvegan::diversity()for Shannon and Simpson indices. The default estimator is now"UnveilJ"(bias-corrected) rather than the naive plug-in estimator — diversity values will differ from previous versions. Passestimator = "naive"via...to restore old numeric behavior.
New features
-
divent_hill_matrix_pq()new exported utility to compute Hill numbers for all samples in an OTU table usingdivent::div_hill(). Accepts...to forward any argument todivent::div_hill(). -
ggbetween_pq()gains aqparameter (defaultc(0, 1, 2)) to control which Hill diversity orders are computed. One plot is produced per value. -
hill_acc_pq()gains atypeparameter ("individual"or"sample").type = "sample"computes sample-based accumulation curves by pooling samples incrementally across random permutations usingdivent::div_hill(), with a confidence ribbon. Whenmerge_sample_byis set, one curve per group is drawn on the same plot.type = "individual"preserves the previous individual-based behaviour. -
profile_hill_pq()new function wrappingdivent::profile_hill() |> autoplot()to visualize Hill diversity profiles across all orders for all samples in a phyloseq object.
Deprecated
- The
hill_scalesparameter inhill_pq(),hill_tuckey_pq(), andpsmelt_samples_pq()is deprecated in favour ofq. Useq = c(0, 1, 2)going forward.
MiscMetabar 0.14.6
Add
find_vsearch()andinstall_vsearch()to make vsearch-based functions work on all platforms including Windows.install_vsearch()downloads the vsearch binary from GitHub, andfind_vsearch()automatically locates it. All vsearch-calling functions now default tofind_vsearch()instead of a hard-coded"vsearch"path. Users can also setoptions(MiscMetabar.vsearchpath = "/path/to/vsearch")for custom installations.Add
ridges_sam_pq(), the sample-centric counterpart ofridges_pq(): each ridge represents a taxon (at a given taxonomic level) and the x-axis shows the abundance distribution across samples, colored by a sample factor.Add params
output_data_frameto functiontrack_wkflow_samples()cutadapt_remove_primers()gains averboseparameter (defaultTRUE). Setverbose = FALSEto fully silence cutadapt stdout/stderr and the completion message — unlikesuppressMessages()orcapture.output(), which cannot intercept system command output.Fix a bug in
chimera_removal_vs()where matrix dimensions were dropped when the input had only one sample (one row), causing downstream[, ...]indexing to fail with “incorrect number of dimensions”. All three subsetting branches now usedrop = FALSE.Many functions accepting a
factparameter now handle single-level factors gracefully: functions that require multiple groups (hill_pq(),hill_test_rarperm_pq(),graph_test_pq(),multipatt_pq(),ancombc_pq(),ggbetween_pq(),venn_pq(),ggvenn_pq(),upset_pq(),accu_plot(),accu_plot_balanced_modality(),plot_tsne_pq()) now emit an informative error message, while functions that can produce meaningful output with a single level (circle_pq(),sankey_pq(),are_modality_even_depth()) no longer crash.Fix a bug in
format2sintax()where thepattern_taxparameter was referenced by the wrong internal name (pattern_k), causing an error when using thetaxnamesargument.Add
reorder_distinct_colors()to reassign fill and color scales in ggplot objects so that adjacent segments have maximally different colors, with optional colorblind optimization and lightness alternation.tax_bar_pq()gainsshow_valuesandminimum_value_to_showparameters to display abundance values (or percentages whenpercent_bar = TRUE) inside bar segments.treemap_pq()now useslog10(x + 1)instead oflog10(x)so that taxa with a count of 1 are still visible. New parametersshow_na(defaultTRUE) to display NA taxa as a grey area,na_labelto customize the NA label, andmin_text_size(default0) to control the minimum font size for tile labels.biplot_pq()gainssplit_by_sample,sample_border_col, andsample_border_widthparameters. Whensplit_by_sample = TRUE, bars are stacked by sample with visible borders, showing the distribution of sequences across individual samples instead of a merged total.Add two parameters to
tax_bar_pq(), bar_internal_color to color each cells of the colored bars and linewidth_bar_internal to set the linewidth.tax_bar_pq()withlabel_taxa = TRUEnow also draws left-side labels for taxa that appear in the first bar but are absent from the last bar, making all taxa visible when usingadd_ribbon = TRUEacross a time factor. A warning is emitted when taxa only appear in intermediate levels and cannot be labelled on either side.
MiscMetabar 0.14.5
Bug fix in
normalize_prop_pqwhen taxa_are_rows(physeq) were FALSE.Improve the
verify_pq()function for cases where taxa_names or sample_names are not consistent and to test for duplicate sequences in @refseq slot.Add a function
verify_tax_table()to verify some classic issues in tax_table.Fix a bug in
aldex_pq()andplot_ordination_pq(). Also fix a bug inplot_ordination_pq()when using phyloseq object where taxa are rows.Add parameters
show_count,facet_by,growing_textandtext_sizetotreemap_pq():show_countappends raw abundance counts to labels,facet_bysplits the treemap into facets by a sample metadata column, andgrowing_text=FALSEforces all tile labels to the same font size (determined by text_size).Extend
track_wkflow_samples()to accept all input types supported bytrack_wkflow(): matrix, dada-class, derep-class, lists of dada/derep, and character vectors of fastq file paths (previously only phyloseq objects were accepted).Fix a bug for case with only one column in slot @sam_data
Fix a bug in the name of plot in the result of
hill_pq()Fix a bug in
mumu_pq()not deleting temporary file log.txt whenkeep_temporary_files=FALSEFix a bug in
adonis_pq()when using na_remove = TRUE and multiple terms in formula.Add parameter by to
adonis_pq()to choose how to compute p-values (overall model, sequential terms, marginal effects, one-degree-of-freedom contrasts). The default is now by = “terms” that will assess significance for each term.Add function
lefser_pq()to run LEfSe analysis (differential analysis) from a phyloseq object using the package lefser.Add function
aldex_pq()to run ALDEX2 analysis (differential analysis) from a phyloseq object using the package ALDEx2 and the default parameters gamma=0.5.Add the parameter
rngseedin all functions which usedphyloseq::rarefy_even_depthto set the seed for random number generator in order to increase reproducibility.Better messages (and not error) in
filter_asv_blastwhen the resulting table of OTU is emptyImprove
ancombc_pq()function by allowing custom names in the tax_levels parameter.Fix a bug in
filt_taxa_pqwhen using both min_nb_seq and min_nb_occurence parameters.
MiscMetabar 0.14.4
CRAN release: 2025-09-30
New features and improvements
Add function
plot_seq_ratio_pq()to explore the number of sequences per samples using difference ratio of the number of sequences per samples ordered by the number of sequences.Add params
discard_genus_alone,pattern_to_remove_tipandpattern_to_remove_nodetorotl_pq()to enhance the default naming of nodes and tipsImprove documentation consistency following the style guide
Allow
DNAStringSetobject as input ofswarm_clustering()andphyseq_or_string_to_dna()Add param
rank_propagationinmerge_taxa_vec()to dissable the rank propagation of NA when merging taxa. It is useful when merging taxa with informations in the tax_table slot that do not follow a strict taxonomic hierarchical structure (e.g. functional guilds).Add param
lulu_exactinmumu_pq()to force the use of the unmodified lulu algorithm (with possibles errors) thanks to the option –legacy in mumu software. Add paramextra_mumu_argstomumu_pq()to pass extra arguments to mumu software (--minimum_match,--minimum_ratio_type,--minimum_ratio,--minimum_relative_cooccurence,--threads).Add function
plot_ordination_pqto plot ordination from vegan::vegdist object (useful when using aitchison and robust aitchison distances)
Bug fixes
Fix a bug in
subset_taxa_pq()when the condition was TRUE only for one taxonFix warnings in
graph_test_pq()with ggplot2 v.4.0.0Fix a bug in
upseq_pq()when usingmin_nb_seqparameter.Fix a bug in blast function by allowing value to be equal (not strictly greater) to the threshold values
id_cut,bit_score_cut,min_cover_cutande_value_cut.Fix a bug in swarm associated functions (
swarm_clustering(), add_swarms_to_pq()) to take into account thedparameter. Also add a parameter fastidious that is automatically set to FALSE is d is different from 1.
MiscMetabar 0.14.3
CRAN release: 2025-06-21
- Better message in
subset_taxa_tax_control() - Add parameters
text_sizeandtext_size_infoto expand or minimize text annotation insummary_plot_pq(). - Add function
filt_taxa_wo_NA()to filter out taxa with NA values at given taxonomic rank(s) - Fix a bug in
format2dada2()by adding semicolons to fill all the taxonomic levels iffrom_sintaxis TRUE - Fix a bug in
adonis_pq()for methodaitchisonandrobust.aitchison.
MiscMetabar 0.14.1
CRAN release: 2025-02-19
- Add the possibility to use to resolve conflict using
resolve_vector_ranks()in theassign_sintax()function. - Add numerous parameters to
assign_sintax(), in particularvote_algorithmto choose the algo resolving conflict. - Add param
pattern_to_removeinformat2dada2()
MiscMetabar 0.14.0
- Better filter of parameters in
add_new_taxonomy_pq(). Only parameters used by the assign_* function corresponding tomethodare used. - Add functions
format2sintax(),format2dada2()andformat2dada2_speciesto format fasta database in sintax, dada2 (dada2::assignTaxonomy()) and dada2 Species (dada2::assignSpecies()) format - Add function
assign_dada2()to assign Taxonomy (with missing ranks if needed) and to assign species usingdada2::assignSpecies()with only one database input. Add methoddada2_2stepsin functionadd_new_taxonomy_pq()which useassign_dada2()function.
MiscMetabar 0.13.0
- Add function
assign_blastn()and add a methodblastin the functionadd_new_taxonomy_pq(). - Add function
resolve_vector_ranks()to resolve conflict in a vector of taxonomy values
MiscMetabar 0.12.1
CRAN release: 2025-01-29
- Add parameter name
min_bootstrapinadd_new_taxonomy_pq() - Bug fix in
assign_idtaxa() - Add parameters
pattern_to_removeandremove_NAtosimplify_taxo()
MiscMetabar 0.12.0
- Add function
assign_idtaxa()andlearn_idtaxa()to facilitate the taxonomic assignation using the idtaxa algorithm from the DECIPHER R package. - Add option
idtaxato method inadd_new_taxonomy_pq() - Add function
tbl_sum_taxtable()to summarize tax_table from a phyloseq object - In function
assign_sintax(), add paramstoo_few(default value “align_start”) andtoo_many(default “merge”) to authorize db with variable numbers of rank and parenthesis in taxonomic name,
MiscMetabar 0.11.1
- Add param
suffixtoadd_blast_info()allowing multiple use of the function on the same phyloseq object (e.g. in order to used different database) - Add param
return_DNAStringSettowrite_temp_fasta()function to return a DNAStringSet object in place of a temporary file. - Add a vignette pkgnet-report.
- Add the possibility to send fasta.gz file to
count_seq()
MiscMetabar 0.11
- Add function
filt_taxa_pq()to filter taxa based on the number of sequences/occurences - Add functions
no_legend()andhill_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
typetoridge_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 methods, different samples with same modality or different primers.
- Add functions
assign_vsearch_lca(),assign_sintax()and internal functionwrite_temp_fasta() - Add param
methodtoadd_new_taxonomy_pq()to allow the use ofdada2::assign_taxonomy()(default, precedent only method available),assign_sintax()orassign_vsearch_lca()
MiscMetabar 0.10.4
- Add functions
plot_refseq_pq()andplot_refseq_extremity_pq()to plot the proportion of each nucleotide and the diversity of nucleotides from@refseqof a phyloseq object.
MiscMetabar 0.10.3
- Add params
type,na_removeandverbosetoggvenn_pq(). The type = “nb_seq” allow to plot Venn diagram with the number of shared sequences instead of shared ASV. - Add automatic report in json for the function
cutadapt_remove_primers(). - Add param
verbosetotrack_wkflow()and improve examples fortrack_wkflow()andlist_fastq_files
MiscMetabar 0.10.2
- Improve code thanks to {lintr} package
- Add option
return_file_pathtocutadapt_remove_primers()in order to facilitate targets pipeline - Add function
sam_data_matching_names()to match and verify congruence between fastq files names and sample metadata (sam_data)
MiscMetabar 0.10.1
CRAN release: 2024-10-07
CRAN 2024-09-10
- Delete function
heat_tree_pq()because {metacoder} package is archived from CRAN.
MiscMetabar 0.9.4
- Set a seed in the example of
build_tree_pqto resubmit to CRAN Add a paramreturn_a_vectorin functionfilter_trim()to make possible to return a vector of path as it is useful when used withtargets::tar_targets(..., format="file")) - Make some storage amelioration by replacing
list()byvector(list, ...)
MiscMetabar 0.9.3
CRAN release: 2024-09-09
CRAN 2024-09-09
- Homogenize terminology replacing ASV by taxa/taxon in documentation and code
- Build an alias function
filter_taxa_blast()forfilter_asv_blast() - Build an alias function
postcluster_pq()forasv2otu() - Add param
return_data_for_vennin functionggvenn_pqin order to make more customizable plot following ggVennDiagram tutorial
BREAKING CHANGES
- Replacing misnamed param
rename_asvbyrename_taxonsinclean_pq() - Replacing misnamed param
reorder_asvbyreorder_taxonsinclean_pq()
MiscMetabar 0.9.2
- Add param
default_funin functionmerge_samples2()in order to replace the default function that change the sample data in case of merging. A useful parameter isdefault_fun=diff_fct_diff_class. - Add param
kruskal_testtohill_pq()function to prevent user to mis-interpret Tuckey HSD result (and letters) if the global effect of the tested factor on Hill diversity is non significant. - Add param
vioplotto hill_pq() function to allow violin plot instead of boxplot. - Modify
rarefy_sample_count_by_modalityto debug the case of modality with level of length one.
MiscMetabar 0.9.1
CRAN release: 2024-04-28
CRAN 2024-04-28
New functions
- Add functions
taxa_as_rows()andtaxa_as_columns()to replace verbose called toclean_pq() - Add function
ggscatt_pq()to plot and test for effect of a numerical columns in sam_data on Hill number. Its the equivalent for numerical variables ofggbetween_pq()which focus on the effect of a factor. - Add functions
var_par_pq(),var_par_rarperm_pq()andplot_var_part_pq()to compute the partition of the variation of community and plot it. It introduce the notion ofrarpermpart in the function name. It refers to the fact that this function compute permutation of samples depth rarefaction to measure the variation due to the random process in rarefaction. - Add function
hill_test_rarperm_pq()to test the effect of a factor on hill diversity accounting for the variation due to random nature of the rarefaction by sample depth. - Add function
rarefy_sample_count_by_modality()to equalize the number of samples for each levels of a modality (factor) - Add function
accu_plot_balanced_modality()to plot accumulation curves with balanced modality (same number of samples per level) and depth rarefaction (same number of sequences per sample) - Add function
adonis_rarperm_pq()to compute multiple Permanova analyses on different sample depth rarefaction. - Add function
ggaluv_pq()to plot taxonomic distribution in alluvial fashion with ggplot2 (using theggalluvialpackage) - Add function
glmutli_pq()to use automated model selection and multimodel inference with (G)LMs for phyloseq object
New parameters
- Add param
taxa_ranksin functionpsmelt_samples_pq()to group results by samples AND taxonomic ranks. - Add param
qin functionshill_tuckey_pq()andhill_p()to choose the level of the hill number. - Add param
na_removein functionhill_pq()to remove samples with NA in the factor fact.
MiscMetabar 0.8.1
- Add param
plot_with_tuckeytohill_pq()., - Add function
formattable_pq()to make beautiful table of the distribution of taxa across a modality using visualization inside in the table. - Add functions
fac2col()andtransp()to facilitate manipulation of colors, especially in functionformattable_pq() - Add functions
signif_ancombc()andplot_ancombc_pq()to plot significant results fromancombc_pq()function - Add function
distri_1_taxa()to summarize the distribution of one given taxa across level of a modality - Add function
normalize_prop_pq()to implement the method proposed by McKnight et al. 2018 - Add function
psmelt_samples_pq()to build data frame of samples information including the number of sequences (Abundance) and Hill diversity metrics. Useful to use with the ggstatsplot packages (see examples). - Replace param
variablebyfactin functionggbetween_pq()andhill_pq()(keeping the variable option inhill_pq()for backward compatibility) - Fix a bug in the class of the return object of function
chimera_removal_vs(). Now it return a matrix to be able to be parsed on todada2::getUniques()
MiscMetabar 0.7
CRAN 2024-03-08
Add functions
chimera_detection_vs()andchimera_removal_vs()to process chimera detection and removal using vsearch softwareAdd functions
filter_trim(),sample_data_with_new_names()andrename_samples()to facilitate the use of targets for bioinformatic pipeline.Add function
add_info_to_sam_data()to expand sam_data slot using a data.frame and using nb_asv and nb_seqAdd functions
swarm_clustering()andvsearch_clustering()and addswarmmethod in the functionasv2otu()Add function
physeq_or_string_to_dna()mostly for internal useAdd function
cutadapt_remove_primers()to remove primers using cutadaptAdd internal functions
is_swarm_installed(),is_cutadapt_installed(),is_vsearch_installed()andis_falco_installed()to test for the availability of external software in order to run examples and test from testthat.Submit to CRAN and change code to comply with their rules (patch 0.7.1 to 0.7.9)
Numerous examples and tests are skipped on CRAN because it spends to much time to run. Rules vignettes is updated to details the strategy for this.
BREAKING CHANGES
- Harmonization of parameters names:
-
add_nb_sequences->add_nb_seqinggvenn_pq() -
db->db_urlinget_funguild_db() -
db->db_funguildinget_funguild_db() -
file->file_pathinget_file_extension() -
n_seq->nb_seqinsubsample_fastq() -
otutable->otu_tableinlulu() -
alpha->pvalinplot_edgeR_pq()andplot_deseq2_pq()and change default value from 0.01 to more classical 0.05 -
sequences->seq2searchin functionsearch_exact_seq_pq() -
seq_names->dna_seqin functionasv2otu
-
- Removing the function
install_pkg_needed()which do not comply with CRAN policies
MiscMetabar 0.6.0
- Add function
ancombc_pq()to simplify the call toANCOMBC::ancombc2(): ANalysis of COmpositions of Microbiomes with Bias Correction 2 - Add param
taxa_names_from_physeq(default FALSE) tosubset_taxa_pq() - Add param
rarefy_by_sample(default FALSE) to functionggbetween_pq() - Add function
are_modality_even_depth()to test if samples depth significantly vary among the modalities of a factor - Add functions
merge_taxa_vec()andmerge_samples2()from the speedyseq package into MiscMetabar to decrease package dependencies (Thanks to Mike R. Mclaren) - Add function
reorder_taxa_pq()in order to replace the unique call to package MicroViz to decrease package dependencies. - Add functions
get_funguild_db()andfunguild_assign()from the FUNGuildR package into MiscMetabar to decrease package dependencies - Remove all dependencies from packages not available on CRAN or Bioconductor. Improve code using
goodpractice::gp() anddevtools::check()function - Add messages in various cases (NA in samples data, low number of sequences in samples, low number of sequences by taxa) when using
verify_pq()with argsverbose=TRUE - Fix a bug in
multitax_bar_pq()when usingnb_seq = FALSE
MiscMetabar 0.52
- Add function
ggbetween_pq()to facilitate comparison of hill number using the power ofggstatsplot::ggbetweenstats() - Add function
plot_SCBD_pq()to plot species contributions to beta diversity (SCBD) of samples
MiscMetabar 0.51
- Add function
LCBD_pq()andplot_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, 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()andplot_guild_pq()to add and plot fungal guild information from taxonomy usingFUNGuildpackage - Add function
build_phytree_pq()to build 3 phylogenetic trees (NJ, UPGMA and ML usingphangornR package) from therefseqslot of aphyloseqobject, possibly with bootstrap values. See the vignettes Tree visualization for an introduction to tree visualization usingggtreeR package.
MiscMetabar 0.5
- Phyloseq object are converted in taxa_are_columns in the
ggvenn_pq()thanks to issue #31
BREAKING CHANGES
- Rename param
log_10in functionbiplot_pq()intolog10trans - Rename param
log10transformin functioncircle_pq()intolog10trans
MiscMetabar 0.42
- Add argument
one_plot(default FALSE, same behavior than before) tohill_pqfunction in order to return an unique ggplot2 object with the four plots inside. - Add argument
correction_for_sample_size(default TRUE, same behavior than before) tohill_pqandhill_tuckey_pqfunction to allow removing any correction for uneven sampling depth. - Add function
multitax_bar_pq()to plot 3 levels of taxonomy in function of samples attributes - Add function
ridges_pq()to plot ridges of one taxonomic level in function of samples attributes - Add function
treemap_pqto plot treemap of two taxonomic levels
MiscMetabar 0.41
- Add function
iNEXT_pq()to calculate hill diversity using the iNEXT package. - Add argument
pairstomulti_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 package. - Add function
upset_test_pqto test for differences between intersections (wrapper ofComplexUpset::upset_test()forphyloseq-object). - Add info (param
add_info) in subtitle of thehill_pq()function. - Add argument
remove_spacetosimplify_taxo()function. - Add argument
simplify_taxotoclean_pq()function. - Change argument
rarefy_nb_seqbyrarefy_before_mergingand add argumentsrarefy_after_mergingandadd_nb_seqtoggvenn_pq()function. - Add arguments
rarefy_after_mergingtobiplot_pq()andupset_pq()functions. - Add argument
taxa_filltoupset_pq()function in order to fill the bar with taxonomic rank. - Add a function
subsample_fastq()to make subset of fastq files in order to test your pipeline with all samples but with a low number of reads. - Add a function
accu_samp_threshold()to compute the number of sequence to obtain a given proportion of ASV in accumulation curves (`accu_plot). - Add a function
tax_bar_pq()in order to plot taxonomic distribution across samples.
MiscMetabar 0.40
- Add function
multi_biplot_pq()to visualize a collection of couples of samples for comparison through a list ofbiplot_pq(). - Add options
add_info,na_remove, andclean_pqtoplot_tax_pq()function. - Add options
vsearch_cluster_methodandvsearch_argstootu2asv()for more detailed control of the vsearch software. - Suppression of buggy function
MM_idtaxa(). - Add a wrapper of
write_pq()calledsave_pq()to save a phyloseq object in the three possible formats () at the same time- 4 separate tables
- 1 table version
- 1 RData file
- Add a function
add_blast_info()to add information fromblast_pq()to thetax_tableslot of a phyloseq object. - Add option
keep_temporary_filesinasv2otu()function. - Improve the documentation of
asv2otu()and fix a little bug in the name of the conserved ASV afterasv2otu(). - 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 example to add taxonomic assignment from a new database. - Add a battery of test using
test_thatpackage and improve code compatibility with cran recommendations.
BREAKING CHANGES
-
asv2otu()withmethod="vsearch"change two default values (to repeat the precedent behavior, useasv2otu(..., vsearch_cluster_method = "--cluster_fast", tax_adjust = 1)):- vsearch_cluster_method = “–cluster_size”
- tax_adjust = 0
MiscMetabar 0.34
- Add option
add_nb_samplestoggvenn_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_makedbandargs_blastnto functionsblast_pq(),blast_to_phyloseq(),blast_to_derep()andfilter_asv_blast(). - Add option
rarefy_nb_seqstoggven_pq()in order to rarefy samples before plotting. - Add function
SRS_curve_pq()to plot scaling with ranked subsampling (SRS) curves using theSRS::SRS_curve()function (see citation(“SRS”) for reference). - Add option
nb_samples_infotobiplot_pq()in order to add the number of samples merged by level of factors. - Add a message when two modalities differ greatly (more than x2) in their number of sequences in
biplot_pq()andggvenn_pq(). - Add options
na_remove,dist_method(including Aitchinson and robust-Aitchinson distance),correction_for_sample_sizeandrarefy_nb_seqsoptions toadonis_pq()function. - Add option
na_removetograph_test_pq()function.
MiscMetabar 0.33
- Add function
plot_tax_pq()to plot taxonomic distribution (nb of sequences or nb of ASV) across factor. - Add option
add_pointsand make better axis ofhill_pq()function - Add function
blast_to_derep()in order to facilitate searching some fasta sequences in dereplicated sequences (obtained bydada2::derepFastq)
| Database (makeblastdb) | Sequences to blast (blastn) | |
|---|---|---|
blast_to_phyloseq() |
Built from ref_seq slot(physeq-class) |
Custom fasta file |
blast_to_derep() |
Built from dereplicate sequences (derep-class) | Custom fasta file |
blast_pq() |
Custom database or custom fasta file |
ref_seq slot of a physeq object |
- Add functions
tsne_pq()andplot_tsne_pq()to quickly visualize results of the t-SNE multidimensional analysis based on theRtsne::Rtsne()function.
MiscMetabar 0.32
- Add the possibility to select a folder in the function
count_seq() - Add functions
track_wkflow_samples()andselect_one_sample() - Add option
sam_data_firstin functionwrite_pq() - Add option
reorder_asvandrename_asvto in functionwrite_pq()andclean_pq - Add a function
rotl_pq()to build a phylogenetic tree using the ASV binomial names of a physeq object and the Open Tree of Life tree.
MiscMetabar 0.31
- Argument
split_byto make multiple plot given a variable insam_dataslot (functionggvenn_pq()) - Argument
seq_namesinasv2otu()function allow to clusterize sequences from a character vector of DNA. - Add a
blast_pq()function to blast the sequences of the@ref_seqslot against a custom database - Add a
filter_asv_blast()function to filter ASV in phyloseq dataset using blast against a custom database - Add a
subset_taxa_pq()function to filter ASV based on a named conditional vector. Used infilter_asv_blast(). - Add parameter
force_taxa_as_columns(default FALSE) andforce_taxa_as_rows(default FALSE) toclean_pq(). - Add a first version of the function
count_fastq_seq()to count sequences from fastq.gz files directly from R. - Add taxonomic info to
track_wkflow()function (parametertaxonomy_rank)
MiscMetabar 0.3
- Change some function names, mainly replacing
physeqbypk. - Improve documentation using some rules documented in the Rules vignettes.
- Add a option
sam_names()toread_pq() - Correction of
data_fungianddata_fungi_sp_knownmetadata
MiscMetabar 0.24
- Add supplementary info in summary_plot_physeq()`
- Better arguments in biplot_physeq()`)
- Add merge_sample_by argument in biplot_physeq()`
- Better documentation with more example.
- For other minors bugs fixes and addition, see the list of commits
MiscMetabar 0.23
Adapt the function
asv2otu()to IdClusters change in the DECIPHER package (commit 254100922f2093cc789d018c18a26752a3cda1e3). Then change the IdClusters function that was removed from DECIPHER to Clusterize function.Better functioning of
blast_to_phyloseq()when none query sequences are founded.Add tax_adjust argument to
asv2otu()functionAdd some functions useful for the targets package
Add a
biplot_physeq()function to visualize of two samples for comparison of physeq objectAdd an argument modality in the
tax_datatable()function to split OTU abundancy by level of the sample modalityAdd a function
multiple_share_bisamples()to help compare samples by pairsAdd a new function (
ggVenn_phyloseq()) for better venn diagram but without area calculation (usevenn_phyloseq()in this case).Add two functions helpful for beta-diversity analysis (
adonis_phyloseq()andphyseq_graph_test())
MiscMetabar 0.22
- Add badge to set the development lifecycle of each function
- Add the lulu_phyloseq function to make easy the reclustering of phyloseq object using the lulu algorithm (https://www.nature.com/articles/s41467-017-01312-x) from the lulu package.