Perl 6 - the future is here, just unevenly distributed

IRC log for #opentreeoflife, 2014-10-01

| Channels | #opentreeoflife index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:45 towodo joined #opentreeoflife
01:47 ilbot3 joined #opentreeoflife
01:47 Topic for #opentreeoflife is now Open Tree Of Life | opentreeoflife.org | github.com/opentreeoflife | http://irclog.perlgeek.de/opentreeoflife/today
02:13 mtholder joined #opentreeoflife
03:12 kcranstn joined #opentreeoflife
03:19 kcranstn joined #opentreeoflife
04:01 mtholder joined #opentreeoflife
11:04 mtholder joined #opentreeoflife
11:14 kcranstn joined #opentreeoflife
12:59 towodo joined #opentreeoflife
13:00 josephwb1 joined #opentreeoflife
13:16 kcranstn joined #opentreeoflife
13:21 josephwb joined #opentreeoflife
13:22 josephwb left #opentreeoflife
13:50 josephwb1 All: what is the quickest/easiest way to get the tip count from a large newick?
13:51 josephwb1 kcranstn ^
13:52 kcranstn does it have polytomies?
13:52 josephwb1 oh, yes, yes it does
13:52 towodo number of left parens + number of commas
13:52 towodo +1
13:52 kcranstn what towodo said
13:53 towodo you might be able to do it with grep, but maybe not
13:53 josephwb1 - 1?
13:53 towodo oh yes, forget the +1
13:53 towodo there’s got to be a unix one-liner for it. I just don’t know what it is
13:53 josephwb1 it might be #( + #, - 1?
13:54 kcranstn R: http://blog.phytools.org/2011/02/reading-phylogeny-from-newick-cont.html
13:55 towodo hmm. doesn’t work with knuckles. haven’t convinced myself that it’s right
13:56 josephwb1 ah, crap: knuckles
13:56 towodo (a,(b,c)) has two left parens and two commas, but only 3 tips.
13:56 towodo so I think I was wrong
13:56 kcranstn can’t you just split the string on ‘(‘ and ‘)’ and ‘,’
13:57 towodo assuming the internal nodes aren’t labeled… yes, split, remove (using grep), and count. how do you split?
13:57 josephwb1 towodo: for your example, this works: #( + #, -1
13:58 josephwb1 but yes, internal nodes are labelled
13:58 kcranstn http://stackoverflow.com/questions/1059559/python-strings-split-with-multiple-delimiters
13:58 towodo ((a,b,c),(d,e)   3( 4,  lose
13:59 josephwb1 that is not valid
13:59 josephwb1 missing a )
13:59 towodo I meant ((a,b,c),(d,e))
13:59 josephwb1 right, doesn't work
13:59 josephwb1 okay, gotta go to a meeting.
13:59 josephwb1 thanks for thinking this over
14:00 towodo I have a python script…
14:26 kcranstn joined #opentreeoflife
14:45 towodo if no knuckles, isn’t it number of commas + 1 ?
14:52 kcranstn joined #opentreeoflife
15:14 josephwb1 towodo: from kcranstn's link: " It is my belief [readers, please correct me if this is wrong!] that the number of commas + 1 will always correspond to the number of tips in the tree"
15:14 josephwb1 it seems to check out
15:14 towodo yes, I wrote this in irc while you were gone
15:14 towodo assuming no knuckles
15:15 towodo wait, maybe even if there are knuckles
15:15 josephwb1 i see that; just confirming.
15:15 josephwb1 i don't thin knuckles add commas
15:15 josephwb1 i think you are right
15:50 josephwb1 grep -o , treefile | wc -w
15:50 josephwb1 add 1 to that
15:51 towodo foo = `…`; echo $((foo + 1))
15:51 towodo sorry
15:59 josephwb1 perl -ne '$x+=s/,//g;END{$x+=1; print "$x\n"}' treefile
16:03 kcranstn joined #opentreeoflife
16:22 kcranstn joined #opentreeoflife
16:27 josephwb1 this one will count the number of tips in each tree in a file:
16:27 josephwb1 tr -d -c ',\n' < treefile |  awk '{ print length+1; }'
16:57 towodo joined #opentreeoflife
17:00 towodo joined #opentreeoflife
17:39 mtholder joined #opentreeoflife
18:12 kcranstn joined #opentreeoflife
19:11 towodo joined #opentreeoflife
19:41 josephwb1 towodo: some one-liners here: http://unix.stackexchange.com/a/158707/86343
20:31 josephwb1 mtholder: I found the origin of the treeid mismatch: https://github.com/OpenTreeOfLife/treemachine/commit/297c5c9b4bb680d95ec6f25512903dbf5f90668c
20:56 mtholder left #opentreeoflife
21:12 josephwb joined #opentreeoflife
21:44 kcranstn joined #opentreeoflife
22:13 kcranstn joined #opentreeoflife
22:43 kcranstn joined #opentreeoflife
23:32 kcranstn joined #opentreeoflife
23:56 josephwb joined #opentreeoflife

| Channels | #opentreeoflife index | Today | | Search | Google Search | Plain-Text | summary