docs: def _extract_orfs(self, input_path, orfm, hit_readnames, output_path, search_method, sequence_frame_info_list=None):
          '''
          Call ORFs on a file with nucleotide sequences and extract the proteins
          whose name is in `hit_readnames`.
  
          Parameters
          ----------
          input_path : str
              Path to input nucleotide sequences in FASTA format.
          orfm: obj
              graftm.OrfM object with parameters already set
          hit_readnames : str
              path to a file containin the readnames of hits to the HMM, one per
              line.
          output_path : str
              Path to output orfs into, in FASTA format.
          search_method : str
              The method for searching, either 'hmmsearch' or 'diamond'
          sequence_frame_info : list
              A dataframe (list of lists) containing readname, alignment direction
              and alignment start point information
          '''
          
          if search_method == "hmmsearch":
              # Build and run command to extract ORF sequences:
              orfm_cmd = orfm.command_line()
              cmd = 'fxtract -H -X -f /dev/stdin <(%s %s) > %s' % (orfm_cmd, input_path, output_path)
              process = subprocess.Popen(["bash", "-c", cmd],
                                         stdin=subprocess.PIPE,
                                         stdout=subprocess.PIPE)
              process.communicate('\n'.join(hit_readnames))
  
          elif search_method == "diamond":
              sequence_frame_info_dict = {x[0]:[x[1], x[2], x[3]] for x in sequence_frame_info_list}
              records = SeqIO.parse(input_path, "fasta")
              with open(output_path, 'w') as open_output_path:
                  for record in records:
                      entry=sequence_frame_info_dict[record.id]
                      indfrom=(min(entry[2], entry[1])-1)
                      indto=max(entry[2], entry[1])
                      if entry[0] == False:
                          record.seq = max([x for x in record.seq[indfrom:indto].reverse_complement().translate().split("*")], key=len)
                      else:
                          record.seq = max([x for x in record.seq[indfrom:indto].translate().split("*")], key=len)
                      SeqIO.write(record, open_output_path, "fasta")
                  open_output_path.flush()