add_new_taxonomy_pq: Add new taxonomic rank to a phyloseq object.

View source: R/dada_phyloseq.R

add_new_taxonomy_pqR Documentation

Add new taxonomic rank to a phyloseq object.

Description

lifecycle-experimental

One of main use of this function is to add taxonomic assignment from a new database.

Usage

add_new_taxonomy_pq(
  physeq,
  ref_fasta,
  suffix = NULL,
  method = c("dada2", "sintax", "lca", "idtaxa", "blastn", "dada2_2steps"),
  trainingSet = NULL,
  min_bootstrap = NULL,
  ...
)

Arguments

physeq

(required): a phyloseq-class object obtained using the phyloseq package.

ref_fasta

(required) A link to a database. passed on to dada2::assignTaxonomy.

suffix

(character) The suffix to name the new columns. If set to NULL (the default), the basename of the file reFasta is used with the name of the method. Set suffix to "" in order to remove any suffix.

method

(required, default "dada2") :

  • "dada2": dada2::assignTaxonomy()

  • "dada2_2step": assign_dada2()

  • "sintax": see assign_sintax()

  • "lca": see assign_vsearch_lca()

  • "idtaxa": see assign_idtaxa()

  • "blastn": see assign_blastn()

trainingSet

see assign_idtaxa(). Only used if method = "idtaxa". Note that if trainingSet is not NULL, the ref_fasta is overwrite by the trainingSet parameter. To customize learning parameters of the idtaxa algorithm you must use trainingSet computed by the function learn_idtaxa().

min_bootstrap

(Float [0:1])

Minimum bootstrap value to inform taxonomy. For each bootstrap below the min_bootstrap value, the taxonomy information is set to NA.

Correspond to parameters :

  • dada2 & dada2_2step: minBoot, default value = 0.5

  • sintax: min_bootstrap, default value = 0.5

  • lca: id, default value = 0.5. Note in that case, the bootstrap value is different. See the id parameter in assign_vsearch_lca()

  • idtaxa: threshold, default value = 0.6

  • blastn: This method do not take different bootstrap value. You may use method="vote" with different vote_algorithm as well as different filters parameters (min_id, min_bit_score, min_cover and min_e_value)

...

Additional arguments passed on to the taxonomic assignation method.

Value

A new phyloseq-class object with a larger slot tax_table"

Author(s)

Adrien Taudière

See Also

dada2::assignTaxonomy(), assign_sintax(), assign_vsearch_lca(), assign_sintax(), assign_blastn(), assign_dada2()

Examples

## Not run: 
ref_fasta <- system.file("extdata",
  "mini_UNITE_fungi.fasta.gz",
  package = "MiscMetabar", mustWork = TRUE
)
add_new_taxonomy_pq(data_fungi_mini, ref_fasta, method = "dada2")
add_new_taxonomy_pq(data_fungi_mini, ref_fasta, method = "dada2_2steps")
add_new_taxonomy_pq(data_fungi_mini, ref_fasta, method = "lca")
add_new_taxonomy_pq(data_fungi_mini, ref_fasta, method = "idtaxa")
add_new_taxonomy_pq(data_fungi_mini, ref_fasta, method = "blastn")
add_new_taxonomy_pq(data_fungi_mini, ref_fasta, method = "blastn", method = "top-hit")

## End(Not run)

adrientaudiere/MiscMetabar documentation built on Feb. 22, 2025, 10:47 a.m.