python - parsing line capture value in the ttoken -


My goal is that ID on side text file to find the line, then the value of the tokens behind the ID in my file this type of 100 lines (5th column is always ID searches I and tokens 6th column that I need to store the catch numbers between the two alphabets /.

for example, if I'm ID Q9C0F0, I / store value in 1136 (between 2 Varnmal Received between K and N). Then I want to print on outputfile to use that number. Advances want to thank you

COAAD ASXL3 Missense_Mutation KFGM-AA-3672 Q9C0F0 K1136N

COAAD ASXL3 Misensmateshn Kefjim-AA -3693 Q9C0F0 A 1544 e

Sioaadiasaksel 3 Misensmanteshn Kefjim-AA- A010 Q9C0F0 F 353 S

COAAD ASXL3 Missense_Mutation KFGM-AA- A010 Q9C0F0 L157I

COAAD ASXL3 Misensmateshn Kefjim AG -3890 Q 9C0F0 L 1324Q

Sioaaadiasaksel 3 Misensmateshn Kefjim- G-A 2002 Q 9C 0 F 0 H 552 N

COAAD ASXL3 Missense_Mutation KFGM- AG A002 Q9C0F0 K471N

COAAD ASXL3 Missense_Mutation TKFGM- AG A002 Q9C0F0 L804M < / div>

this is a simple way to pronounce it help you how to do it, maybe you Kortaiti of "algorithm" input depending on the situation, so maybe that will change the parsing integer and change certain conditions

  f open ( "file"): in line f.readlines for (): L = line.split () A Literacy, I and L [4] == 'Q9C0F0': print L [5] [1: -1] # or parsing integer in a more intelligent way    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -