Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
btmonier committed Aug 3, 2021
2 parents c9ac72a + 2124b5b commit 4f6b2c5
Show file tree
Hide file tree
Showing 14 changed files with 97 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.httr-oauth
rTASSEL_log
vignettes/*.log
vignettes/figure/


## R projects ----
Expand Down
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Imports:
Suggests:
BiocStyle,
knitr,
magrittr,
rmarkdown,
testthat
SystemRequirements: Java (>= 8.0)
Expand Down
2 changes: 1 addition & 1 deletion R/AnalysisPhylogenyFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' \code{Neighbor_Joining}.
#'
#' @return Returns a \code{phylo} tree object. See the
#' \link[ape]{https://cran.r-project.org/web/packages/ape/ape.pdf} package
#' [ape]{https://cran.r-project.org/web/packages/ape/ape.pdf} package
#' for further details.
#'
#' @importFrom ape read.tree
Expand Down
38 changes: 30 additions & 8 deletions R/ClassTasselDistanceMatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ setMethod(
#' @description Coerces an object of class \code{TasselDistanceMatrix} to
#' a \code{matrix} object.
#'
#' @param object An object of \code{TasselDistanceMatrix} class.
#' @param x An object of \code{TasselDistanceMatrix} class.
#' @param ... Additional arguments to be passed to or from methods.
#'
#' @export
as.matrix.TasselDistanceMatrix <- function(object) {
tmp1 <- unlist(strsplit(object@jDistMatrix$toStringTabDelim(), split = "\n"))
as.matrix.TasselDistanceMatrix <- function(x, ...) {
tmp1 <- unlist(strsplit(x@jDistMatrix$toStringTabDelim(), split = "\n"))
tmp2 <- strsplit(tmp1, split = "\t")
tmp3 <- t(simplify2array(tmp2))
colnames(tmp3) <- as.character(unlist(tmp3[1, ]))
Expand All @@ -84,6 +85,8 @@ as.matrix.TasselDistanceMatrix <- function(object) {
#'
#' @description Retrieves dimensions of a \code{TasselDistanceMatrix} object
#' as a vector (e.g. \code{c(10, 10)}).
#'
#' @param x An object of class \code{TasselDistanceMatrix}.
setMethod(
f = "dim",
signature = "TasselDistanceMatrix",
Expand All @@ -92,6 +95,12 @@ setMethod(
}
)

#' @title Column names
#'
#' @description Get column names of a \code{TasselDistanceMatrix} object.
#'
#' @param x An object of class \code{TasselDistanceMatrix}.
#'
#' @export
setMethod(
f = "colnames",
Expand All @@ -102,6 +111,12 @@ setMethod(
)


#' @title Row names
#'
#' @description Get row names of a \code{TasselDistanceMatrix} object.
#'
#' @param x An object of class \code{TasselDistanceMatrix}.
#'
#' @export
setMethod(
f = "rownames",
Expand All @@ -112,6 +127,12 @@ setMethod(
)


#' @title Number of columns
#'
#' @description Get number of columns of a \code{TasselDistanceMatrix} object.
#'
#' @param x An object of class \code{TasselDistanceMatrix}.
#'
#' @export
setMethod(
f = "ncol",
Expand All @@ -122,6 +143,12 @@ setMethod(
)


#' @title Number of rows
#'
#' @description Get number of rows of a \code{TasselDistanceMatrix} object.
#'
#' @param x An object of class \code{TasselDistanceMatrix}.
#'
#' @export
setMethod(
f = "nrow",
Expand All @@ -132,8 +159,3 @@ setMethod(
)







6 changes: 4 additions & 2 deletions man/as.matrix.TasselDistanceMatrix.Rd

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

14 changes: 14 additions & 0 deletions man/colnames-TasselDistanceMatrix-method.Rd

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

2 changes: 1 addition & 1 deletion man/createTree.Rd

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

3 changes: 3 additions & 0 deletions man/dim-TasselDistanceMatrix-method.Rd

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

14 changes: 14 additions & 0 deletions man/ncol-TasselDistanceMatrix-method.Rd

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

14 changes: 14 additions & 0 deletions man/nrow-TasselDistanceMatrix-method.Rd

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

14 changes: 14 additions & 0 deletions man/rownames-TasselDistanceMatrix-method.Rd

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

Binary file removed vignettes/figure/graphics-unnamed-chunk-32-1.png
Binary file not shown.
Binary file removed vignettes/figure/graphics-unnamed-chunk-33-1.png
Binary file not shown.
Binary file removed vignettes/figure/graphics-unnamed-chunk-34-1.png
Binary file not shown.

0 comments on commit 4f6b2c5

Please sign in to comment.