checkFrequenciesFile: Load and check a frequency file

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/checkFrequenciesFile.R

Description

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

Usage

1
checkFrequenciesFile(filename, mix)

Arguments

filename

Path of the frecuency database file

mix

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

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 dataframe is returned. The error is described in the error messages.

Value

A list containing

Author(s)

Elias Hernandis

See Also

checkMixtureFile for information on how to load a mixture file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
mixfile <- system.file("extdata","mixture.txt",package="relMix")
mix <- checkMixtureFile(mixfile)
# note: the mixture dataframe 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)

## End(Not run)

relMix documentation built on Dec. 15, 2020, 5:11 p.m.