File tree Expand file tree Collapse file tree 2 files changed +22
-8
lines changed
Expand file tree Collapse file tree 2 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 541541 },
542542 "type" : " array"
543543 },
544+ "hrd" : {
545+ "items" : {
546+ "properties" : {
547+ "kbCategory" : {
548+ "type" : " string"
549+ },
550+ "score" : {
551+ "type" : " number"
552+ }
553+ },
554+ "required" : [
555+ " score"
556+ ],
557+ "type" : " object"
558+ },
559+ "type" : " array"
560+ },
544561 "images" : {
545562 "items" : {
546563 "example" : {
Original file line number Diff line number Diff line change @@ -548,15 +548,12 @@ def ipr_report(
548548 )
549549 output .setdefault ("images" , []).extend (select_expression_plots (gkb_matches , all_variants ))
550550
551- # TODO: fix this once hrdScore is created in ipr api/db
552- # this would also be the place to handle the alternate input format hrdScore instead of hrd: {score:}
553- if output .get ('hrdScore' ):
554- output ['hrdetectScore' ] = output ['hrdScore' ]
555- output .pop ('hrdScore' )
556- elif output .get ('hrd' ):
551+ # if input includes hrdScore field, that is ok to pass to db
552+ # but prefer the 'hrd' field if it exists
553+ if output .get ('hrd' ):
557554 if output .get ('hrd' ).get ('score' ):
558- output ['hrdetectScore ' ] = output ['hrd' ]['score' ]
559- output .pop ('hrd' )
555+ output ['hrdScore ' ] = output ['hrd' ]['score' ]
556+ output .pop ('hrd' ) # kbmatches have already been made
560557
561558 ipr_spec = ipr_conn .get_spec ()
562559 output = clean_unsupported_content (output , ipr_spec )
You can’t perform that action at this time.
0 commit comments