def make_mashes(fastas, mash_file, threads, kmer = <NUM_LIT>, force = False):
mash_processes = set()<EOL>sketches = [fasta + '<STR_LIT>' for fasta in fastas]<EOL>devnull = open(os.devnull, '<STR_LIT:w>')<EOL>for fasta, sketch in zip(fastas, sketches):<EOL><INDENT>if os.path.isfile(sketch):<EOL><INDENT>continue<EOL><DEDENT>mash_cmd = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', fasta, '<STR_LIT>', str(kmer), fasta]<EOL>mash_processes.add(subprocess.Popen(mash_cmd, stderr=devnull))<EOL>if len(mash_processes) >= threads:<EOL><INDENT>os.wait()<EOL>mash_processes.difference_update([mp for mp in mash_processes if mp.poll() is not None])<EOL><DEDENT><DEDENT>for mp in mash_processes:<EOL><INDENT>if mp.poll() is None:<EOL><INDENT>mp.wait()<EOL><DEDENT><DEDENT>paste_mashes(sketches, mash_file, force = force)<EOL>return<EOL>
Create mash files for multiple fasta files
Input:
    fastas <list[str]>  -- paths to fasta files
    mash_file <str>     -- path to output mash file
    threads <int>       -- # threads for parallelization
    kmer <int>          -- kmer size for mash sketching
    force <boolean>     -- force overwrite of all mash files