pdb file format help?

Nov 02, 2010 16:35

I tried a google search but can't find anything useful...so maybe one of you knows ( Read more... )

Leave a comment

Comments 19

petefred November 3 2010, 00:20:53 UTC
Not sure if one can get excel to output a fixed width format (blame the fortran people for PDBs looking like that ( ... )

Reply

petefred November 3 2010, 00:26:24 UTC
(oops, I started writing that and forgot that you said tab-delimited; replacing awk -F "," with awk -F "\t" will work for a tab delimited file.

Reply

tt6681_theresat November 3 2010, 00:40:08 UTC
Ok, that *almost* works... unfortunately I'm not at all familiar with the code to fix it (but hey, at least now I can navigate to the right folders and stuff on command line... I might be learning slowly but I am learning)... it returns the first line of my file in the perfect format...but just the first line.
Any ideas?

(I just exported it as a .csv and used the first option)

Reply

petefred November 3 2010, 00:51:23 UTC
Hm, can you just email me the file or post the first couple lines? I'm not sure what "the first option" is -- don't have excel.

Reply


caethan November 3 2010, 01:04:29 UTC
This python incantation should work as well:
http://pastebin.com/uvWadxU7

Just save that to a file named convert.py and run
> python convert.py
at the command line (assuming you have python installed, which should be the case if you're running on a mac).

Reply

tt6681_theresat November 3 2010, 01:34:46 UTC
ok, just tried that and got this http://pastebin.com/bjwGxgdx

Reply

caethan November 3 2010, 01:49:59 UTC
Whoops, had mismatched quotes. Try this:

http://pastebin.com/7VM7ipJv

Reply

petefred November 3 2010, 01:54:35 UTC
You'll need to explicitly convert all the fields to appropriate types to make '%' happy with that, I think... or just make everything a string.

Reply


Leave a comment

Up