Skip to content

Commit

Permalink
Merge pull request #48 from waldronlab/writeGMT
Browse files Browse the repository at this point in the history
pass arguments from writeGMT to cat.
  • Loading branch information
lwaldron authored Sep 4, 2023
2 parents cbd2006 + cb1101c commit 4a91558
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: bugsigdbr
Version: 1.7.6
Version: 1.7.7
Title: R-side access to published microbial signatures from BugSigDB
Authors@R: c(
person(given = "Ludwig",
Expand Down
5 changes: 3 additions & 2 deletions R/getSignatures.R
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ extractTaxLevel <- function(sig,
#' @param sigs A list of microbe signatures (character vectors of taxonomic
#' IDs).
#' @param gmt.file character. Path to output file in GMT format.
#' @param ... Arguments passed on to cat()
#' @return none, writes to file.
#' @references
#' GMT file format:
Expand All @@ -320,7 +321,7 @@ extractTaxLevel <- function(sig,
#' writeGMT(sigs, gmt.file = "signatures.gmt")
#' file.remove("signatures.gmt")
#' @export
writeGMT <- function(sigs, gmt.file) {
writeGMT <- function(sigs, gmt.file, ...) {
# collapse set members to one tab separated string
gs.strings <- vapply(sigs,
function(x) paste(x, collapse = "\t"),
Expand All @@ -337,7 +338,7 @@ writeGMT <- function(sigs, gmt.file) {
all.str <- paste(all, "\n", sep = "")

# write in gmt format
cat(all.str, file = gmt.file, sep = "")
cat(all.str, file = gmt.file, sep = "", ...)
}

.extractSigs <- function(sigdf, tax.id.type, tax.level, exact.tax.level)
Expand Down
4 changes: 3 additions & 1 deletion man/writeGMT.Rd

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

0 comments on commit 4a91558

Please sign in to comment.