Merge branch 'fix-check' into develop
This commit is contained in:
commit
2ada115bf3
7 changed files with 22159 additions and 6 deletions
|
|
@ -41,4 +41,5 @@ RoxygenNote: 7.1.1
|
||||||
Suggests:
|
Suggests:
|
||||||
testthat (>= 2.1.0)
|
testthat (>= 2.1.0)
|
||||||
Imports:
|
Imports:
|
||||||
methods
|
methods,
|
||||||
|
ape
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,10 @@ export(uigetfile)
|
||||||
export(uiputfile)
|
export(uiputfile)
|
||||||
export(writeMixtureInfo)
|
export(writeMixtureInfo)
|
||||||
import(utils)
|
import(utils)
|
||||||
|
importFrom(ape,as.DNAbin)
|
||||||
|
importFrom(ape,read.FASTA)
|
||||||
importFrom(methods,is)
|
importFrom(methods,is)
|
||||||
importFrom(stats,runif)
|
importFrom(stats,runif)
|
||||||
|
importFrom(stats,sd)
|
||||||
importFrom(utils,read.delim)
|
importFrom(utils,read.delim)
|
||||||
importFrom(utils,write.table)
|
importFrom(utils,write.table)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#' @details For a list of global variables, check the \code{globals.R} file.
|
#' @details For a list of global variables, check the \code{globals.R} file.
|
||||||
#' @param g the global variable in quesiton.
|
#' @param g the global variable in quesiton.
|
||||||
#' @return TRUE if the variable still contains its original values, FALSE otherwise.
|
#' @return TRUE if the variable still contains its original values, FALSE otherwise.
|
||||||
|
#' @importFrom stats sd
|
||||||
#' @author Waldir Leoncio
|
#' @author Waldir Leoncio
|
||||||
isGlobalEmpty <- function(g) {
|
isGlobalEmpty <- function(g) {
|
||||||
return(sum(g) == 0 & sd(g) == 0)
|
return(sum(g) == 0 & sd(g) == 0)
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,12 @@
|
||||||
#' @return A character matrix with filtered SNP data
|
#' @return A character matrix with filtered SNP data
|
||||||
#'
|
#'
|
||||||
#' @examples
|
#' @examples
|
||||||
#' msa <- system.file("extdata", "seqs.fa", package = "rhierbaps")
|
#' msa <- system.file("ext", "seqs.fa", package="rBAPS")
|
||||||
#' snp.matrix <- load_fasta(msa)
|
#' snp.matrix <- load_fasta(msa)
|
||||||
#'
|
#'
|
||||||
#' @author Gerry Tonkin-Hill
|
#' @author Gerry Tonkin-Hill
|
||||||
#' @seealso rhierbaps::load_fasta
|
#' @seealso rhierbaps::load_fasta
|
||||||
|
#' @importFrom ape read.FASTA as.DNAbin
|
||||||
#' @export
|
#' @export
|
||||||
load_fasta <- function(msa, keep.singletons=FALSE) {
|
load_fasta <- function(msa, keep.singletons=FALSE) {
|
||||||
|
|
||||||
|
|
|
||||||
22145
inst/ext/seqs.fa
Normal file
22145
inst/ext/seqs.fa
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -19,7 +19,7 @@ Loads a fasta file into matrix format ready for
|
||||||
running the hierBAPS algorithm.
|
running the hierBAPS algorithm.
|
||||||
}
|
}
|
||||||
\examples{
|
\examples{
|
||||||
msa <- system.file("extdata", "seqs.fa", package = "rhierbaps")
|
msa <- system.file("ext", "seqs.fa", package="rBAPS")
|
||||||
snp.matrix <- load_fasta(msa)
|
snp.matrix <- load_fasta(msa)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,14 @@ context("Auxiliary functions to greedyMix")
|
||||||
|
|
||||||
# Defining the relative path to current inst ------------- #
|
# Defining the relative path to current inst ------------- #
|
||||||
if (interactive()) {
|
if (interactive()) {
|
||||||
path_inst <- "../../inst/ext/"
|
path_inst <- "../../inst/ext/BAPS_format_clustering_diploid.txt"
|
||||||
} else {
|
} else {
|
||||||
path_inst <- "inst/ext/"
|
path_inst <- system.file(
|
||||||
|
"ext", "BAPS_format_clustering_diploid.txt", package="rBAPS"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
baps_diploid <- read.delim(
|
baps_diploid <- read.delim(
|
||||||
file = file.path(path_inst, "BAPS_format_clustering_diploid.txt"),
|
file = path_inst,
|
||||||
sep = " ",
|
sep = " ",
|
||||||
header = FALSE
|
header = FALSE
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue