Skip to contents

Removes duplicates and peaks below threshold, subsets ids

Usage

prep_bloodmeal_profiles(
  bloodmeal_profiles,
  bloodmeal_ids = NULL,
  peak_thresh = NULL,
  rm_markers = c("AMEL"),
  check_heights = TRUE,
  check_inputs = TRUE
)

Arguments

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.

bloodmeal_ids

Vector of bloodmeal ids from the SampleName column in bloodmeal_profiles for which to compute log10_lrs. If NULL, all ids in the input dataframe will be used. Default: NULL

peak_thresh

Allele peak height threshold in RFUs. All peaks under this 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().

rm_markers

A vector indicating what markers should be removed prior to calculating log10LRs. NULL to include all markers. By default, for the bistro function AMEL is removed as it is not standard to include it in LR calculations.

check_heights

A boolean indicating whether to check if all peak heights are below the threshold. Default: TRUE

check_inputs

A boolean indicating whether or not to check the inputs to the function. Default: TRUE

Value

Dataframe with preprocessed bloodmeal profiles

Examples

prep_bloodmeal_profiles(bloodmeal_profiles, peak_thresh = 200)
#> Removing 6 peaks under the threshold of 200 RFU.
#> For 1/4 bloodmeal ids, all peaks are below the threshold
#> # A tibble: 60 × 4
#>    SampleName Marker   Allele Height
#>    <chr>      <chr>    <chr>   <dbl>
#>  1 evid1      D10S1248 13       1856
#>  2 evid1      D10S1248 15       1045
#>  3 evid1      D12S391  18        297
#>  4 evid1      D12S391  18.3     1446
#>  5 evid1      D12S391  19        751
#>  6 evid1      D12S391  22       1370
#>  7 evid1      D16S539  10        312
#>  8 evid1      D16S539  11        743
#>  9 evid1      D16S539  12        619
#> 10 evid1      D16S539  9         217
#> # ℹ 50 more rows