Minor changes for clean check

This commit is contained in:
Waldir Leoncio 2021-08-23 14:34:20 +02:00
parent cabb3318dd
commit db760fe899
7 changed files with 22159 additions and 6 deletions

View file

@ -41,4 +41,5 @@ RoxygenNote: 7.1.1
Suggests:
testthat (>= 2.1.0)
Imports:
methods
methods,
ape

View file

@ -50,7 +50,10 @@ export(uigetfile)
export(uiputfile)
export(writeMixtureInfo)
import(utils)
importFrom(ape,as.DNAbin)
importFrom(ape,read.FASTA)
importFrom(methods,is)
importFrom(stats,runif)
importFrom(stats,sd)
importFrom(utils,read.delim)
importFrom(utils,write.table)

View file

@ -3,6 +3,7 @@
#' @details For a list of global variables, check the \code{globals.R} file.
#' @param g the global variable in quesiton.
#' @return TRUE if the variable still contains its original values, FALSE otherwise.
#' @importFrom stats sd
#' @author Waldir Leoncio
isGlobalEmpty <- function(g) {
return(sum(g) == 0 & sd(g) == 0)

View file

@ -9,11 +9,12 @@
#' @return A character matrix with filtered SNP data
#'
#' @examples
#' msa <- system.file("extdata", "seqs.fa", package = "rhierbaps")
#' msa <- system.file("ext", "seqs.fa", package="rBAPS")
#' snp.matrix <- load_fasta(msa)
#'
#' @author Gerry Tonkin-Hill
#' @seealso rhierbaps::load_fasta
#' @importFrom ape read.FASTA as.DNAbin
#' @export
load_fasta <- function(msa, keep.singletons=FALSE) {

22145
inst/ext/seqs.fa Normal file

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@ Loads a fasta file into matrix format ready for
running the hierBAPS algorithm.
}
\examples{
msa <- system.file("extdata", "seqs.fa", package = "rhierbaps")
msa <- system.file("ext", "seqs.fa", package="rBAPS")
snp.matrix <- load_fasta(msa)
}

View file

@ -2,12 +2,14 @@ context("Auxiliary functions to greedyMix")
# Defining the relative path to current inst ------------- #
if (interactive()) {
path_inst <- "../../inst/ext/"
path_inst <- "../../inst/ext/BAPS_format_clustering_diploid.txt"
} else {
path_inst <- "inst/ext/"
path_inst <- system.file(
"ext", "BAPS_format_clustering_diploid.txt", package="rBAPS"
)
}
baps_diploid <- read.delim(
file = file.path(path_inst, "BAPS_format_clustering_diploid.txt"),
file = path_inst,
sep = " ",
header = FALSE
)