[Bioperl-l] split-like function

Rob Edwards redwards at utmem.edu
Sun May 11 13:14:22 EDT 2003


If you use split(/(n{50,})/i) [note the extra ()] the n{50,} will become 
extra elements in the array. You can then use length on each element of the 
array to find the position of each of the n{50,} and how long each one is. 

e.g. split /(1+)/, "0000111122111333" gives an array 0000, 1111, 22, 111, 333


Rob




On Saturday 10 May 2003 07:49 pm, you wrote:
> hi,
> i'm attempting to split up large sequence files (some currently being
> sequenced) at any position where more then 50 N's occur in a row.  This is
> not the problem ( split(/n{50,}/i) ) but trouble arises when i want to know
> where all the positions of the splits.  I was wondering if there was any
> bioperl function that might address this or am overlooking an easy perl
> function?
> thanks in advance
>
> keith
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://pw600a.bioperl.org/mailman/listinfo/bioperl-l


More information about the Bioperl-l mailing list