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 thephyloseq
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 functionlearn_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.5sintax:
min_bootstrap
, default value = 0.5lca:
id
, default value = 0.5. Note in that case, the bootstrap value is different. See the id parameter inassign_vsearch_lca()
idtaxa:
threshold
, default value = 0.6blastn: 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"
Examples
if (FALSE) { # \dontrun{
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")
# blastn doesn't work with fasta.gz format
ref_fasta <- system.file("extdata",
"100_sp_UNITE_sh_general_release_dynamic_sintax.fasta",
package = "MiscMetabar", mustWork = TRUE
)
dp <- add_new_taxonomy_pq(data_fungi_mini, ref_fasta,
method = "blastn", min_id = 80, min_cover = 50, min_bit_score = 20,
min_e_value = 1e-20
)
dp_tophit <- add_new_taxonomy_pq(data_fungi_mini, ref_fasta,
method = "blastn", min_id = 80, min_cover = 50, min_bit_score = 20,
min_e_value = 1e-20, method_algo = "top_hit"
)
} # }