VhgAddPhylum {Virusparies} | R Documentation |
VhgAddPhylum adds a Phylum
column to the provided VirusHunter or VirusGatherer hittable,
with each entry in the column reflecting the phylum name derived from the groupby
column for each observation.
VhgAddPhylum(file, groupby = "best_query")
file |
A data frame containing VirusHunter or VirusGatherer hittable results. |
groupby |
(optional): A character specifying the column containing the groups (default: "best_query"). Note: Gatherer hittables do not have a "best_query" column. Please provide an appropriate column for grouping. |
Hittable with Phylum column
Sergej Ruff
VirusHunterGatherer is available here: https://github.com/lauberlab/VirusHunterGatherer.
path <- system.file("extdata", "virushunter.tsv", package = "Virusparies")
vh_file <- ImportVirusTable(path)
vh_file_filtered <- VhgPreprocessTaxa(vh_file,"Family")
processed_taxa <- VhgAddPhylum(vh_file_filtered,"ViralRefSeq_taxonomy")
print(unique(processed_taxa$Phylum))