read_csv2phyloseq: Read Simple OTU Tables into a Phyloseq Object

Description Usage Arguments Details Value Author(s) Examples

View source: R/read_csv2phyloseq.R

Description

Read simple OTU tables, mapping and taxonomy files into a phyloseq-class object.

Usage

1
2
3
4
5
6
read_csv2phyloseq(
  otu.file = NULL,
  taxonomy.file = NULL,
  metadata.file = NULL,
  sep = ","
)

Arguments

otu.file

A simple otu_table with '.csv' extension

taxonomy.file

A simple taxonomy file with '.csv' extension

metadata.file

A simple metadata/mapping file with .csv extension

sep

CSV file separator

Details

Simple OTU tables, mapping and taxonomy files will be converted to phyloseq-class.

Value

phyloseq-class object.

Author(s)

Sudarshan A. Shetty sudarshanshetty9@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# NOTE: the system.file command reads these example files from the
# microbiome R package. To use your own local files, simply write
# otu.file <- "/path/to/my/file.csv" etc.

#otu.file <-
#   system.file("extdata/qiita1629_otu_table.csv",
#   package='microbiome')

#tax.file <- system.file("extdata/qiita1629_taxonomy_table.csv",
#        package='microbiome')

#meta.file <- system.file("extdata/qiita1629_mapping_subset.csv",
#     package='microbiome')

#p0 <- read_csv2phyloseq(
#        otu.file=otu.file, 
#        taxonomy.file=tax.file, 
#        metadata.file=meta.file)

Example output

Loading required package: phyloseq
Loading required package: ggplot2

microbiome R package (microbiome.github.com)
    


 Copyright (C) 2011-2020 Leo Lahti, 
    Sudarshan Shetty et al. <microbiome.github.io>


Attaching package:microbiomeThe following object is masked frompackage:ggplot2:

    alpha

The following object is masked frompackage:base:

    transform

microbiome documentation built on Nov. 8, 2020, 5:08 p.m.