Description Usage Arguments Value Examples
View source: R/load_edge_assignment.R
Efficiently loads an EDGE-produced taxonomic assignment from a file. An assumption has been made – since EDGE tables are generated in an automated fashion, they should be properly formatted – thus the code doesn't check for any inconsistencies except for the very file existence. Note however, the unassigned to taxa entries are removed. This implementation fully relies on the fread function from data.table package gaining performance over traditional R techniques.
1 | load_edge_assignment(filepath, type)
|
filepath |
the path to EDGE-generated tab-delimited taxonomy assignment file. |
type |
the assignment type. Following types are recognized: 'bwa', 'diamond', 'gottcha', 'gottcha2', 'kraken', 'metaphlan', and 'pangia'. |
a data frame containing four columns: TAXA, LEVEL, COUNT, and ABUNDANCE, representing taxonomically anchored sequences from the sample.
1 2 3 4 5 6 | pa_fpath <- system.file("extdata", "HMP_even//allReads-pangia.list.txt", package="MetaComp")
pangia_assignment = load_edge_assignment(pa_fpath, type = "pangia")
table(pangia_assignment$LEVEL)
pangia_assignment[pangia_assignment$LEVEL == "phylum",]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.