summarize_dataset: Add further summaries to analyzed dataset

View source: R/summarize_dataset.R

summarize_datasetR Documentation

Add further summaries to analyzed dataset

Description

Take a results list as produced by analyze_dataset and add additional entries for inter-sample and inter-locus analyses.

Usage

summarize_dataset(results, genotypes_known = NULL)

Arguments

results

list containing summary data frame and sample-specific data frames as produced by analyze_dataset.

genotypes_known

optional data frame of known genotypes that should be compared to the observed genotypes in the results, as loaded by load_genotypes. If provided dist_mat_known will be present in the output.

Details

Additional entries in the returned list:

  • alignments: inter-allele alignments for each locus, from align_alleles.

  • dist_mat: inter-sample distance matrix, from make_dist_mat.

  • dist_mat_known: if genotypes_known is given, this distance matrix of sample-to-individual values will be present, from make_dist_mat_known.

If genotypes_known is given and a Name column is present in results$summary, samples will be matched with the genotypes in genotypes_known and additional columns will be present in the summary data frame:

  • CorrectAllele1Seq: One correct allele sequence for the individual. The order of this and CorrectAllele2Seq will be matched to Allele1Seq and Allele2Seq if possible. See match_known_genotypes.

  • CorrectAllele2Seq: A second correct allele sequence, as above.

  • GenotypeResult: Categorization for each entry as Correct, Incorrect, Blank, or Dropped Allele. See categorize_genotype_results.

Value

expanded list with additional summaries.


ressy/microsat documentation built on Aug. 24, 2023, 10:09 a.m.