On Mon, Nov 10, 2008 at 12:12 PM, trias <[EMAIL PROTECTED]> wrote: > I have started learning python (any online help content suggestions are > welcome) and want to write a couple of scripts to do simple numeric > calculations on array data.
Welcome! Have you seen http://wiki.python.org/moin/BeginnersGuide/NonProgrammers > filetype(1) I have reference files (ie file.csv) that contain three columns > with variable rows, first column is type str contains a unique identifier > name, and the other two columns are int type contain two reference values > (start,stop(genomic location reference values). > **maybe I should import this as dictionary list** I don't know what a dictionary list is, do you mean a list of dictionaries? I think a list of lists is probably fine. Python comes with a csv module that helps to read csv files. Then you will have to convert the second two columns from string to int. > filetype(2) The other file contains signal data in three columns, column one > is a unique identifier type int, and the other two columns contain two type > int values (genomic location reference values) > ** import this as array/list > > I want to map the location of filetype(2) with respect to filetype(1) and be > able to do averaging of signal if I align all filetype one objects. I don't know what you mean by this. I guess you want to search within filetype(1) for intervals that contain the locations from filetype(2) ? This is pretty straightforward but if you have long lists it may be slow. This recent thread has some suggestions for speeding up searching large data sets: http://thread.gmane.org/gmane.comp.python.tutor/51162/focus=51181 It looks like you and Srinivas are trying to solve similar problems. Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
