1

I know this is possibly an obscure use for php, but I'm working on an idea to navigate the human genome in a rather interesting way.

The problem is I need to know if I can write a php script to parse the freely available data, and if so how would I start? Are there any php scripts to do this in existence?

T9b
  • 3,312
  • 5
  • 31
  • 50

2 Answers2

0

I'd suggest creating a database design (MySQL) that has the subset of data you want to explore in the PHP application.

Then find a way to upload the data into that data schema. For the uploading part you could use a more poweful language than PHP of your choice, it could be C#, F#, Haskell, or whatever.

This seperation will help simplify things more than doing it all in PHP.

Martin Capodici
  • 1,486
  • 23
  • 27
  • This is not a php application, and the idea of course is to store the data in a database like mySQL. The question was how do I go about parsing the HG19.2bit file using php. – T9b Jan 24 '12 at 23:27
0

You'll have to write a parser for that, but that should be fairly simple: http://jc.unternet.net/genome/2bitformat.html

And an example in Perl: http://www.perlmonks.org/?node_id=672251

Yacine Filali
  • 1,762
  • 14
  • 17
  • I'm getting there but not quite. I can perhaps use `unpack()` in php but the file size is nearly 800MB. – T9b Jan 26 '12 at 16:19
  • You may want to look into the Zend IO Reader from the php-reader project. I haven't played with it myself, but it sounds like it would do the trick: http://code.google.com/p/php-reader/source/browse/trunk/src/Zend/Io/Reader.php and http://code.google.com/p/php-reader/ – Yacine Filali Jan 26 '12 at 20:55