Moved used datasets to /isnt/extdata (#25)
This commit is contained in:
parent
bb7eadd2ba
commit
687a6fb671
42 changed files with 44765 additions and 44759 deletions
|
|
@ -4,7 +4,6 @@ PITFALLS.md
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
CITATION.cff
|
CITATION.cff
|
||||||
.travis.yml
|
.travis.yml
|
||||||
inst/ext/ExamplesDataFormatting
|
inst/testdata
|
||||||
.github
|
.github
|
||||||
aux
|
aux
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@
|
||||||
#' @references Samtools: a suite of programs for interacting
|
#' @references Samtools: a suite of programs for interacting
|
||||||
#' with high-throughput sequencing data. <http://www.htslib.org/>
|
#' with high-throughput sequencing data. <http://www.htslib.org/>
|
||||||
#' @export
|
#' @export
|
||||||
|
#' @examples
|
||||||
|
#' data <- system.file("extdata", "FASTA_clustering_haploid.fasta", package = "rBAPS")
|
||||||
|
#' greedyMix(data)
|
||||||
greedyMix <- function(data, format, verbose = TRUE) {
|
greedyMix <- function(data, format, verbose = TRUE) {
|
||||||
# Parsing data format ------------------------------------------------------
|
# Parsing data format ------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#' @return A character matrix with filtered SNP data
|
#' @return A character matrix with filtered SNP data
|
||||||
#'
|
#'
|
||||||
#' @examples
|
#' @examples
|
||||||
#' msa <- system.file("ext", "seqs.fa", package = "rBAPS")
|
#' msa <- system.file("extdata", "seqs.fa", package = "rBAPS")
|
||||||
#' snp.matrix <- load_fasta(msa)
|
#' snp.matrix <- load_fasta(msa)
|
||||||
#' @author Gerry Tonkin-Hill, Waldir Leoncio
|
#' @author Gerry Tonkin-Hill, Waldir Leoncio
|
||||||
#' @seealso rhierbaps::load_fasta
|
#' @seealso rhierbaps::load_fasta
|
||||||
|
|
|
||||||
0
inst/ext/seqs.fa → inst/extdata/seqs.fa
vendored
0
inst/ext/seqs.fa → inst/extdata/seqs.fa
vendored
|
|
@ -16,6 +16,10 @@ greedyMix(data, format, verbose = TRUE)
|
||||||
\description{
|
\description{
|
||||||
Clustering of individuals
|
Clustering of individuals
|
||||||
}
|
}
|
||||||
|
\examples{
|
||||||
|
data <- system.file("extdata", "FASTA_clustering_haploid.fasta", package = "rBAPS")
|
||||||
|
greedyMix(data)
|
||||||
|
}
|
||||||
\references{
|
\references{
|
||||||
Samtools: a suite of programs for interacting
|
Samtools: a suite of programs for interacting
|
||||||
with high-throughput sequencing data. <http://www.htslib.org/>
|
with high-throughput sequencing data. <http://www.htslib.org/>
|
||||||
|
|
|
||||||
|
|
@ -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("ext", "seqs.fa", package = "rBAPS")
|
msa <- system.file("extdata", "seqs.fa", package = "rBAPS")
|
||||||
snp.matrix <- load_fasta(msa)
|
snp.matrix <- load_fasta(msa)
|
||||||
}
|
}
|
||||||
\seealso{
|
\seealso{
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
context("Auxiliary functions to greedyMix")
|
context("Auxiliary functions to greedyMix")
|
||||||
|
|
||||||
# Defining the relative path to current inst -----------------------------------
|
# Defining the relative path to current inst -----------------------------------
|
||||||
path_inst <- system.file("ext", "", package = "rBAPS")
|
path_inst <- system.file("extdata", "", package = "rBAPS")
|
||||||
|
|
||||||
# Reading datasets -------------------------------------------------------------
|
# Reading datasets -------------------------------------------------------------
|
||||||
baps_diploid <- read.delim(
|
baps_diploid <- read.delim(
|
||||||
file = paste(path_inst, "BAPS_format_clustering_diploid.txt", sep = "/"),
|
file = file.path(path_inst, "BAPS_format_clustering_diploid.txt"),
|
||||||
sep = " ",
|
sep = " ",
|
||||||
header = FALSE
|
header = FALSE
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ test_that("lakseKlitik() and subfunctions produce expected output", {
|
||||||
})
|
})
|
||||||
|
|
||||||
test_that("testFastaData() produces same output as on MATLAB", {
|
test_that("testFastaData() produces same output as on MATLAB", {
|
||||||
msa <- system.file("ext", "seqs.fa", package = "rBAPS")
|
msa <- system.file("extdata", "seqs.fa", package = "rBAPS")
|
||||||
test_msa <- testFastaData(msa)
|
test_msa <- testFastaData(msa)
|
||||||
expect_equal(test_msa$ninds, 515)
|
expect_equal(test_msa$ninds, 515)
|
||||||
expect_equal(dim(test_msa$data), c(515, 745))
|
expect_equal(dim(test_msa$data), c(515, 745))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue