From ba7521ef084bc241ee519e90c0f83c68761cf15b Mon Sep 17 00:00:00 2001 From: Calvin Date: Tue, 26 Feb 2013 14:05:28 -0500 Subject: changes --- multifasta_to_otu.py | 7 ++++--- 1 file 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()) -- cgit v1.2.3