This repository contains the R package CuPhyR (Custom Phyloseq R package). The package gives customized shortcuts for interacting with phyloseq class objects generated with the Phyloseq package by Paul J. McMurdie. Since it is tested and developed with ASV data from the dada2 package by Bejamin Callahan, the function names are referring to ASVs instead of 'taxa' (phyloseq terminology).
The package is in early development. Use at your own risk, feedback welcome!
Install the package from the GitHub repository using devtools:
library(devtools)
devtools::install_github("simeross/cuphyr")
This function extracts the top n most abundant taxonomic terms at a given level. It uses dplyr to calculate the most abundant elements. Output_format will take "ps" or "tops" and either return the phyloseq object or a character vector of the n most common terms. Ignores NA's by default but can show them (see parameters).
A function to list ASVs belonging to a set of taxonomic terms
A function that ranks all samples in a phyloseq object by the sum of reads assigned to all ASVs in that sample (Abundance sum/Total ASV counts)
This funtion defines the leaf with the longest path as the root of the phylogenetic tree. This makes results reproducible by avoiding the behaviour of some functions that would otherwise pick a random leaf as the root of an unrooted phylogenetic tree. Based on answers on joey711/phyloseq/issues/597. The function requires the packages 'ape' and 'data.table' to be installed.
Summarize the total number of ASVs, number of ASVs in a subset and percentage of reads this ASV subset contains (of total) of a given phyloseq object.
These packages have to be installed for CuPhyR to work properly. Except for phyloseq, all packages are distributed through CRAN and should be installed automatically.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.