Learn R Programming

relMix (version 1.4.1)

checkFrequenciesFile: Load and check a frequency file

Description

Loads a frequency database file and compares it against mixture data to check for common errors.

Usage

checkFrequenciesFile(filename, mix)

Value

A list containing

  • df Data frame with frequencies

  • warning List of strings describing the errors that occurred but could be fixed or that do not prevent the execution of the program.

  • error List of strings describing the errors that occurred that made it impossible to return a valid data frame. If this list is not empty, then the data frame item will be NULL

Arguments

filename

Path of the frequency database file

mix

Data frame with mixture data. See relMix vignette for description of the format

Author

Elias Hernandis

Details

The mixture data is used to perform more advanced checks, such as to make sure all alleles present in the mixture file have an entry in the frequency database. If warnings are found, the function attempts to fix them and explains what it has done in the warning messages. If an error is found, checking stops and a NULL data frame is returned. The error is described in the error messages.

See Also

checkMixtureFile for information on how to load a mixture file.

Examples

Run this code
mixfile <- system.file("extdata","mixture.txt",package="relMix")
mix <- checkMixtureFile(mixfile)
# note: the mixture data frame is passed as an argument
# if the previous check failed, the program should not continue
# with the frequencies file check
freqfile <- system.file('extdata','frequencies22Markers.txt',package='relMix')
freqs <- checkFrequenciesFile(freqfile, mix$df)

Run the code above in your browser using DataLab