Re: Organize large DNA txt files

2009-03-21 Thread andrew cooke
a faster and simpler solution, assuming you are on unix, is to just use the sort command: spl6 tmp: cat 1- 1740060 1780040 1890002 spl6 tmp: cat 1+ 17301

Re: Organize large DNA txt files

2009-03-20 Thread Scott David Daniels
thomasvang...@gmail.com wrote: Dear Fellow programmers, I'm using Python scripts too organize some rather large datasets describing DNA variation. Information is read, processed and written too a file in a sequential order, like this 1+ 1- 2+ 2- etc.. The files that i created contain positional i

Re: Organize large DNA txt files

2009-03-20 Thread Paul McGuire
On Mar 20, 11:59 am, Daniel Fetchinson wrote: > Have you considered using a lightweight database solution? Sqlite is a > really simple, zero configuration, server-less db and a python binding > for it comes with python itself. I'd give it a try, it will simplify > tasks like these a great deal. >

Re: Organize large DNA txt files

2009-03-20 Thread Daniel Fetchinson
> I'm using Python scripts too organize some rather large datasets > describing DNA variation. Information is read, processed and written > too a file in a sequential order, like this > 1+ > 1- > 2+ > 2- > > etc.. The files that i created contain positional information > (nucleotide position) and s

Re: Organize large DNA txt files

2009-03-20 Thread MRAB
thomasvang...@gmail.com wrote: Thanks, This works great! I did not know that it is possible to iterate through the file lines with a while function that's conditional on additional lines being present or not. It relies on file.readline() returning an empty string when it's at the end of the fil

Re: Organize large DNA txt files

2009-03-20 Thread thomasvang...@gmail.com
Thanks, This works great! I did not know that it is possible to iterate through the file lines with a while function that's conditional on additional lines being present or not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Organize large DNA txt files

2009-03-20 Thread MRAB
thomasvang...@gmail.com wrote: Dear Fellow programmers, I'm using Python scripts too organize some rather large datasets describing DNA variation. Information is read, processed and written too a file in a sequential order, like this 1+ 1- 2+ 2- etc.. The files that i created contain positional

Organize large DNA txt files

2009-03-20 Thread thomasvang...@gmail.com
Dear Fellow programmers, I'm using Python scripts too organize some rather large datasets describing DNA variation. Information is read, processed and written too a file in a sequential order, like this 1+ 1- 2+ 2- etc.. The files that i created contain positional information (nucleotide position