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

Re: get rid of duplicate elements in list without set

2009-03-20 Thread thomasvang...@gmail.com
You could use: B=list(set(A)).sort() Hope that helps. T -- http://mail.python.org/mailman/listinfo/python-list

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: Python 3.0 slow file IO

2009-02-06 Thread thomasvang...@gmail.com
Thanks a lot for all the responses. I'll move back to Python 2.5 for compatibility with SciPY and some other third party packages. I'll leave the compilation process for some other day, for now I'm a happy user, mayve In the future I would like to contribute to the developmental process.. --

Python 3.0 slow file IO

2009-02-05 Thread thomasvang...@gmail.com
I just recently learned python, I'm using it mainly to process huge 5GB txt files of ASCII information about DNA. I've decided to learn 3.0, but maybe I need to step back to 2.6? I'm getting exceedingly frustrated by the slow file IO behaviour of python 3.0. I know that a bug-report was submitted

Re: f.seek() unwanted output

2009-01-06 Thread thomasvang...@gmail.com
Hi Tim, works! thanx a lot Thomas -- http://mail.python.org/mailman/listinfo/python-list

f.seek() unwanted output

2009-01-05 Thread thomasvang...@gmail.com
I'm having trouble with a script that is printing the output of f.seek () whereas in the documentation it is quoted not to have any output: file.seek(offset[, whence])¶ Set the file’s current position, like stdio‘s fseek. The whence argument is optional and defaults to os.SEEK_SET or 0