Adam,<br><br>   I am going to try and sort through the pseudocode you provided to see if I can get things up and running that way has well. This a part of a larger workflow thing and needs to be in the format that I have. Sticking all this into a database is down the road a ways.<br>
<br><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;"><div><i><span style="font-size: small;">for every line in ONE:</span></i></div>

<div><span style="font-size: small;"><i>    make a dictionary with a key = to the protein ID and the value, the rest</i><br><br>I am pretty sure I have this correct by doing this:<br>xml = open(&quot;final.txt&quot;,&#39;r&#39;)<br>
gen = open(&quot;final_gen.txt&quot;,&#39;r&#39;)<br><br>PIDS = {}<br>for proteinVals in xml:<br>    ID = proteinVals.split()[0]<br>    PIDS[ID] = proteinVals<br>print PIDS<br></span></div></span><br>For this part:<br><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;"><div>
<i><span style="font-size: small;">for every line in TWO:</span></i></div><div><i><span style="font-size: small;">    if the dictionary has the same protein ID:</span></i></div><div>
<span style="font-size: small;"><i>        perform the string merging and write to the file</i><br><br>For this part I would need to do something like:<br><br>for line in gen:<br>     ID = proteinVals.split()[0]<br>     if ID in PIDS:   (I need to check for the key?)<br>
           ???How do you merge lines being read in to a previous dictionary<br>           else:<br>                move on to next number<br><br>Thanks!<br><br>ara<br><br><br></span></div></span><br><br clear="all"><br>-- <br>
Quis hic locus, quae regio, quae mundi plaga. Ubi sum. Sub ortu solis an sub cardine glacialis ursae.<br>