Re: [Tutor] pls. help me in sorting and choosing

2005-08-11 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > If you can do this, then it is easy to ask python to sort it for you. > > data = [("NM_004619.2", 4910.8), ("NM_004619.2", 2716.3), ("NM_145759.1", > > 4805.7), ("NM_14 5759.1", 2716.3), ("XM_378692.1", 56.00)] > data.sort(key=lambda x: x[1], reverse=True) Yo

Re: [Tutor] pls. help me in sorting and choosing

2005-08-11 Thread Danny Yoo
On Wed, 10 Aug 2005, Srinivas Iyyer wrote: > There is no cutoff. I would choose top 20% of the all the scores. Hi Srinivas, Those are GenBank accessions, aren't they? > 2. I know how to read a tab delim txt file as list but not into the > tupeles. Can you write a function that takes a line

Re: [Tutor] pls. help me in sorting and choosing

2005-08-10 Thread jfouhy
Quoting Srinivas Iyyer <[EMAIL PROTECTED]>: > 2. I know how to read a tab delim txt file as list but > not into the tupeles. Apologies for my inexperience. How are you currently reading the file? --- can you show us some code? You can create tuples directly. For example: >>> x = 3 >>> y = 7 >

Re: [Tutor] pls. help me in sorting and choosing

2005-08-10 Thread Srinivas Iyyer
Hi John: thank you for your reply: There is no cutoff. I would choose top 20% of the all the scores. 2. I know how to read a tab delim txt file as list but not into the tupeles. Apologies for my inexperience. can you please help me further. thanks srini --- [EMAIL PROTECTED] wrote: > Q

Re: [Tutor] pls. help me in sorting and choosing

2005-08-10 Thread jfouhy
Quoting Srinivas Iyyer <[EMAIL PROTECTED]>: > My question is how can I code to distinguish all high > scoring group and all low scoring group. One thing you need to decide is what it means to be high scoring. Is an element high scoring if its score is above some threshhold, or it a percentage?

[Tutor] pls. help me in sorting and choosing

2005-08-10 Thread Srinivas Iyyer
Dear Group: After cutting short a lot of gory detail, I finally arrived at atomic level of my problem and here I crash. I guess this crash is due to not so strong logic (hopefully i get better with more and more exerise in solving problems). I have a file with two columns: Column A (accession num