[Bioperl-l] K-mer generating script

diriano at uni-potsdam.de diriano at uni-potsdam.de
Sat Dec 20 13:30:32 UTC 2008


Dear Marco,

just another option, why not just counting?

Any DNA sequence is a number in base four (4),isn't it?  So you yous  
have to count from zero to the number (in base 4) that you want.

I have a script that does this, among other things, you can have a look at:

http://diriano.googlepages.com/matrix_realizations.txt

the relevant section is "Transcode base 4 numbers into DNA words", it  
uses Math::BigInt and Math::BaseArith.

Hope this helps as the otehrs.

Best,

Diego

Quoting "Blanchette, Marco" <MAB at stowers-institute.org>:

> Dear all,
>
> Does anyone have a little function that I could use to generate all   
> possible k-mer DNA sequences? For instance all possible 3-mer (AAA,   
> AAT, AAC, AAG, etc...). I need something that I could input the   
> value of k and get all possible sequences...
>
> I know that it's a problem that need to use recursive programming   
> but I can't get my brain around the problem.
>
> Many thanks
>
> Marco
> --
> Marco Blanchette, Ph.D.
> Assistant Investigator
> Stowers Institute for Medical Research
> 1000 East 50th St.
>
> Kansas City, MO 64110
>
> Tel: 816-926-4071
> Cell: 816-726-8419
> Fax: 816-926-2018
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



-- 

Diego Mauricio Riano Pachon
Biologist
Institute of Biology and Biochemistry
University of Potsdam
Karl-Liebknecht-Str. 24-25
Haus 20
14476 Golm
Germany
Tel:0331/977-2809
http://www.geocities.com/dmrp.geo/





More information about the Bioperl-l mailing list