MakeExcelReport: Function to automatically generate the Excel-export OTU table

Description Usage Arguments Value Examples

View source: R/MakeExcelReport.R

Description

This function uses a shared file (i.e. a mothur-formatted OTU contingency table),a taxonomy file (i.e. an RDP naive bayesian fixed-rank asignment detail) and an optional fasta file with representative sequences for every OTU as well as an optional metadata file to be merged into the CMET style "Excel-report". Currently the metadata file is not being made use of and the option to use multiple taxonomy references is also to be implemented at a later date.

Usage

1
2
3
4
5
6
7
MakeExcelReport(
  shared,
  taxonomy,
  otureps = NULL,
  metadata = NULL,
  resultfn = "Results.xlsx"
)

Arguments

shared

file location string for the shared file (preferably absolute path)

taxonomy

file location string for the taxonomy file (preferably absolute path)

otureps

optional file location for the respresentative fasta file ( preferably absolute path)

metadata

optional file location for the metadata.xlsx file (preferably absolute path)

resultfn

desired filename/path (absolute) for the resulting Excel report. Defaults to Results.xlsx in the current working directory.

Value

A dataframe with the contents of the excel file that was written

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Example without otureps
# make sure library(CMETNGS) is loaded
shareddataset <- system.file("extdata","large_shared_file.shared",
                              package = "CMETNGS",mustWork = TRUE)
taxonomydataset <- system.file("extdata","large_OTU_basedtax.taxonomy",
                              package = "CMETNGS",mustWork = TRUE)
reptworeps <- MakeExcelReport(shareddataset,taxonomydataset)

## Example with otureps
oturepsdataset <- system.file("extdata","large_otureps.fasta",
                              package="CMETNGS",mustWork=TRUE)
reptwreps <- MakeExcelReport(shareddataset,taxonomydataset,oturepsdataset,
 resultfn="ResultsOTUreps.xlsx")

CMET-UGent/CMETNGS documentation built on Dec. 12, 2020, 8:22 a.m.