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