Skip to content

Commit c6f0fdb

Browse files
author
David Pellow
committed
remove extra comments and prints
1 parent 08486cb commit c6f0fdb

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

classify_fasta.py

-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def main(args):
4343
seqs = []
4444
print "Reading {} in batches of 100k sequences".format(infile)
4545
i = 0
46-
# TODO: buffer this and run classification on batches (say ~10k sequences at a time)
4746
fp = open(infile)
4847
with open(outfile,'w') as o:
4948
for name, seq, _ in utils.readfq(fp):
@@ -70,7 +69,6 @@ def main(args):
7069
print "Finished classifying"
7170
print "Class scores written in: {}".format(outfile)
7271

73-
7472
if __name__=='__main__':
7573
args = parse_user_input()
7674
main(args)

plasclass/plasclass.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###
2-
# Define the classifier class and provide a set of functions to enable classification
2+
# Define the plasclass class and provide a set of functions to enable classification
33
###
44

55
import numpy as np
@@ -48,12 +48,11 @@ def classify(self,seq):
4848
while seq_ind < len(seq):
4949
print "Starting new batch"
5050
seq_batch = seq[seq_ind:seq_ind + 100000]
51-
print "Partitioning by length"
5251
scales = [self._get_scale(len(s)) for s in seq_batch]
5352
scale_partitions = {s: [seq_batch[i] for i,v in enumerate(scales) if v == s] for s in self._scales}
5453

5554
partitioned_classifications = {}
56-
for scale in self._scales: #scale_partitions:
55+
for scale in self._scales:
5756
part_seqs = scale_partitions[scale]
5857
if len(part_seqs) <= 0: continue
5958
print "Getting kmer frequencies for partition length {}".format(scale)
@@ -74,7 +73,7 @@ def classify(self,seq):
7473

7574
seq_ind += 100000
7675

77-
# pool.close() TODO: is this needed?
76+
# pool.close()
7877
return np.array(results)
7978

8079
else:

plasclass/plasclass_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Utility functions for the classifier module
1+
# Utility functions for the plasclass module
22

33
complements = {'A':'T', 'C':'G', 'G':'C', 'T':'A'}
44
nt_bits = {'A':0,'C':1,'G':2,'T':3}

0 commit comments

Comments
 (0)