esswired has asked for the wisdom of the Perl Monks concerning the following question:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading PDB files
by scain (Curate) on Jan 29, 2003 at 14:36 UTC | |
First, I would really suggest the book Learning Perl, authored by our very own merlyn. Next, get yourself to CPAN, the Comprehensive Perl Archive Network. There are literally thousands of useful Perl modules for doing all sorts of things, like reading special file formats and working with other programs. Since you are probably using Perl on Windows, and therefore you probably have Activestate Perl, you will want to learn how to use PPM to install those modules on your machine.
Finally, if by PDB file you are referring to a Protein Data Good luck, and feel free to come back with more specific questons when you've started writing code.
Scott | [reply] |
|
Re: Reading PDB files
by Anonymous Monk on Jan 29, 2003 at 14:42 UTC | |
Check out: This provides a mechanism for Perl to read write PDB (Protein Data Bank) files. I assumed this is the file type you mean rather than a palm pilot database. You could use this module to create a comma separated data file to import into Excel. You might also want to check out bioperl Arun | [reply] |
by PodMaster (Abbot) on Jan 29, 2003 at 15:21 UTC | |
| [reply] | |
by esswired (Initiate) on Feb 16, 2003 at 00:55 UTC | |
| [reply] |
|
Re: Reading PDB files
by gt8073a (Hermit) on Jan 29, 2003 at 18:27 UTC | |
I am a very non-technical user Bioperl may be way more complicated than you need to get started( don't get me wrong, it is fabulous, just not simple to follow ) The easiest approach is to read each line of the file, and matching the words/characters up to the first colon. How you store the data really depends on what data you want and what you intend to do with it all( again, this can get extremely tricky ). Here is an extremely simple script that reads all sequences for an entry, blast them, and writes the information to a file. If you refer to your Camel book, this script should be easy enough to figure out and extend. Remember, though, Excel can read csv( comma seperated value ) files, and you will need to read up on DBI if you want to throw data into Access.
Again, this script should help you get started in parsing a PDB file. But, you will have to read up on DBI if you want to stuff the data in Access( there is plenty of material already on the site about DBI, btw ). If you need some more help, feel free to send me an email. Will perl for money | [reply] [d/l] |
by esswired (Initiate) on Feb 16, 2003 at 00:58 UTC | |
| [reply] |
by pfaut (Priest) on Feb 16, 2003 at 01:06 UTC | |
The "camel book" is O'Reilly's "Programming Perl" ISBN 0-596-00027-8. No perl programmer should be without one.
| [reply] [d/l] |
|
Re: Reading PDB files
by Jaap (Curate) on Jan 29, 2003 at 13:41 UTC | |
Have you succeeded in getting ANY perl script to work? Have you tried running through the file using perl? | [reply] |
|
Re: Reading PDB files
by esswired (Initiate) on Jan 31, 2003 at 02:35 UTC | |
| [reply] |