def fast_denoiser(sff_fps, fasta_fp, tmp_outdir, num_cpus, primer, verbose=True, titanium=False):
 if (num_cpus > 1):
  denoise_seqs(sff_fps, fasta_fp, tmp_outdir, primer=primer, cluster=True, num_cpus=num_cpus, verbose=verbose, titanium=titanium)
 else:
  denoise_seqs(sff_fps, fasta_fp, tmp_outdir, primer=primer, verbose=verbose, titanium=titanium)
 centroids = parse_fasta(open((tmp_outdir + '/centroids.fasta')))
 singletons = parse_fasta(open((tmp_outdir + '/singletons.fasta')))
 seqs = chain(centroids, singletons)
 mapping = {}
 cluster_mapping = open((tmp_outdir + '/denoiser_mapping.txt'))
 for (i, cluster) in enumerate(cluster_mapping):
  (cluster, members) = cluster.split(':')
  members = members.split()
  clust = [cluster]
  clust.extend(members)
  mapping[i] = clust
 return (seqs, mapping)

def fast_denoiser ( sff_fps , fasta_fp , tmp_outdir , num_cpus , primer , verbose = True , titanium = False ) : if ( num_cpus > 1 ) : denoise_seqs ( sff_fps , fasta_fp , tmp_outdir , primer = primer , cluster = True , num_cpus = num_cpus , verbose = verbose , titanium = titanium ) else : denoise_seqs ( sff_fps , fasta_fp , tmp_outdir , primer = primer , verbose = verbose , titanium = titanium ) centroids = parse_fasta ( open ( ( tmp_outdir + '/centroids.fasta' ) ) ) singletons = parse_fasta ( open ( ( tmp_outdir + '/singletons.fasta' ) ) ) seqs = chain ( centroids , singletons ) mapping = { } cluster_mapping = open ( ( tmp_outdir + '/denoiser_mapping.txt' ) ) for ( i , cluster ) in enumerate ( cluster_mapping ) : ( cluster , members ) = cluster . split ( ':' ) members = members . split ( ) clust = [ cluster ] clust . extend ( members ) mapping [ i ] = clust return ( seqs , mapping )
wrapper function calling methods from the denoiser package .