nodes: 0, module; 1, function_definition; 2, function_name:usearch61_fast_cluster; 3, parameters; 4, block; 5, identifier:intermediate_fasta; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, default_parameter; 15, default_parameter; 16, default_parameter; 17, expression_statement; 18, expression_statement; 19, expression_statement; 20, if_statement; 21, expression_statement; 22, expression_statement; 23, expression_statement; 24, return_statement; 25, identifier:percent_id; 26, float:0.97; 27, identifier:minlen; 28, integer:64; 29, identifier:output_dir; 30, string:"."; 31, identifier:remove_usearch_logs; 32, False; 33, identifier:wordlength; 34, integer:8; 35, identifier:usearch61_maxrejects; 36, integer:8; 37, identifier:usearch61_maxaccepts; 38, integer:1; 39, identifier:HALT_EXEC; 40, False; 41, identifier:output_uc_filepath; 42, None; 43, identifier:log_name; 44, string:"fast_clustered.log"; 45, identifier:threads; 46, float:1.0; 47, comment:""" Performs usearch61 de novo fast clustering via cluster_fast option
  
      Only supposed to be used with length sorted data (and performs length
      sorting automatically) and does not support reverse strand matching
  
      intermediate_fasta:  fasta filepath to be clustered with usearch61
      percent_id:  percentage id to cluster at
      minlen: minimum sequence length
      output_dir: directory to output log, OTU mapping, and intermediate files
      remove_usearch_logs: Saves usearch log files
      wordlength: word length to use for initial high probability sequence matches
      usearch61_maxrejects: Set to 'default' or an int value specifying max
       rejects
      usearch61_maxaccepts: Number of accepts allowed by usearch61
      HALT_EXEC: application controller option to halt execution
      output_uc_filepath: Path to write clusters (.uc) file.
      log_name: filepath to write usearch61 generated log file
      threads: Specify number of threads used per core per CPU
      """; 48, assignment; 49, assignment; 50, not_operator; 51, block; 52, assignment; 53, assignment; 54, assignment; 55, expression_list; 56, identifier:log_filepath; 57, call; 58, identifier:params; 59, dictionary; 60, identifier:remove_usearch_logs; 61, expression_statement; 62, identifier:clusters_fp; 63, identifier:output_uc_filepath; 64, identifier:app; 65, call; 66, identifier:app_result; 67, call; 68, identifier:clusters_fp; 69, identifier:app_result; 70, identifier:join; 71, argument_list; 72, pair; 73, pair; 74, pair; 75, pair; 76, pair; 77, pair; 78, pair; 79, pair; 80, pair; 81, assignment; 82, identifier:Usearch61; 83, argument_list; 84, identifier:app; 85, argument_list; 86, identifier:output_dir; 87, identifier:log_name; 88, string; 89, identifier:minlen; 90, string; 91, identifier:intermediate_fasta; 92, string; 93, identifier:percent_id; 94, string; 95, identifier:output_uc_filepath; 96, string; 97, identifier:wordlength; 98, string; 99, identifier:usearch61_maxrejects; 100, string; 101, identifier:usearch61_maxaccepts; 102, string; 103, True; 104, string; 105, identifier:threads; 106, subscript; 107, identifier:log_filepath; 108, identifier:params; 109, keyword_argument; 110, keyword_argument; 111, string_content:--minseqlength; 112, string_content:--cluster_fast; 113, string_content:--id; 114, string_content:--uc; 115, string_content:--wordlength; 116, string_content:--maxrejects; 117, string_content:--maxaccepts; 118, string_content:--usersort; 119, string_content:--threads; 120, identifier:params; 121, string; 122, identifier:WorkingDir; 123, identifier:output_dir; 124, identifier:HALT_EXEC; 125, identifier:HALT_EXEC; 126, string_content:--log
code: def usearch61_fast_cluster(intermediate_fasta,
                             percent_id=0.97,
                             minlen=64,
                             output_dir=".",
                             remove_usearch_logs=False,
                             wordlength=8,
                             usearch61_maxrejects=8,
                             usearch61_maxaccepts=1,
                             HALT_EXEC=False,
                             output_uc_filepath=None,
                             log_name="fast_clustered.log",
                             threads=1.0):
      """ Performs usearch61 de novo fast clustering via cluster_fast option
  
      Only supposed to be used with length sorted data (and performs length
      sorting automatically) and does not support reverse strand matching
  
      intermediate_fasta:  fasta filepath to be clustered with usearch61
      percent_id:  percentage id to cluster at
      minlen: minimum sequence length
      output_dir: directory to output log, OTU mapping, and intermediate files
      remove_usearch_logs: Saves usearch log files
      wordlength: word length to use for initial high probability sequence matches
      usearch61_maxrejects: Set to 'default' or an int value specifying max
       rejects
      usearch61_maxaccepts: Number of accepts allowed by usearch61
      HALT_EXEC: application controller option to halt execution
      output_uc_filepath: Path to write clusters (.uc) file.
      log_name: filepath to write usearch61 generated log file
      threads: Specify number of threads used per core per CPU
      """
  
      log_filepath = join(output_dir, log_name)
  
      params = {'--minseqlength': minlen,
                '--cluster_fast': intermediate_fasta,
                '--id': percent_id,
                '--uc': output_uc_filepath,
                '--wordlength': wordlength,
                '--maxrejects': usearch61_maxrejects,
                '--maxaccepts': usearch61_maxaccepts,
                '--usersort': True,
                '--threads': threads
                }
  
      if not remove_usearch_logs:
          params['--log'] = log_filepath
  
      clusters_fp = output_uc_filepath
  
      app = Usearch61(params, WorkingDir=output_dir, HALT_EXEC=HALT_EXEC)
  
      app_result = app()
  
      return clusters_fp, app_result