Skip to content

Commit

Permalink
formatted for line length
Browse files Browse the repository at this point in the history
  • Loading branch information
microsud committed Jul 17, 2017
1 parent 423596a commit c9ad178
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions R/read_phyloseq.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
#' The simple format refers to the set of CSV files written by the
#' \code{\link{write_phyloseq}} function.
#' @examples \dontrun{
#' pseq <- read_phyloseq(otu.file=NULL, taxonomy.file=NULL,
#' metadata.file=NULL, type=c('mothur', 'simple', 'biom'))
#' pseq <- read_phyloseq(otu.file=NULL,
#' taxonomy.file=NULL,
#' metadata.file=NULL,
#' type=c('mothur', 'simple', 'biom'))
#' }
#' @seealso write_phyloseq
#' @author Sudarshan A. Shetty \email{sudarshanshetty9@@gmail.com}
Expand All @@ -25,11 +27,17 @@ read_phyloseq <- function(otu.file=NULL, taxonomy.file=NULL,
# TODO add automated recognition of the type?

if (type == "mothur") {
pseq <- read_mothur2phyloseq(otu.file, taxonomy.file, metadata.file)
pseq <- read_mothur2phyloseq(otu.file,
taxonomy.file,
metadata.file)
} else if (type == "simple") {
pseq <- read_csv2phyloseq(otu.file, taxonomy.file, metadata.file)
pseq <- read_csv2phyloseq(otu.file,
taxonomy.file,
metadata.file)
} else if (type == "biom") {
pseq <- read_biom2phyloseq(otu.file, taxonomy.file, metadata.file)
pseq <- read_biom2phyloseq(otu.file,
taxonomy.file,
metadata.file)
} else {
stop("Unrecognized type in read_phyloseq input. Exiting.")
}
Expand Down

0 comments on commit c9ad178

Please sign in to comment.