From 6f97dd88bf1a7809f847094130ae139df0a10c1b Mon Sep 17 00:00:00 2001 From: Calvin Date: Tue, 26 Mar 2013 13:58:58 -0400 Subject: add / when reading back in, and sort our input list --- src/python/multifasta_to_otu | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/python/multifasta_to_otu') diff --git a/src/python/multifasta_to_otu b/src/python/multifasta_to_otu index 3bcbd56..ec1cc7a 100755 --- a/src/python/multifasta_to_otu +++ b/src/python/multifasta_to_otu @@ -79,6 +79,9 @@ def main(): # Return a list of the input directory fasta_list = os.listdir(args.input_directory) + + # Sort the list + fasta_list.sort() # Queue up and run our quikr functions. pool = Pool(processes=jobs) @@ -100,7 +103,7 @@ def main(): count_sequences = Popen(["grep", "-c" , "^>", args.input_directory + fasta], stdout=PIPE) number_of_sequences = int(count_sequences.stdout.readline()) - proportions = np.loadtxt(output_directory + fasta); + proportions = np.loadtxt(output_directory + "/" + fasta); for proportion, proportion_it in map(None, proportions, range(len(proportions))): number_of_reads[proportion_it, fasta_it] = round(proportion * number_of_sequences) -- cgit v1.2.3