diff options
author | Calvin <calvin@EESI> | 2013-02-26 14:05:28 -0500 |
---|---|---|
committer | Calvin <calvin@EESI> | 2013-02-26 14:05:28 -0500 |
commit | ba7521ef084bc241ee519e90c0f83c68761cf15b (patch) | |
tree | 17620bac44812a7ae9018186d401b3435290cccc | |
parent | 0855bb2fb1d80faff791593e23acc5e0298bcf9d (diff) |
changes
-rwxr-xr-x | multifasta_to_otu.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/multifasta_to_otu.py b/multifasta_to_otu.py index 7bec8cb..4a46be6 100755 --- a/multifasta_to_otu.py +++ b/multifasta_to_otu.py @@ -67,17 +67,18 @@ def main(): fasta_list = os.listdir(args.input_directory) - for fasta in fasta_list: - quikr_call(fasta) + pool = Pool(processes=jobs) + results = pool.map(quikr_call, fasta_list) return 0 def quikr_call(fasta_file): inp = input_directory + fasta_file output = output_directory + os.path.basename(fasta_file) + xstar = q.quikr(inp, trained_matrix, kmer, lamb) np.savetxt(output, xstar, delimiter=",", fmt="%f") - return 0 + return xstar if __name__ == "__main__": sys.exit(main()) |