Skip to content

Commit

Permalink
Merge pull request #216 from plasde/patch-1
Browse files Browse the repository at this point in the history
added sep argument in read_biom2phyloseq.R
  • Loading branch information
antagomir committed Aug 4, 2023
2 parents 62f0512 + 32d2591 commit 4202f6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/read_biom2phyloseq.R
Expand Up @@ -7,6 +7,8 @@
#' @param taxonomy.file NULL the latest version has taxonomic information
#' within the biom
#' @param metadata.file A simple metadata/mapping file with .csv extension
#' @param sep Separator of the metadata file in case it isn't comma-delimited.
#' Default is ","
#' @param ... Arguments to pass for import_biom
#' @return \code{\link{phyloseq-class}} object.
#' @export
Expand All @@ -20,7 +22,7 @@
#' @author Sudarshan A. Shetty \email{sudarshanshetty9@@gmail.com}
#' @keywords utilities
read_biom2phyloseq <- function(biom.file = NULL,
taxonomy.file = NULL, metadata.file = NULL, ...)
taxonomy.file = NULL, metadata.file = NULL, sep = ",", ...)
{

if (is.null(biom.file)) {return(NULL)}
Expand All @@ -34,7 +36,7 @@ read_biom2phyloseq <- function(biom.file = NULL,

if (!is.null(metadata.file)) {
map <- read.csv(metadata.file,
check.names = FALSE, row.names = 1)
check.names = FALSE, row.names = 1, sep = sep)
s.map <- sample_data(map)
phyobj <- merge_phyloseq(otu_biom,
s.map)
Expand Down
4 changes: 4 additions & 0 deletions man/read_biom2phyloseq.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4202f6b

Please sign in to comment.