Skip to content

Commit 8518391

Browse files
committed
Avoid another fringe kinship case
1 parent e8cd2a0 commit 8518391

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ehr/resources/pipeline/kinship/populateKinship.r

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ generateSpeciesToProcess <- function(allPed, mergeSpeciesWithHybrids) {
8484
}
8585

8686
validateExpectedKinshipSubset <- function(dataToTest, expectedValues, errorRows, testReciprocal = TRUE) {
87+
if (nrow(dataToTest) == 0 || nrow(expectedValues) == 0) {
88+
return(errorRows)
89+
}
90+
8791
# Generate the reciprocal of relationships as well:
8892
if (testReciprocal) {
8993
ret2 <- data.frame(Id = expectedValues$Id2, Id2 = expectedValues$Id, Relationship = expectedValues$Relationship, ExpectedCoefficient = expectedValues$ExpectedCoefficient)

0 commit comments

Comments
 (0)