Skip to content

Commit

Permalink
bypass orphaned traitmappings by retaining original id (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaessly committed May 10, 2023
1 parent 6c03220 commit 6ea03d1
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,10 @@ object VCV {
val mappingsWithAccessionLinks = traitMappings.map { rawMapping =>
val matchingScv = parsedScvs
.find(_.assertion.internalId == rawMapping.clinicalAssertionId)
.getOrElse {
throw new IllegalStateException(
s"Can't link SCV ID ${rawMapping.clinicalAssertionId} to its accession"
)
}
rawMapping.copy(clinicalAssertionId = matchingScv.assertion.id)
matchingScv match {
case Some(scv) => rawMapping.copy(clinicalAssertionId = scv.assertion.id)
case None => rawMapping
}
}

// Pull out top-level info about the VCV and combine it with summary
Expand Down

0 comments on commit 6ea03d1

Please sign in to comment.