=== rmg511 is now known as rmg51 [10:28] Morning [13:10] Morning peoples dogs and turkeys [13:11] Don't forget bots. [13:12] the log bot never says anything :-/ === calvin is now known as argv_turk [15:13] gobble [15:27] goob gob [18:28] gooblle === rmg511 is now known as rmg51 === calvin is now known as MutantTurkey [19:38] * InHisName is known as InHisName [19:57] ugh I am struggling with a programming problem [19:57] I want to represent all possible combinations of 4 different letter [19:57] aaaa aaab aaac aaad [19:58] but how to do it? beats the heck out of me, because we don't know how long the string needs to be, that's variable [20:06] ! [20:06] clue ^ [20:07] ? [20:07] do you need the number of possibilities or display all possibilities [20:07] display [20:08] for i in `a a a a a a`; do for j in `b b b b b b`; do for k in `c c c c c c`; echo $i$j$k; done; done; done [20:08] !for i in `a a a a a a`; do for j in `b b b b b b`; do for k in `c c c c c c`; echo $i$j$k; done; done; done [20:08] but how to express that? I dunon [20:21] Not combinations MutantTurkey, permutations [20:23] perl -E '$x = "aaaa"; say $x++ for 1..26**4' [20:25] waltman: can you restrict that to a b c d? [20:25] hey it works too, 456976 items. piped to | wc -l [20:25] or actually acgt [20:26] Oh. You are creating permutations of nucleic acids [20:26] ah [20:28] perl -E '$x = "aaaa"; say $x++ for 1..26**4'|grep '^[actg]*$' [20:29] probably not the best way, but it works :) [20:29] There are lots of ways to do that [20:30] Yep that works too, 256 members = 4**4 [20:31] 456976 = 26 ** 4 [20:32] waltman: you're fast on the draw with that there perl [20:32] :) [20:32] http://hop.perl.plover.com/book/pdf/HigherOrderPerl.pdf # page 135 [20:33] that might be more than you want [20:33] What ! you looked it up first then typed your answer for MutantTurkey ? [20:33] waltman: can you decipher this also? [20:33] mat=bsxfun(@rdivide,mat,sum(mat,1)); %column-normalize [20:33] divides a column of an array by the sum of the column? [20:34] MutantTurkey: I'm just going to look up the functions I don't know in the docs, which I'm sure you're just as capable of as I am :) [20:35] waltman: ok I looked them up [20:35] I just don't understand what "right array divide" is [20:37] http://en.wikipedia.org/wiki/Division_(mathematics)#Left_and_right_division [20:38] right division is what you probably think division should be [20:40] http://abcnews.go.com/Health/heart-attack-grills-unofficial-spokesman-died-heart-attack/story?id=18477145 [20:41] thanks :-) [20:53] truth in advertising? [20:55] waltman: what lab are you in? also is it man-kow-ski? [21:26] I'm in Andy Cohen's lab. And yes.