Check a reference profiles file
checkReferenceFile.Rd
Given a reference profile file name the function attempts to load it and compare it to the mixture file to detect possible errors.
Value
A list containing
df
The loaded data frame, NULL if errors are presentwarning
A list of strings describing the errors that ocurred but could be fixed or that do not prevent the execution of the program.error
A list of strings describing the errors that ocurred that made it impossible to return a valid data frame. If this list is not empty, then the data frame item will be null.
Details
See the relMix vignette for a description of the format of the reference file. The data frame with mixture data is used to compare 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.
See also
checkMixtureFile
for information on how to load a mixture file.
Examples
#Load a mixture file
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 reference file check
reffile <- system.file("extdata","references.txt",package="relMix")
checkReferenceFile(reffile, mix$df);
#> $df
#> SampleName Marker Allele1 Allele2
#> 1 Mother CSF1PO 12 12.0
#> 2 Mother D10S1248 16 16.0
#> 3 Mother D13S317 8 13.0
#> 4 Mother D14S1434 13 13.0
#> 5 Mother D16S539 11 13.0
#> 6 Mother D19S433 14 15.2
#> 7 Mother D1S1656 15 17.3
#> 8 Mother D1S1677 13 14.0
#> 9 Mother D2S1338 17 20.0
#> 10 Mother D2S1776 12 12.0
#> 11 Mother D2S441 11 14.0
#> 12 Mother D3S1358 16 16.0
#> 13 Mother D4S2408 8 10.0
#> 14 Mother D5S2500 14 14.0
#> 15 Mother D5S818 12 12.0
#> 16 Mother D6S1043 11 18.0
#> 17 Mother D6S474 14 14.0
#> 18 Mother D7S820 11 11.0
#> 19 Mother D8S1179 14 15.0
#> 20 Mother D9S2157 7 12.0
#> 21 Mother TH01 8 9.3
#> 22 Mother TPOX 8 11.0
#> 23 Father CSF1PO 10 10.0
#> 24 Father D10S1248 14 15.0
#> 25 Father D13S317 8 12.0
#> 26 Father D14S1434 10 13.0
#> 27 Father D16S539 10 14.0
#> 28 Father D19S433 13 15.0
#> 29 Father D1S1656 12 17.3
#> 30 Father D1S1677 13 15.0
#> 31 Father D2S1338 17 19.0
#> 32 Father D2S1776 11 12.0
#> 33 Father D2S441 10 11.0
#> 34 Father D3S1358 15 16.0
#> 35 Father D4S2408 10 11.0
#> 36 Father D5S2500 14 18.0
#> 37 Father D5S818 9 12.0
#> 38 Father D6S1043 11 12.0
#> 39 Father D6S474 17 18.0
#> 40 Father D7S820 10 11.0
#> 41 Father D8S1179 10 13.0
#> 42 Father D9S2157 11 11.0
#> 43 Father TH01 6 6.0
#> 44 Father TPOX 10 11.0
#>
#> $warning
#> NULL
#>
#> $error
#> NULL
#>