Re: how two join and arrange two files together

2009-07-23 Thread amrita
I tried to print those lines having C value missing by: import re expr = re.compile("C = None") f = open("/home/amrita/helix.dat") for line in f: if expr.search(line): print line but it is not giving any value. > > Hi, > > I have two large files: > > FileA > 15 ALA H = 8.05 N =

Re: how two join and arrange two files together

2009-07-23 Thread Jyoti Sharma
On Thu, 23 Jul 2009 12:52:15 +0530, wrote: Hi, I have two large files: FileA 15 ALA H = 8.05 N = 119.31 CA = 52.18 HA = 4.52 C = 21 ALA H = 7.66 N = 123.58 CA = 54.33 HA = C = 179.35 23 ALA H = 8.78 N = CA = HA = C = 179.93. and FileB 21 ALA helix (helix_alpha, helix2) 2

Re: how two join and arrange two files together

2009-07-23 Thread Chris Rebert
On Thu, Jul 23, 2009 at 12:22 AM, wrote: > > Hi, > > I have two large files: > > FileA > 15 ALA H = 8.05 N = 119.31 CA = 52.18 HA = 4.52 C = > 21 ALA H = 7.66 N = 123.58 CA = 54.33 HA = C = 179.35 > 23 ALA H = 8.78 N =  CA =  HA = C = 179.93. > > and > > FileB > 21 ALA  helix (heli

how two join and arrange two files together

2009-07-23 Thread amrita
Hi, I have two large files: FileA 15 ALA H = 8.05 N = 119.31 CA = 52.18 HA = 4.52 C = 21 ALA H = 7.66 N = 123.58 CA = 54.33 HA = C = 179.35 23 ALA H = 8.78 N = CA = HA = C = 179.93. and FileB 21 ALA helix (helix_alpha, helix2) 23 ALA helix (helix_alpha, helix3) 38 ALA heli

Re: how two join and arrange two files together

2009-07-19 Thread Peter Otten
amr...@iisermohali.ac.in wrote: [please keep the correspondence on the mailing list/newsgroup] > It is working sir, but my datas are on file when i replaced StringIO("") > with open("filename.txt") then it is not printing the result properly, > like in one file i have data like:--- > 33 ALA H = 7

Re: how two join and arrange two files together

2009-07-18 Thread Peter Otten
amr...@iisermohali.ac.in wrote: >> Can you make an effort to express clearly what you want, preferrably with >> a simple and unambiguous example? > I want to join column of two different data file but i want that the > entries will match (example i mentioned in my first mail, the position of > AL

Re: how two join and arrange two files together

2009-07-18 Thread amrita
I want to join column of two different data file but i want that the entries will match (example i mentioned in my first mail, the position of ALA eill match) if its not matching then it will get printed as such. > amr...@iisermohali.ac.in wrote: > >> I tried to join these two files together using

Re: how two join and arrange two files together

2009-07-18 Thread Peter Otten
amr...@iisermohali.ac.in wrote: > I tried to join these two files together using command... > > from itertools import izip > from os.path import exists > > def parafiles(*files): > vec = (open(f) for f in files if exists(f)) > data = izip(*vec) > [f.close() for f in vec] > re

Re: how two join and arrange two files together

2009-07-18 Thread amrita
I tried to join these two files together using command... from itertools import izip from os.path import exists def parafiles(*files): vec = (open(f) for f in files if exists(f)) data = izip(*vec) [f.close() for f in vec] return data for data in parafiles('/home/amrita/alache

Re: how two join and arrange two files together

2009-07-18 Thread Chris Rebert
On Sat, Jul 18, 2009 at 12:09 AM, wrote: > > Hi, > > I have two files having entries like:-- > fileA > 8  ALA H = 7.85 N = 123.95 CA = 54.67 HA = 2.98 C = 179.39 > 15 ALA H = 8.05 N = 119.31 CA = 52.18 HA = 4.52 C = 177.18 > 23 ALA H = 8.78 N = 120.16 CA = 55.84 HA = 4.14 C = 179.93 > and > fileB

how two join and arrange two files together

2009-07-18 Thread amrita
Hi, I have two files having entries like:-- fileA 8 ALA H = 7.85 N = 123.95 CA = 54.67 HA = 2.98 C = 179.39 15 ALA H = 8.05 N = 119.31 CA = 52.18 HA = 4.52 C = 177.18 23 ALA H = 8.78 N = 120.16 CA = 55.84 HA = 4.14 C = 179.93 and fileB ChainA: ALA8-67.217297 -37.131330 ChainA: ALA21 -