@@ -128,16 +128,15 @@ def get_stmts_from_source(source_id, *, client, source_ns='HGNC', target_protein
128128 ]
129129
130130 stmts_by_protein_df = pd .DataFrame .from_records (records )
131-
132-
131+
133132 # If there are target proteins filters data frame based on that list
134133 if target_proteins :
135134 stmts_by_protein_filtered_df = stmts_by_protein_df [
136135 stmts_by_protein_df .target_id .isin (target_proteins )]
137136
138137 evidences = []
139- for hashes in stmts_by_protein_filtered_df ["stmt_hash" ].values :
140- evidences .append (get_evidences_for_stmt_hash (int (hashes )))
138+ for stmt_hash in stmts_by_protein_filtered_df ["stmt_hash" ].values :
139+ evidences .append (get_evidences_for_stmt_hash (int (stmt_hash )))
141140 stmts_by_protein_filtered_df_copy = stmts_by_protein_filtered_df .copy ()
142141 stmts_by_protein_filtered_df_copy ["evidences" ] = evidences
143142 logger .info ("Dataframe of protiens that have INDRA relationships with source\
@@ -184,6 +183,7 @@ def assemble_protein_stmt_htmls(stmts_df, output_path):
184183 stmts_by_protein = defaultdict (list )
185184 for _ , row in stmts_df .iterrows ():
186185 stmt = stmt_from_json (json .loads (row ['stmt_json' ]))
186+ stmt .evidence = row ['evidences' ]
187187 stmts_by_protein [row ['name' ]].append (stmt )
188188
189189 for name , stmts in stmts_by_protein .items ():
@@ -462,7 +462,6 @@ def run_explain_downstream_analysis(source_hgnc_id, target_hgnc_ids, output_path
462462 interaction_barchart_fname )
463463
464464 # Get INDRA statements for protiens that have direct INDRA rel
465- breakpoint ()
466465 assemble_protein_stmt_htmls (stmts_by_protein_filtered_df , output_path )
467466
468467 hgnc_map = {hgnc_id : hgnc_client .get_hgnc_name (hgnc_id )
0 commit comments