VyLala commited on
Commit
7a21c19
·
verified ·
1 Parent(s): 816b392

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +9 -8
pipeline.py CHANGED
@@ -464,17 +464,17 @@ def pipeline_with_gemini(accessions,stop_flag=None, niche_cases=None, save_df=No
464
  links = unique_preserve_order(links)
465
  acc_score["source"] = links
466
  else:
467
- print("no chunk or all output")
468
- print("chunk filename: ", str(chunks_filename))
469
 
470
  try:
471
  temp_source = False
472
  if save_df is not None and not save_df.empty:
473
  print("save df not none")
474
- print(str(chunk_filename))
475
- print(str(all_filename))
476
- if str(chunk_filename) != "":
477
- link = save_df.loc[save_df["file_chunk"]==str(chunk_filename),"Sources"].iloc[0]
478
  #link = row["Sources"].iloc[0]
479
  if "http" in link:
480
  print("yeah http in save df source")
@@ -483,8 +483,8 @@ def pipeline_with_gemini(accessions,stop_flag=None, niche_cases=None, save_df=No
483
  print("tempo source")
484
  #acc_score["source"] = [str(all_filename), str(chunks_filename)]
485
  temp_source = True
486
- elif str(all_filename) != "":
487
- link = save_df.loc[save_df["file_all_output"]==str(all_filename),"Sources"].iloc[0]
488
  #link = row["Sources"].iloc[0]
489
  print(link)
490
  print("list of link")
@@ -505,6 +505,7 @@ def pipeline_with_gemini(accessions,stop_flag=None, niche_cases=None, save_df=No
505
  #acc_score["source"] = [str(file_all_path), str(file_chunk_path)]
506
  temp_source = True
507
  if temp_source:
 
508
  if doi != "unknown":
509
  link = 'https://doi.org/' + doi
510
  # get the file to create listOfFile for each id
 
464
  links = unique_preserve_order(links)
465
  acc_score["source"] = links
466
  else:
467
+ print("inside the try of reusing chunk or all output")
468
+ #print("chunk filename: ", str(chunks_filename))
469
 
470
  try:
471
  temp_source = False
472
  if save_df is not None and not save_df.empty:
473
  print("save df not none")
474
+ print("chunk file name: ",str(chunk_filename))
475
+ print("all filename: ",str(all_filename))
476
+ if acc_score["file_chunk"]:
477
+ link = save_df.loc[save_df["file_chunk"]==acc_score["file_chunk"],"Sources"].iloc[0]
478
  #link = row["Sources"].iloc[0]
479
  if "http" in link:
480
  print("yeah http in save df source")
 
483
  print("tempo source")
484
  #acc_score["source"] = [str(all_filename), str(chunks_filename)]
485
  temp_source = True
486
+ elif acc_score["file_all_output"]:
487
+ link = save_df.loc[save_df["file_all_output"]==acc_score["file_all_output"],"Sources"].iloc[0]
488
  #link = row["Sources"].iloc[0]
489
  print(link)
490
  print("list of link")
 
505
  #acc_score["source"] = [str(file_all_path), str(file_chunk_path)]
506
  temp_source = True
507
  if temp_source:
508
+ print("temp source is true so have to try again search link")
509
  if doi != "unknown":
510
  link = 'https://doi.org/' + doi
511
  # get the file to create listOfFile for each id