text
1>YP_009518834.1 putative uncharacterized protein YjiT [Escherichia coli str. K-12 substr. MG1655] 2MGQSEYISWVKCTSWLSNFVNLRGLRQPDGRPLYEYHATNDEYTQLTQLLRAVGQSQSNICNRDFAACFV 3LFCSEWYRRDYERQCGWTWDPIYKKIGISFTATELGTIVPKGMEDYWLRPIRFYESERRNFLGTLFSEGG 4LPFRLLKESDSRFLAVFSRILGQYEQAKQSGFSALSLARAVIEKSALPTVFSEDTSVELISHMADNLNSL 5VLTHNLINHKEPVQQLEKVHPTWRSEFPIPLDDETGTHFLNGLLCAASVEAKPRLQKNKSTRCQFYWSEK 6HPDELRVIVSLPDEVSFPVTSEPSTTRFELAICEDGEEVSGLGPAYASLENRQATVRLRKSEVRFGRQNP 7SAGLSLVARAGGMIVGSIKLDDSEIAIGEVPLTFIVDADQWLLQGQASCSVRSSDVLIVLPRDNSNVAGF 8DGQSRAVNVLGLKALPVKGCQDVTVTANETYRIRTGREQISIGRFALNGKRASWVCHPDETFIGVPKVIS 9TLPDIQSIDVTRYTC 10 11 12>YP_009518833.1 uncharacterized protein YtiA [Escherichia coli str. K-12 substr. MG1655] 13MKEFLFLFHSTVGVIQTRKALQAAGMTFRVSDIPRDLRGGCGLCIWLTCPPGEEIQWVIPGLTESIYCQQ 14DGVWRCIAHYGVSPR 15 16>YP_009518832.1 iraD leader peptide [Escherichia coli str. K-12 substr. MG1655] 17MENEHQYSGARCSGQAAYVAKRQECAK 18 19>YP_009518831.1 protein YtiD [Escherichia coli str. K-12 substr. MG1655] 20MADYAEINNFPPELSSSGDKYFHLRNYSEYSEYTSGFFLSLMIFIKS 21 22>YP_009518830.1 protein YtiC [Escherichia coli str. K-12 substr. MG1655] 23MPVNGIFDVFDMLSIYIIYKLIVSNNTWLIMRK 24 25>YP_009518829.1 putative YjfA [Escherichia coli str. K-12 substr. MG1655] 26MHMVTYPCLTSRRFQLALIHRRVVDKRTSMHSRTASESTGARIHRPWCARHQVRPAWRCQYDKLHRVPFR 27SPELRLDSGPGYTTGSYRY 28 29>NP_418398.3 DNA-binding transcriptional repressor FabR [Escherichia coli str. K-12 substr. MG1655] 30MFILWYSASSTFGKDSDIVMGVRAQQKEKTRRSLVEAAFSQLSAERSFASLSLREVAREAGIAPTSFYRH 31FRDVDELGLTMVDESGLMLRQLMRQARQRIAKGGSVIRTSVSTFMEFIGNNPNAFRLLLRERSGTSAAFR 32AAVAREIQHFIAELADYLELENHMPRAFTEAQAEAMVTIVFSAGAEALDVGVEQRRQLEERLVLQLRMIS 33KGAYYWYRREQEKTAIIPGNVKDE 34 35
python
1with open("short.sequ.txt") as f: 2 a = [] 3 for line in f: 4 5 if line.startswith(">"): 6 print(line) 7 seq = "" 8 a = [] 9 10 else: 11 seq += "".join(line.split()) 12 count = 0 13 count += len(seq) 14 a.append(len(seq)) 15 print(a)
結果
YP_009518834.1 putative uncharacterized protein YjiT [Escherichia coli str. K-12 substr. MG1655]#1
[70]#2
[70, 140]#3
[70, 140, 210]#4
[70, 140, 210, 280]#5
[70, 140, 210, 280, 350]#6
[70, 140, 210, 280, 350, 420]#7
[70, 140, 210, 280, 350, 420, 490]#8
[70, 140, 210, 280, 350, 420, 490, 505]#9
[70, 140, 210, 280, 350, 420, 490, 505, 505]#10
[70, 140, 210, 280, 350, 420, 490, 505, 505, 505]#11
YP_009518833.1 uncharacterized protein YtiA [Escherichia coli str. K-12 substr. MG1655]#12
[70]#13
[70, 85]#14
[70, 85, 85]#15
理想は
python
1>YP_009518834.1 putative uncharacterized protein YjiT [Escherichia coli str. K-12 substr. MG1655] 2 3[70] 4[70, 140] 5[70, 140, 210] 6[70, 140, 210, 280] 7[70, 140, 210, 280, 350] 8[70, 140, 210, 280, 350, 420] 9[70, 140, 210, 280, 350, 420, 490] 10[70, 140, 210, 280, 350, 420, 490, 505] 11[70, 140, 210, 280, 350, 420, 490, 505, 505] 12[70, 140, 210, 280, 350, 420, 490, 505, 505, 505] 13[505] 14>YP_009518833.1 uncharacterized protein YtiA [Escherichia coli str. K-12 substr. MG1655] 15 16[70] 17[70, 85] 18[70, 85, 85] 19[85] 20>YP_009518832.1 iraD leader peptide [Escherichia coli str. K-12 substr. MG1655] 21 22[27] 23[27, 27] 24[27] 25>YP_009518831.1 protein YtiD [Escherichia coli str. K-12 substr. MG1655] 26 27[47] 28[47, 47] 29[47] 30>YP_009518830.1 protein YtiC [Escherichia coli str. K-12 substr. MG1655] 31 32[33] 33[33, 33] 34[33] 35>YP_009518829.1 putative YjfA [Escherichia coli str. K-12 substr. MG1655] 36 37[70] 38[70, 89] 39[70, 89, 89] 40[89] 41>NP_418398.3 DNA-binding transcriptional repressor FabR [Escherichia coli str. K-12 substr. MG1655] 42 43[70] 44[70, 140] 45[70, 140, 210] 46[70, 140, 210, 234] 47[234] 48 49max(>YP_009518834.1 putative uncharacterized protein YjiT [Escherichia coli str. K-12 substr. MG1655],505) 50 51min(>YP_009518832.1 iraD leader peptide [Escherichia coli str. K-12 substr. MG1655],27) 52>>>
回答1件
あなたの回答
tips
プレビュー