parse_taxonomy_amptk_batch: Parse multiple taxonomy strings from AMPtk.

View source: R/parse_amptk_taxonomy_table.R

parse_taxonomy_amptk_batchR Documentation

Parse multiple taxonomy strings from AMPtk.

Description

Parse multiple taxonomy strings from AMPtk.

Usage

parse_taxonomy_amptk_batch(x, withID = TRUE, multithread = FALSE)

Arguments

x

Vector of character strings from AMPtk taxonomy

withID

Logical; set to TRUE (default) if charter strings contain sequence IDs

multithread

Logical; run the function in parallel

Details

This function splits AMPtk (ex-UFITS) result of taxonomic annotation by taxonomic rank and combines it into one table. The first part of taxonomy string is assumed to be an ID of the best hit (e.g., EF040844) or a taxonomic classificator (UTAX or SINTAX) followed by a semicolon.

Value

Data frame with OTUs or species as rows and their taxonomic ranks as columns.

References

AMPtk: Amplicon ToolKit for NGS data (formally UFITS): https://github.com/nextgenusfs/amptk

See Also

parse_taxonomy_amptk parse_taxonomy_qiime

Examples

## Taxonomy with sequence ID
tax <- c(
"UDB011192;k:Fungi,p:Basidiomycota,c:Agaricomycetes,o:Russulales,f:Russulaceae,g:Russula,s:Russula chloroides",
"SINTAX;k:Fungi,p:Chytridiomycota,c:Chytridiomycetes,o:Rhizophydiales",
"EF040844;k:Fungi,p:Basidiomycota,c:Agaricomycetes,o:Atheliales,f:Atheliaceae,g:Piloderma",
"EU240039;k:Fungi,p:Zygomycota,o:Mortierellales,f:Mortierellaceae,g:Mortierella",
"UTAX;k:Fungi,p:Basidiomycota,c:Agaricomycetes,o:Atheliales,f:Atheliaceae,g:Amphinema,s:Amphinema byssoides",
"SINTAX;k:Fungi,p:Chytridiomycota,c:Chytridiomycetes,o:Spizellomycetales"
)

parse_taxonomy_amptk_batch(tax)

## Taxonomy without sequence ID
tax2 <- c(
"k:Fungi,p:Basidiomycota,c:Agaricomycetes,o:Russulales,f:Russulaceae,g:Russula,s:Russula chloroides",
"k:Fungi,p:Chytridiomycota,c:Chytridiomycetes,o:Rhizophydiales",
"k:Fungi,p:Basidiomycota,c:Agaricomycetes,o:Atheliales,f:Atheliaceae,g:Piloderma",
"k:Fungi,p:Zygomycota,o:Mortierellales,f:Mortierellaceae,g:Mortierella",
"k:Fungi,p:Basidiomycota,c:Agaricomycetes,o:Atheliales,f:Atheliaceae,g:Amphinema,s:Amphinema byssoides",
"k:Fungi,p:Chytridiomycota,c:Chytridiomycetes,o:Spizellomycetales"
)

parse_taxonomy_amptk_batch(tax2, withID = FALSE)


vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.