Re: [Tutor] Selecting text

2005-01-19 Thread Karl Pflästerer
On 19 Jan 2005, [EMAIL PROTECTED] wrote: > I have two lists: > > 1. Lseq: > len(Lseq) > 30673 Lseq[20:25] > ['NM_025164', 'NM_025164', 'NM_012384', 'NM_006380', > 'NM_007032','NM_014332'] > > > 2. refseq: len(refseq) > 1080945 refseq[0:25] > ['>gi|10047089|ref|NM_014332.1| Homo

Re: [Tutor] Selecting text

2005-01-19 Thread Kent Johnson
Kumar, You should look for a way to solve this with dictionaries or sets. If you look for each element of Lseq in each element of refseq, that is 33,155,825,985 lookups. That is a lot! Sets have a fast test for membership, look for ways to use them! In this case, the target string in refseq seems

Re: [Tutor] Selecting text

2005-01-19 Thread Ewald Ertl
Hi kumar If I unterstood your question correctly, you have to iterate over the refseq until you get the next entry, which starts with a '>' on Tue, 18 Jan 2005 20:12:32 -0800 (PST) kumar s <[EMAIL PROTECTED]> wrote : -

[Tutor] Selecting text

2005-01-18 Thread kumar s
Dear group: I have two lists: 1. Lseq: >>> len(Lseq) 30673 >>> Lseq[20:25] ['NM_025164', 'NM_025164', 'NM_012384', 'NM_006380', 'NM_007032','NM_014332'] 2. refseq: >>> len(refseq) 1080945 >>> refseq[0:25] ['>gi|10047089|ref|NM_014332.1| Homo sapiens small muscle protein, X-linked (SMPX), mRNA'