Camelia, the Perl 6 bug

IRC log for #bioperl, 2012-09-13

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

All times shown according to UTC.

Time Nick Message
03:00 f1nst3r joined #bioperl
03:04 gtuckerkellogg joined #bioperl
03:56 f1nst3r joined #bioperl
04:06 f1nst3r_ joined #bioperl
04:11 f1nst3r_ joined #bioperl
04:12 f1nst3r__ joined #bioperl
07:20 carandraug joined #bioperl
07:22 ChanServ joined #bioperl
08:07 leont joined #bioperl
08:32 kai joined #bioperl
11:45 flu joined #bioperl
12:49 jegade_ joined #bioperl
12:53 audy- joined #bioperl
12:57 rbuels- joined #bioperl
12:57 CIA-98 joined #bioperl
12:58 hash_table joined #bioperl
13:14 flu joined #bioperl
13:14 deafferr1t joined #bioperl
14:29 j_wright joined #bioperl
14:29 j_wright joined #bioperl
14:30 j_wright joined #bioperl
14:30 j_wright joined #bioperl
14:30 j_wright joined #bioperl
14:30 j_wright joined #bioperl
14:30 j_wright_ joined #bioperl
14:30 j_wright_ joined #bioperl
14:31 j_wright_ joined #bioperl
14:31 j_wright_ joined #bioperl
14:31 j_wright_ joined #bioperl
14:31 j_wright_ joined #bioperl
14:32 j_wright_ joined #bioperl
14:32 j_wright_ joined #bioperl
14:32 j_wright_ joined #bioperl
14:43 hash_table joined #bioperl
14:44 leprevost joined #bioperl
16:41 rjg_ joined #bioperl
16:43 rjg_ Hi all, is there anyone on here who can help a total novice with what is probably a simple problem?
18:07 saddy joined #bioperl
18:31 rjg_ joined #bioperl
18:33 rbuels rjg_: sure, i can.  sorry about the delay.
18:34 rjg_ hi, no no problem, thank you very much for replying!
18:34 rjg_ so my problem really is that I'm a complete noob perlwise
18:34 saddy joined #bioperl
18:35 rjg_ I've got a set of nucleotide accession numbers, and I would like to retrieve the taxon id's for these without having to download the (rather large) gi_taxid_nucl file from ncbi
18:36 rjg_ I've been hitting my head against this all day, I must've visited every website where this problem is mentioned, but I haven't been able to get a solution to work for me
18:36 rbuels rjg_: you have bioperl installed successfully?
18:37 rjg_ I'm going to say yes to that- I've got several scripts to work for me so far
18:37 rjg_ remote blast and a parser, does that count?
18:37 rjg_ although I am running this through windows (probably won't surprise you!)
18:38 * rbuels facepalms
18:38 rjg_ lol I am going to get cygwin installed.....
18:38 rbuels should still work ...
18:38 * rbuels finds the incantation
18:38 rjg_ lol
18:39 rbuels genbank stuff is always annoying, even for people with lots of computer-foo
18:39 rjg_ knowing what you now know about my operating system, I probably don't have to tell you that you'll have to treat me like I'm less than 16 hours old
18:39 * rbuels chuckles
18:40 rjg_ yes it seems that way- I managed to get a script that turned my accession numbers into species names, but that came along with a whole lot of taxonomic information that I didn't want, and for downstream analysis I'd ideally like just the tax id
18:42 * rbuels nods, is working on it, doesn't do this particular thing very often
18:43 rjg_ thanks a lot for this, I really appreciate it
18:43 rbuels bp_fetch.pl used to be the thing for this, but i'm having problems with it
18:45 rbuels rjg_: do you have GI numbers for the accessions?
18:46 rjg_ I currently have GI numbers, though I think I have a script that can turn GI into acc
18:46 rjg_ these are nucleotide GIs from wgs records, I don't know if that changes anything..
18:49 rbuels rjg_: perl -MBio::DB::Taxonomy -E 'say $_->ncbi_taxid for Bio::DB::Taxonomy->new(-source => "entrez")->get_Taxonomy_Node( -gi => \@ARGV )' 71836523
18:49 rbuels rjg_: the bp_query_entez_taxa.pl script that comes with bioperl can also do this, but it seems to have rotten a bit over time
18:50 rjg_ this is very good of you to help me
18:50 rbuels bp_query_entrez_taxa.pl i mean
18:50 rjg_ please, if you wouldn't mind, could you run me through what that line above is doing?
18:50 rjg_ I understand (just about) that argv is calling something from the command line?
18:51 rbuels rjg_: well, it's a one-liner so it's a little bit golfy (see "perl golf")
18:51 rjg_ lol, I like it- golfy
18:51 rbuels so basically
18:51 rbuels (hole in one)
18:51 rjg_ lol
18:51 rbuels Bio::DB::Taxonomy is the bioperl interface to taxonomy dbs
18:51 rbuels -MBio::DB::Taxonomy, when invoking perl from the command line is the same as "use Bio::DB::Taxonomy;" at the top of the script
18:52 rbuels well actually, here, let me type an equivalent script that's easier to understand
18:52 rjg_ got you
18:52 rjg_ oh thank you
18:52 rjg_ this is really good of you
18:54 rbuels rjg_: https://gist.github.com/3716713
18:54 rbuels rjg_: so, walking through this.
18:55 rjg_ than you so much
18:55 rbuels rjg_: line 5, it uses Bio::DB::Taxonomy, which is the perl interface to taxonomy dbs
18:55 rjg_ thank*
18:55 rbuels rjg_: do "perldoc Bio::DB::Taxonomy" to read about what you can do with that
18:55 rbuels rjg_: line 7, it makes a Bio::DB::Taxonomy that is hooked up to entrez
18:56 rbuels rjg_: line 9, it searches for taxonomy nodes that match any of the given GIs, which are given at the command line
18:57 rbuels rjg_: @ARGV in perl is an array that contains all the command-line arguments given to the script
18:57 rjg_ right, so I type the GIs right into the command line after the perl script?
18:57 rbuels rjg_: yes
18:57 rbuels rjg_: line 11, then it iterates through each of the matches that came back (if any)
18:57 rjg_ this is brilliant, thank you
18:57 rbuels rjg_: and prints the result of calling the ncbi_taxid() method on each one, which returns that node's ncbi taxon id.
18:58 rjg_ So at a risk of this becoming a basic perl lesson, if i wanted to modify this script to put the GI number into it rather than the command line....
18:59 rjg_ gah, no I thought I could figure tha out
18:59 rbuels rjg_: you could replace @ARGV with a literal gi number
18:59 rjg_ would I replace the [@ARGV] with my number?
18:59 rjg_ ah I would!? I'll be giving you a run for your money soon rbuels!
19:00 * rbuels chuckles
19:00 rjg_ this has been so good of you
19:00 rjg_ Say I had many GI numbers in a separate text file, would i just call the text file in place of argv?
19:01 rbuels rjg_: you would need to open the file and parse it, probably
19:01 rbuels rjg_: although there are shortcuts for doing that in perl
19:01 rjg_ right, that opens up a whole dimension...
19:01 rbuels rjg_: you are embarking on a long, dark road my friend
19:01 rjg_ oh I know
19:01 rbuels rjg_: many twisty passages, all alike
19:01 rjg_ I was worrying earlier that this will take me years to understand
19:01 rjg_ but you;ve got to start somewhere, right?
19:02 rbuels rjg_: really, if you're going to be in bio, you will be well served by the time investment
19:02 rbuels rjg_: because most fields are slowly turning into sub-disciplines of logic and computer science
19:02 rjg_ oh without a doubt, the ability to program will be invaluable in the future
19:02 rjg_ there's just so much data out there!
19:03 rbuels rjg_: and this trend is going to accelerate in the coming years with the advent of semantic web technologies, which right now are merely a gleam in the eyes of some madmen
19:03 rjg_ semantic web technologies?!!! damnit, i thought I was catching up by learning perl..... lol
19:04 rjg_ this has been so helpful, I can't thank you enough
19:05 rjg_ If you're busy i will understand completely, and really can't thank you enough for the help you've given, but if you have some time could you take me through how to use a file with a list of GI's- how to open and parse it in the context of your script?
19:07 rbuels hmm, this is getting close to a general perl tutorial now
19:08 rjg_ yes it is a little, which is why I completely understand if you don't have the patience for it
19:08 rjg_ and really thank you so much for the help already
19:09 rjg_ I don't mean to appear ungrateful
19:09 * rbuels tries to find a concise explanation
19:10 rjg_ ...you're too good to the undeserving
19:10 rbuels sigh, the perl documentation is very long-winded.
19:11 rbuels rjg_: the base reference about opening files is http://perldoc.perl.org/perlopentut.html
19:11 rbuels (which is also installed with perl: perldoc perlopentut)
19:11 rbuels rjg_: but, the most useful thing you probably want right now is the magic filehandle
19:11 rjg_ there's more magic involved?
19:12 rjg_ I knew it...you're a wizard
19:14 rbuels dammit, it's harder to explain this stuff than to just do it
19:14 rjg_ I see... the section on indirect filehandles, is that what i'm looking for? I recognise that sort of code from scripts i've looked at
19:15 rbuels rjg_: https://gist.github.com/3716713 now is a version of the program that, if you give a filename of gis to it, will look up taxids for them
19:15 rjg_ holy moly
19:15 rbuels piping the file to it works too
19:16 rjg_ you are a wizard
19:16 rbuels and the reasons this works are mostly contained in perlopentut
19:16 rjg_ oh no.... piping??? lol no don't worry I'll look that up myself :D
19:16 rjg_ so a file with GIs- do these need to be separated by commas, or line breaks?
19:17 rbuels rjg_: line breaks
19:17 rjg_ right thank you this is perfect
19:17 rbuels rjg_: and ... well if they are windows line breaks, i'm not sure it will work
19:18 rbuels rjg_: it might though try it
19:18 rjg_ again, basic perl, but is there any way I could have determined that fact from the code? or is that just a known thing?
19:18 rbuels rjg_: the windows line-breaks thing?
19:18 rjg_ right ok I'll chop that about with a script I heard of to cut the windows junk
19:18 rbuels rjg_: well, that script calls chomp, which takes off line breaks.
19:18 rjg_ no no, that the GI's need to be in line breaks rather than comma separated
19:19 rbuels rjg_: you would know that by the way the while(<>){...} thing is written
19:19 rjg_ oh right.... I was reading a while ago about the difference between unix line breaks and windows ones, I thought I saw a script that could interconvert them
19:19 rbuels rjg_: it sometimes helps to sprinkle a bit of powdered eye of newt on the lower-right corner of your computer screen
19:20 * rbuels chuckles
19:20 rjg_ real laughter was produced
19:20 rjg_ I really am glad you've told me about (<>) that thing
19:21 rjg_ this conversation has moved me perhaps weeks ahead of where I was before it
19:21 rjg_ you see I have noone to ask about this
19:21 rjg_ there's one programmer at my work and he was.... well... unhelpful would be the kindest way to put it
19:22 rjg_ but you, you've been an out and outright star
19:23 rbuels rjg_: thanks.  i try not to be an asshole.
19:23 rbuels rjg_: also, if you don't have any newts around, xenopus works too
19:24 rjg_ lol...... hmmmm...  nope, just zebrafish unfortunately
19:24 rjg_ just....one..more.....question......
19:25 rjg_ when I run the script, I just put the file with the GIs in beside it, right?
19:26 rjg_ ;-) just kidding
19:28 rbuels rjg_: seek the threefold path
19:29 rjg_ lol, thank you sage seer of the future, I hope your path treats you well!
19:29 rjg_ what do you do in your reseach rbuels, when you're not helping retards like me?
19:30 rbuels rjg_: poring over tomes of forgotten knowledge, it seems that "oap" danio embrios can be used as an eye of newt substitute, but you have to dissect out the eyes by hand
19:31 rbuels rjg_: i'm a software developer, working on jbrowse.  see http://jbrowse.org
19:31 rjg_ damnit, only got embryos to hand... they're eyes are particularly difficult to get at....
19:31 rbuels rjg_: indeed.
19:31 rjg_ wow, that looks great! Have I seen it implemented anywhere?
19:32 rjg_ or am I getting confused with gBrowse- is there such a thing?
19:33 rbuels rjg_: JBrowse is kind of the successor to GBrowse.  it's still kind of new, not as mature, doesn't have as many features
19:33 rbuels rjg_: i work partly for ian holmes at berkeley, and partly for lincoln stein at oicr (who is the main gbrowse developer, among other things)
19:34 carandraug joined #bioperl
19:34 carandraug joined #bioperl
19:34 rjg_ I didn't know you could use Gbrowse to stack reads like that.... but i guess I don't use it much
19:34 rjg_ at the risk of showing my complete ignorance, i'm still very much an..... artemis man.....
19:35 rbuels rjg_: oooooho!  an *artemis* man, eh?  wink wink, nudge nudge
19:35 rbuels say no more.
19:35 rjg_ lol lol
19:35 rjg_ you probably feel like you've taken an arrow in the knee talking to me!
19:36 rbuels rjg_: no man, i'm still an adventurer.
19:36 rjg_ GMOD... wow, that's a big group...
19:37 rjg_ don't think I've ever seen so many company logos- are you at liberty to say which one is you?
19:37 rbuels rjg_: it's mostly not companies, mostly academic grousp
19:37 rbuels rjg_: "at liberty to say", lol
19:38 rjg_ sorry yeah, I didn't mean company in the commercial sense
19:38 rjg_ but then its almost impossible to separate academia and business in this day and age
19:38 rbuels i work part for ian holmes at uc berkeley and lincoln stein at OICR, funded by an NIH grant
19:39 rjg_ well I can only wish you the best of luck with it, karma should definitely be coming your way!
19:39 rjg_ although do keep looking befhind you.... I'll be coming up to usurp your throne someday!! muah!
19:40 * rbuels looks around for his throne
19:40 rjg_ lol, thieves guild....
19:40 rbuels if you want to use the loo, just ask, i mean ..
19:40 rjg_ helpful and accomodating, next you'll tell us you can count cards.....
19:40 rbuels commodious.
19:41 rjg_ well rbuels thank you ever so much for all your help
19:41 rbuels rjg_: no problem.
19:41 rjg_ I've gotta run, but I will keep my eye out for Jbrowse and think of you fondly!
19:42 * rbuels waves
19:42 rjg_ but you'll probably be seeing me again round these parts when I have more problems!!! you've been so great, cheers man!
19:49 rjg_ joined #bioperl
19:49 rjg_ rbuels, you still there?
19:49 rbuels rjg_: yep
19:51 rjg_ i just wanted to ask- on the chance that the stuff I'm doing comes to publication, I'd love to be able to acknowledge the help you've given me- obviously you don't want to be giving out your real name on the internet, but do you have a usual method for that sort of thing
19:51 rjg_ ?
19:53 rbuels rjg_: i do give out my real name on the internet.  type /whois rbuels
19:53 rbuels rjg_: or google for rbuels.
19:54 rjg_ I type that in here?
19:54 rbuels rjg_: yeah, the whois
19:54 rjg_ lol! we have the same first name
19:55 rjg_ well, that puts my mind to rest.  Thank you, rbuels.  now all I'll need is your credit card and pin number, and the monies will be transferred to your account.....
19:57 rjg_ :-) well thanks again, if it does get to publication I'll send you a message and let you know!!  Thanks again!
19:57 leont joined #bioperl
19:57 rbuels rjg_: sure, no problem.
19:57 rbuels rjg_: i'm quite finable.
19:57 rbuels rjg_: er, findable
19:58 rjg_ and brilliant too :-) thanks again mate, hopefully run into you again on my travels!
20:22 sl33v3 joined #bioperl
22:18 j_wright joined #bioperl
22:26 hash_table joined #bioperl
22:42 j_wright joined #bioperl

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