Showing
1 changed file
with
4 additions
and
2 deletions
... | @@ -87,12 +87,12 @@ if __name__ == "__main__": | ... | @@ -87,12 +87,12 @@ if __name__ == "__main__": |
87 | for sequence, label in zip(sequences, labels): | 87 | for sequence, label in zip(sequences, labels): |
88 | if label == "exon": | 88 | if label == "exon": |
89 | count_exon += 1 | 89 | count_exon += 1 |
90 | - total_exon_length += total_exon_length | 90 | + total_exon_length += len(sequence) |
91 | if len(sequence) > max_exon_length: | 91 | if len(sequence) > max_exon_length: |
92 | max_exon_length = len(sequence) | 92 | max_exon_length = len(sequence) |
93 | elif label == "utr": | 93 | elif label == "utr": |
94 | count_utr += 1 | 94 | count_utr += 1 |
95 | - total_utr_length += total_utr_length | 95 | + total_utr_length += len(sequence) |
96 | if len(sequence) > max_utr_length: | 96 | if len(sequence) > max_utr_length: |
97 | max_utr_length = len(sequence) | 97 | max_utr_length = len(sequence) |
98 | print("Max exon length: {}".format(max_exon_length)) | 98 | print("Max exon length: {}".format(max_exon_length)) |
... | @@ -101,6 +101,8 @@ if __name__ == "__main__": | ... | @@ -101,6 +101,8 @@ if __name__ == "__main__": |
101 | print("Count utr: {}".format(count_utr)) | 101 | print("Count utr: {}".format(count_utr)) |
102 | print("Total exon length: {}".format(total_exon_length)) | 102 | print("Total exon length: {}".format(total_exon_length)) |
103 | print("Total utr length: {}".format(total_utr_length)) | 103 | print("Total utr length: {}".format(total_utr_length)) |
104 | + print("Media exon length: {}".format(total_exon_length/count_exon)) | ||
105 | + print("Media utr length: {}".format(total_utr_length/count_utr)) | ||
104 | 106 | ||
105 | quit() | 107 | quit() |
106 | 108 | ... | ... |
-
Please register or login to post a comment