Skip to content

Commit

Permalink
Added some manual mappings from cam-kp-api PR 640.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav committed Aug 1, 2023
1 parent af7637c commit dcb8499
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion scripts/generate_ro_biolink_mapping.sc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ import io.circe.generic.auto._
*/

object ROBiolinkMappingsGenerator extends ZIOAppDefault with LazyLogging {
/* Some manual annotations (we should try to move these into Biolink model so we don't need to deal with them ourselves. */

val manualPredicateMappingRows = Seq(
PredicateMappingRow(
predicate = "biolink:regulates", // Is this the best one?
`mapped predicate` = None,
`object aspect qualifier` = None,
`object direction qualifier` = Some("downregulated"),
`qualified predicate` = None,
`exact matches` = Some(Set("RO:0002305")), // causally upstream of, negative effect
),
PredicateMappingRow(
predicate = "biolink:regulates", // Is this the best one?
`mapped predicate` = None,
`object aspect qualifier` = None,
`object direction qualifier` = Some("upregulated"),
`qualified predicate` = None,
`exact matches` = Some(Set("RO:0002304")), // causally upstream of, positive effect
)
)

/* Configuration for this generator */
case class Conf(
outputFilename: String,
Expand All @@ -53,7 +74,7 @@ object ROBiolinkMappingsGenerator extends ZIOAppDefault with LazyLogging {
githubPredicateMappings <- getPredicateMappingsFromGitHub(conf)
_ = logger.info(s"Loaded ${githubBiolinkModel.length} mappings from the Biolink model and ${githubPredicateMappings.length} mappings from the predicate mappings file.")

countPredsWritten <- writePredicates(githubBiolinkModel ++ githubPredicateMappings, conf.outputFilename)
countPredsWritten <- writePredicates(githubBiolinkModel ++ githubPredicateMappings ++ manualPredicateMappingRows, conf.outputFilename)
_ = logger.info(s"Wrote out ${countPredsWritten} to ${conf.outputFilename}.")
} yield ()

Expand Down

0 comments on commit dcb8499

Please sign in to comment.