diff --git a/R/readFam.R b/R/readFam.R index 435713c..8e9c61f 100644 --- a/R/readFam.R +++ b/R/readFam.R @@ -250,8 +250,8 @@ readFam = function(famfile, useDVI = NA, Xchrom = FALSE, prefixAdded = "added_", frqs = as.numeric(x[als.lines + 1]) if("0" %in% als) { - warning(sprintf("Illegal allele '0' at locus %s. Changed to '00'.", loc.name), call. = FALSE) - als[als == "0"] = "00" + warning(sprintf("Database error, locus %s: Illegal allele '0'. Changed to 'z'.", loc.name), call. = FALSE) + als[als == "0"] = "z" } # Check for illegal alleles, including "Rest allele", with stepwise models @@ -260,20 +260,20 @@ readFam = function(famfile, useDVI = NA, Xchrom = FALSE, prefixAdded = "added_", alsNum = suppressWarnings(as.numeric(als)) if(any(is.na(alsNum))) { change = TRUE - warning(sprintf("Non-numerical allele '%s' at locus %s incompatible with stepwise model. Changed to 'proportional.", - als[is.na(alsNum)][1], loc.name), call. = FALSE) + warning(sprintf("Database error, locus %s: Non-numerical allele '%s' incompatible with stepwise model. Changed to proportional model.", + loc.name, als[is.na(alsNum)][1]), call. = FALSE) } else if(any(alsNum < 1)) { change = TRUE - warning(sprintf("Database error: Allele '%s' at locus %s is incompatible with stepwise model. Changed to 'proportional'.", - als[alsNum < 1][1], loc.name), call. = FALSE) + warning(sprintf("Database error, locus %s: Allele '%s' incompatible with stepwise model. Changed to proportional model.", + loc.name, als[alsNum < 1][1]), call. = FALSE) } else { badMicro = round(alsNum, 1) != alsNum if(any(badMicro)) { change = TRUE - warning(sprintf("Database error: Illegal microvariant '%s' at locus %s. Changed mutation model to 'proportional'.", - als[badMicro][1], loc.name), call. = FALSE) + warning(sprintf("Database error, locus %s: Illegal microvariant '%s'. Changed to proportional model.", + loc.name, als[badMicro][1]), call. = FALSE) } } if(change) {