code: def _disambiguate_star_fusion_junctions(star_junction_file, contamination_bam, disambig_out_file, data):
      
      out_file = disambig_out_file
      fusiondict = {}
      with open(star_junction_file, "r") as in_handle:
          for my_line in in_handle:
              my_line_split = my_line.strip().split("\t")
              if len(my_line_split) < 10:
                  continue
              fusiondict[my_line_split[9]] = my_line.strip("\n")
      with pysam.Samfile(contamination_bam, "rb") as samfile:
          for my_read in samfile:
              if my_read.is_unmapped or my_read.is_secondary:
                  continue
              if my_read.qname in fusiondict:
                  fusiondict.pop(my_read.qname)
      with file_transaction(data, out_file) as tx_out_file:
          with open(tx_out_file, 'w') as myhandle:
              for my_key in fusiondict:
                  print(fusiondict[my_key], file=myhandle)
  
      return out_file
docs: Disambiguate detected fusions based on alignments to another species.