R/get_smash_from_samples.R

Defines functions get_SMASH_from_samples

get_SMASH_from_samples <- function(samples){

  smash_by_sample <- lapply(samples, function(s){
    data.frame(SampleName = rep(s$sample_name, nrow(s$mixture)),
               Marker = s$mixture$Locus,
               Allele = s$mixture$Allele,
               Size = s$mixture$Size,
               Height = s$mixture$Height)
  })

  smash <- do.call(rbind, smash_by_sample)
  rownames(smash) <- NULL

  smash
}

Try the simDNAmixtures package in your browser

Any scripts or data that you put into this service are public.

simDNAmixtures documentation built on April 15, 2025, 1:11 a.m.