Re: remove last 76 letters from string

2009-08-06 Thread Iain King
print nucleotides, seq[-76]      last_part = line.rstrip()[-76 : ] You all mean: seq[:-76] , right? (assuming you've already stripped any junk off the end of the string) Iain -- http://mail.python.org/mailman/listinfo/python-list

Re: remove last 76 letters from string

2009-08-06 Thread Xavier Ho
On Thu, Aug 6, 2009 at 6:28 PM, Iain King iaink...@gmail.com wrote: print nucleotides, seq[-76] last_part = line.rstrip()[-76 : ] You all mean: seq[:-76] , right? (assuming you've already stripped any junk off the end of the string) I think so, probably both of them

Re: remove last 76 letters from string

2009-08-06 Thread MRAB
Iain King wrote: print nucleotides, seq[-76] last_part = line.rstrip()[-76 : ] You all mean: seq[:-76] , right? (assuming you've already stripped any junk off the end of the string) The OP said cut out the last 76 letters (nucleotides) from each individual sequence and send

Re: remove last 76 letters from string

2009-08-06 Thread Iain King
On Aug 6, 11:34 am, MRAB pyt...@mrabarnett.plus.com wrote: Iain King wrote:      print nucleotides, seq[-76]      last_part = line.rstrip()[-76 : ] You all mean:   seq[:-76]   , right? (assuming you've already stripped any junk off the end of the string) The OP said cut out the last

remove last 76 letters from string

2009-08-05 Thread PeroMHC
Hi All, So here is the problem... I have a FASTA file (used for DNA analyses) that looks like this: ... gnl|SRA|SRR019045.10.1 SL-XAY_956090708:2:1:0:1028.1 length=152 NCTTTATTGTATAAATGAAGTTTCACTATATCGGACGAGCGGTTCAGCAGTCATTCCGAGAC

Re: remove last 76 letters from string

2009-08-05 Thread Jan Kaliszewski
Dnia 06-08-2009 o 01:54:46 PeroMHC macma...@gmail.com wrote: This snippet represents 3 individual DNA sequences. Each sequences is identified by the line starting with The complete file has about 10 million individual sequences. A simple enough problem, I want to read in this data, and cut

Re: remove last 76 letters from string [sorry, errata]

2009-08-05 Thread Jan Kaliszewski
Dnia 06-08-2009 o 01:54:46 PeroMHC macma...@gmail.com wrote: This snippet represents 3 individual DNA sequences. Each sequences is identified by the line starting with The complete file has about 10 million individual sequences. A simple enough problem, I want to read in this data, and cut