knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
ngsLCA R package provides functionality for processing lca files generated by the ngsLCA main program and illustrating the taxonomic profiles.
Install the released version of ngsLCA from CRAN with:
install.packages("ngsLCA")
Install the released version of ngsLCA from github with:
remotes::install_github("wyc661217/ngsLCA")
or:
devtools::install_github("wyc661217/ngsLCA")
Running ngsLCA R package (and this workflow) requires all lca files to be processed being placed in a folder as input, with each input lca file normally representing a sample. This example workflow will run through all ngsLCA R functions. The output files and results will be generated into "Desktop/project_files/lca_files/run03".
Define work directory and name of the run:
library(ngsLCA) working_directory="Desktop/project_files/lca_files/" #change it to the path of your lca files folder. run_name="run03"
Generate a complete taxa profile by combining all input lca files (this step is required for running all other functions):
ngsLCA_profile(path=working_directory, run=run_name, metadata="Desktop/project_files/sample_metadata.txt") #change it to the full path of your sample metadata.
Filter the combined taxa profile:
ngsLCA_filter(path=working_directory, run=run_name, remove.taxa="1115501,10114", #taxa ID indicate taxa that will be removed from the results. threshold.1=2, threshold.2=0, threshold.3=5)
De-contaminate the combined taxa profile:
ngsLCA_deContam(path=working_directory, run=run_name, control_path="Desktop/project_files/blank_control_lca_files/", #change it to the full path of your blank control lca files folder. threshold.1_control=2, threshold.2_control=0, threshold.3_control=5)
Group taxa into user-defined taxa groups:
ngsLCA_group(path=working_directory, run=run_name, group.name="Viruses,Archaea,Bacteria,Fungi,Viridiplantae,Metazoa", threshold.perGroup=0)
Classify taxa to taxonomic ranks:
ngsLCA_rank(path=working_directory, run=run_name, rank.name="species,genus,family")
Count reads and taxa numbers:
ngsLCA_count(path=working_directory, run=run_name)
Generate files that can be inputted into Megan for taxa profiling:
ngsLCA_meganFile(path=working_directory, run=run_name)
Generate taxa abundance heatmaps:
ngsLCA_heatmap(path=working_directory, run=run_name, taxa.number=30)
Generate taxa abundance barplots:
ngsLCA_barplot(path=working_directory, run=run_name, taxa.number=20)
Perform rarefaction on taxa reads abundance:
ngsLCA_rarefy(path=working_directory, run=run_name)
Perform taxa profiles NMDS:
ngsLCA_NMDS(path=working_directory, run=run_name, dimension=2, trymax=10)
Generate taxa abundance stratplots:
ngsLCA_stratplot(path=working_directory, run=run_name, taxa.number=20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.