Camelia, the Perl 6 bug

IRC log for #bioperl, 2013-06-20

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

All times shown according to UTC.

Time Nick Message
08:45 bbb_ joined #bioperl
09:37 carandraug joined #bioperl
10:04 denisboyun_ joined #bioperl
11:37 carandraug joined #bioperl
11:37 carandraug joined #bioperl
13:20 denisboyun_ joined #bioperl
13:22 antony03 joined #bioperl
13:22 antony03 hi
13:28 antony03 I have  a problem with one of my code. I want extract only one protein sequence from a huge multifasta database. The code: http://pastebin.com/hvU7v7FP works fine. But, in my db i have some full name, so, if I replace the line 33 by: my @taxa_name= "Bacillus subtilis"; that doesn't works. The script gives an empty file.
14:08 carandraug joined #bioperl
15:07 jhannah antony03: still around?
15:07 antony03 yes i'm here :)
15:07 jhannah yay! looking...
15:07 antony03 I'm looking on the net, but I found nothing
15:09 jhannah so I'm guessing $seq->id isn't "Bsubtilis"
15:09 jhannah maybe add   print $seq->id . "\n";   on line 45?
15:09 jhannah so you can see all the IDs and adjust your code accordingly?
15:11 antony03 in fact, I know all my Id, but when it's not only one word, that doesn't works
15:12 jhannah the $seq->id you're trying to match on is 'Bsubtilis' ?
15:12 jhannah or... you're trying to match multiple sequences, whose IDs contain 'Bsubtilis' ?
15:13 jhannah $fa->write_seq($seq) if ($seq->id /Bsubtilis/i);  ?
15:13 jhannah $fa->write_seq($seq) if ($seq->id =~ /Bsubtilis/i);  ?
15:13 antony03 no, my db have unique name
15:13 jhannah ok, i don't understand your question. maybe show my some data and/or output?
15:14 antony03 ok wait a minut :) Thanks for your help
15:15 jhannah sure :)
15:18 antony03 ok, if this is my code: http://pastebin.com/BvnDAV6j
15:19 antony03 and this is an exemple of my database named protein.tfa: http://pastebin.com/BCFhcTV1
15:19 antony03 and I type that command: perl test.pl -file protein.tfa
15:20 antony03 I got an empty file
15:20 antony03 I know it's because it's a "full name" it looks for the first word, not the full name
15:30 jhannah antony03: ok, here's your code. I added a debugging print: https://github.com/jhannah/s​andbox/tree/master/antony03
15:30 antony03 ok thanks
15:30 jhannah so the FASTA format spec doesn't allow for spaces in the ID
15:33 antony03 yes, is there a way for bypassing this?
15:33 antony03 here is the result of your code: http://pastebin.com/Krjeu9LR
15:33 jhannah afniomonas_laevis   ?
15:33 jhannah Hafniomonas_laevis   ?
15:35 jhannah here's a version w/ underscores: https://github.com/jhannah/s​andbox/tree/master/antony03 (reload)
15:38 antony03 but I can't change the name because i will use the new database with another program who need that specific tag
15:39 jhannah you're violating the FASTA specification, so BioPerl isn't going to help you read it... let me see if that's somewhere other than ID...
15:41 jhannah ya, the rest is in ->desc()   let me show you
15:43 antony03 ok thanks!
15:43 antony03 :)
15:44 jhannah antony03: here you go (reload) https://github.com/jhannah/s​andbox/tree/master/antony03
15:46 antony03 oooo
15:46 antony03 yes that works!
15:46 jhannah that's a pretty ugly hack  :)
15:46 jhannah but hey, whatever works :)
15:47 antony03 I have a last question if you are ok
15:47 jhannah shoot
15:48 antony03 if in the protein file, the name "Hafniomonas laevis" is "Hafniomonas laevis strain B-12345" is this possible to extract the sequence by looking juste for B-12345?
15:49 antony03 or I need to search with the complete name
15:49 jhannah $fa->write_seq($seq) if ($id_and_desc =~ /B-12345);    ?
15:49 jhannah $fa->write_seq($seq) if ($id_and_desc =~ /B-12345/);    ?
15:51 jhannah ya, that seems to work (reload) https://github.com/jhannah/s​andbox/tree/master/antony03
15:54 antony03 yes!
15:56 antony03 and if Chlamydomonas reinhardtii was Chlamydomonas reinhardtii strain A-12345
15:56 antony03 can i do this: my @taxa_name=qw(A-12345 B-12334 );
15:59 carandraug joined #bioperl
16:03 jhannah antony03: maybe like this? (reload) https://github.com/jhannah/s​andbox/tree/master/antony03
16:03 jhannah antony03: I did a bunch of cleanup for you.
16:04 jhannah antony03: please ask any questions you have. Indention is important. :)
16:05 antony03 thanks! wow :)
16:05 antony03 you made my day :P
16:06 antony03 I will study this code now ^^
16:10 jhannah you're welcome. we live to serve.  :)
16:12 antony03 :P
16:43 macph joined #bioperl
17:20 denisboyun_ joined #bioperl
21:29 carandraug joined #bioperl
21:29 carandraug joined #bioperl

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