summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorCalvin <calvin@EESI>2013-03-26 13:58:58 -0400
committerCalvin <calvin@EESI>2013-03-26 13:58:58 -0400
commit6f97dd88bf1a7809f847094130ae139df0a10c1b (patch)
treed69ff08270609ec409721013283072b46926a5fe /src/python
parenta6c911b5a0a7efacc4fdca311937e4f5d045a9e9 (diff)
add / when reading back in, and sort our input list
Diffstat (limited to 'src/python')
-rwxr-xr-xsrc/python/multifasta_to_otu5
1 files changed, 4 insertions, 1 deletions
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)