From 40f03c93bbe11177105f7db159ec527bb612fe0e Mon Sep 17 00:00:00 2001 From: Calvin Date: Wed, 27 Feb 2013 15:40:19 -0500 Subject: Create a dictionary of our trained matrix id's --- multifasta_to_otu.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/multifasta_to_otu.py b/multifasta_to_otu.py index e313e4a..ef7f5f6 100755 --- a/multifasta_to_otu.py +++ b/multifasta_to_otu.py @@ -76,12 +76,16 @@ def main(): results = pool.map(quikr_call, fasta_list) # Create a dictionary and load up our keys - + records = [] + + trained_matrix_headers = open(args.trained_matrix, "rU") + for record in SeqIO.parse(trained_matrix_headers, "fasta"): + records.append((record.id, 0)) + + records = dict(records) + - for fasta in fasta_list: - fasta_file = open(input_directory + fasta, "rU") - for record in SeqIO.parse(fasta_file, "fasta") : # load the keys with values from each fasta result -- cgit v1.2.3