Skip to content

Commit

Permalink
remove intermediate print
Browse files Browse the repository at this point in the history
  • Loading branch information
cheny19 committed Jan 17, 2019
1 parent f5b2de1 commit 77a4393
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 27 deletions.
41 changes: 14 additions & 27 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/head_align_tail_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ def get_head_tail(cigar_string):


def head_align_tail(prefix, alnm_ftype):
'''
out1 = open(prefix + "_total.txt", 'w')
out2 = open(prefix + "_middle.txt", 'w')
out3 = open(prefix + "_head.txt", 'w')
out4 = open(prefix + "_middle_ref.txt", 'w')
out5 = open(prefix + "_ht.txt", 'w')
out6 = open(prefix + "_ratio.txt", 'w')
out7 = open(prefix + "_tail.txt", 'w')
'''

aligned_length = []
total_length = []
Expand All @@ -115,13 +117,15 @@ def head_align_tail(prefix, alnm_ftype):
if ht != 0:
r = float(head) / ht
head_vs_ht_ratio.append(r)
'''
out1.write(query[5] + '\n')
out2.write(query[3] + '\n')
out3.write(query[2] + '\n')
out4.write(str(aligned_ref) + '\n')
out5.write(str(ht) + '\n')
out6.write(str(ratio) + '\n')
out7.write(str(tail) + '\n')
'''
else:
sam_reader = HTSeq.SAM_Reader
alnm_file_sam = prefix + "_primary.sam"
Expand All @@ -143,6 +147,7 @@ def head_align_tail(prefix, alnm_ftype):
if head != 0:
r = float(head) / ht
head_vs_ht_ratio.append(r)
'''
out1.write(str(read_len_total) + '\n')
out2.write(str(middle) + '\n')
out3.write(str(alnm.read.name) + '\t' + str(head) + '\n')
Expand All @@ -158,6 +163,7 @@ def head_align_tail(prefix, alnm_ftype):
out5.close()
out6.close()
out7.close()
'''

aligned_length = numpy.array(aligned_length)
total_length = numpy.array(total_length)
Expand Down

0 comments on commit 77a4393

Please sign in to comment.