Skip to content

Commit

Permalink
Update documentation and tests to clarify that tibbles or data frames…
Browse files Browse the repository at this point in the history
… are allowed as input resolves #6
  • Loading branch information
zenalapp committed Nov 17, 2023
1 parent 821d4ef commit ceaae41
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions R/bistro.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#' identify human contributors to each bloodmeal. For more details than are
#' present here, see `vignette('bistro')`.
#'
#' @param bloodmeal_profiles Tibble with alleles for all bloodmeals in reference
#' @param bloodmeal_profiles Tibble or data frame with alleles for all bloodmeals in reference
#' database including 4 columns: SampleName, Marker, Allele, Height. Height
#' must be numeric or coercible to numeric.
#' @param human_profiles Tibble with alleles for all humans in reference
#' @param human_profiles Tibble or data frame with alleles for all humans in reference
#' database including three columns: SampleName, Marker, Allele.
#' @param kit STR kit name from euroformix. To see a list of all kits embedded
#' in euroformix use [euroformix::getKit()]. If your kit is not included, see
Expand All @@ -18,7 +18,7 @@
#' threshold will be filtered out. If prior filtering was performed, this
#' number should be equal to or greater than that number. Also used for
#' `threshT` argument in [euroformix::contLikSearch()].
#' @param pop_allele_freqs Data frame where the first column is the STR allele
#' @param pop_allele_freqs Tibble or data frame where the first column is the STR allele
#' and the following columns are the frequency of that allele for different
#' markers. Alleles that do not exist for a given marker are coded as NA. If
#' NULL and `calc_allele_freqs = TRUE`, then population allele frequencies
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/bistro.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# bistro works

Code
bistro(bm_evid1, hu_p1, pop_allele_freqs = pop_allele_freqs, kit = "ESX17",
peak_thresh = 200)
bistro(data.frame(bm_evid1), data.frame(hu_p1), pop_allele_freqs = pop_allele_freqs,
kit = "ESX17", peak_thresh = 200)
Message <simpleMessage>
1/17 markers in kit but not in pop_allele_freqs: AMEL
Formatting bloodmeal profiles
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-bistro.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ test_that("bistro works", {

expect_snapshot(
bistro(
bm_evid1,
hu_p1,
data.frame(bm_evid1),
data.frame(hu_p1),
pop_allele_freqs = pop_allele_freqs,
kit = "ESX17",
peak_thresh = 200
Expand Down

0 comments on commit ceaae41

Please sign in to comment.