質問編集履歴
1
追記
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
```python
|
|
2
2
|
with open("short.sequ.txt") as f:
|
|
3
|
-
|
|
3
|
+
for line in f:
|
|
4
|
-
|
|
4
|
+
if line.startswith(">"):
|
|
5
|
-
|
|
5
|
+
print(line)
|
|
6
|
-
|
|
6
|
+
seq = ""
|
|
7
|
-
|
|
7
|
+
else:
|
|
8
|
-
|
|
8
|
+
seq += "".join(line.split())
|
|
9
|
-
|
|
9
|
+
count = [len(seq)]
|
|
10
|
-
|
|
10
|
+
print(count)
|
|
11
11
|
```
|
|
12
|
+
```
|
|
12
|
-
|
|
13
|
+
short.sequ.txt
|
|
13
14
|
>YP_009518834.1 putative uncharacterized protein YjiT [Escherichia coli str. K-12 substr. MG1655]
|
|
14
15
|
MGQSEYISWVKCTSWLSNFVNLRGLRQPDGRPLYEYHATNDEYTQLTQLLRAVGQSQSNICNRDFAACFV
|
|
15
16
|
LFCSEWYRRDYERQCGWTWDPIYKKIGISFTATELGTIVPKGMEDYWLRPIRFYESERRNFLGTLFSEGG
|