Skip to content

Commit 2a98133

Browse files
Merge pull request #108 from adrientaudiere/dev
v 0.12
2 parents 193e6aa + 489edaf commit 2a98133

File tree

248 files changed

+11350
-816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+11350
-816
lines changed

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: MiscMetabar
22
Type: Package
33
Title: Miscellaneous Functions for Metabarcoding Analysis
4-
Version: 0.11.0
4+
Version: 0.12.0
55
Authors@R: person("Adrien", "Taudière", email = "adrien.taudiere@zaclys.net",
66
role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0003-1088-1182"))
77
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) <doi:10.21105/joss.06038>.
@@ -55,10 +55,11 @@ Suggests:
5555
networkD3,
5656
pak,
5757
patchwork,
58+
pbapply,
5859
permute,
5960
phangorn,
6061
phyloseqGraphTest,
61-
pbapply,
62+
pkgnet,
6263
plotly,
6364
plyr,
6465
reshape2,

NAMESPACE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export(all_object_size)
1919
export(ancombc_pq)
2020
export(are_modality_even_depth)
2121
export(as_binary_otu_table)
22+
export(assign_idtaxa)
2223
export(assign_sintax)
2324
export(assign_vsearch_lca)
2425
export(asv2otu)
@@ -71,6 +72,7 @@ export(is_mumu_installed)
7172
export(is_swarm_installed)
7273
export(is_vsearch_installed)
7374
export(krona)
75+
export(learn_idtaxa)
7476
export(list_fastq_files)
7577
export(lulu)
7678
export(lulu_phyloseq)
@@ -137,6 +139,7 @@ export(taxa_as_columns)
137139
export(taxa_as_rows)
138140
export(taxa_only_in_one_level)
139141
export(tbl_sum_samdata)
142+
export(tbl_sum_taxtable)
140143
export(track_wkflow)
141144
export(track_wkflow_samples)
142145
export(transp)

NEWS.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
# MiscMetabar 0.11 (in development)
1+
# MiscMetabar 0.2.0 (in development)
2+
3+
- Add function [assign_idtaxa()] and [learn_idtaxa()] to facilitate the taxonomic assignation using the idtaxa algorithm from the DECIPHER R package.
4+
- Add option `idtaxa` to method in [add_new_taxonomy_pq()]
5+
- Add function [tbl_sum_taxtable()] to summarize tax_table from a phyloseq object
6+
- In function [assign_sintax()], add params `too_few` (default value "align_start") and `too_many` (default "merge") to authorize db with variable numbers of rank and parenthesis in taxonomic name,
7+
8+
9+
# MiscMetabar 0.11.1 (in development)
10+
11+
- Add param `suffix` to `add_blast_info()` allowing multiple use of the function on the same phyloseq object (e.g. in order to used different database)
12+
- Add param `return_DNAStringSet` to `write_temp_fasta()` function to return a DNAStringSet object in place of a temporary file.
13+
- Add a vignette pkgnet-report.
14+
- Add the possibility to send fasta.gz file to `count_seq()`
15+
16+
# MiscMetabar 0.11
217

318
- Add function `filt_taxa_pq()` to filter taxa based on the number of sequences/occurences
419
- Add functions `no_legend()` and `hill_curves_pq()` to plot hill diversity accumulation curves for phyloseq
520
- Add function `umap_pq()` to compute Dimensionality Reduction with UMAP
621
- Add function `plot_complexity_pq()` to plot kmer complexity of references sequences of a phyloseq object
722
- Add param `type` to `ridge_pq()` to plot a cumulative version (type="ecdf") version of ridge
8-
- 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 method, different samples with same modality or different primers.
23+
- 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.
924
- Add functions [assign_vsearch_lca()], [assign_sintax()] and internal function [write_temp_fasta()]
1025
- Add param `method` to `add_new_taxonomy_pq()` to allow the use of [dada2::assign_taxonomy()] (default, precedent only method available), [assign_sintax()] or [assign_vsearch_lca()]
1126

R/MiscMetabar-package.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ if (getRversion() >= "2.15.1") {
2727
"X1_lim1", "X1_lim2", "aicc", "variable", "pos_letters", "alluvium",
2828
"na_remove", "stratum", "to_lodes_form", "clean_fastq", "clean_sam",
2929
"samples_names_common", "seq_id", "alpha_hill", "Modality", "Type", "complexity",
30-
"value_bootstrap"
30+
"value_bootstrap", "LearnTaxa", "OrientNucleotides", "RemoveGaps",
31+
"method", "readDNAStringSet"
3132
))
3233
}
3334

R/blast.R

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,8 @@ blast_to_derep <- function(derep,
630630
#' @inheritParams clean_pq
631631
#' @param fasta_for_db path to a fasta file to make the blast database
632632
#' @param silent (logical) If true, no message are printing.
633+
#' @param suffix (character) The suffix to name the new columns.
634+
#' Set the suffix to "" in order to remove any suffix.
633635
#' @param ... Other arguments passed on to [blast_pq()] function.
634636
#' @return A new \code{\link[phyloseq]{phyloseq-class}} object with more information in tax_table based on a
635637
#' blast on a given database
@@ -638,21 +640,27 @@ blast_to_derep <- function(derep,
638640
#'
639641
#' @author Adrien Taudière
640642

641-
add_blast_info <- function(physeq, fasta_for_db, silent = FALSE, ...) {
643+
add_blast_info <- function(physeq, fasta_for_db, silent = FALSE, suffix = "blast_info", ...) {
642644
verify_pq(physeq)
643645
res_blast <- blast_pq(physeq,
644646
fasta_for_db = fasta_for_db,
645-
unique_per_seq = TRUE, score_filter = FALSE, ...
647+
unique_per_seq = TRUE,
648+
score_filter = FALSE,
649+
...
646650
)
647651
new_physeq <- physeq
648652

649-
new_physeq@tax_table <- tax_table(cbind(
653+
new_taxtab <- cbind(
650654
new_physeq@tax_table,
651655
as.matrix(res_blast[match(
652656
taxa_names(new_physeq),
653657
res_blast$`Query name`
654658
), ])
655-
))
659+
)
660+
661+
# colnames(new_taxtab) <- c(colnames(new_physeq@tax_table), paste0(colnames(physeq), suffix))
662+
663+
new_physeq@tax_table <- tax_table(new_taxtab)
656664

657665
verify_pq(new_physeq)
658666
if (!silent) {

0 commit comments

Comments
 (0)