Camelia, the Perl 6 bug

IRC log for #bioperl, 2009-10-31

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

All times shown according to UTC.

Time Nick Message
02:55 kyanardag_ joined #bioperl
07:13 deafferret joined #bioperl
13:38 bioperl_noob joined #bioperl
13:39 bioperl_noob hello all
13:40 * deafferret waves
13:45 bioperl_noob I have blasted two sequences using bl2seq and got the alignment with the $hsp->get_aln. Later on I want to add the alignment to a html-doc, in clustalw format. I would like to add the whole alignment to a string, so when I write the html-doc the order is more logical. It is driving my crazy
13:48 bioperl_noob I can print out to the console using my $out = Bio::AlignIO->newFh(-format => 'ClustalW'); print $out $aln;
14:20 deafferret um... I'm not sure what question you're asking. You can do whatever you want, in whatever order you want, with those $aln objects
14:20 deafferret how are you creating this 'html-doc' ?
14:23 bioperl_noob i open a file and print to the handle.
14:24 bioperl_noob I would like to avoid printing directly to the file, but rather store the alignment to a string and print that later
14:26 deafferret why store it in a string? just push the $aln object into a hash or array or whatever is convenient for you to retrieve in later
14:29 bioperl_noob but how do I print the align object to the html file surrounded with tags?
14:30 deafferret the same way you'd print it to anywhere else I suppose.  :)
14:30 deafferret what format are you wanting to print the $aln into?
14:31 deafferret you could use an IO::Scalar object to wrote the $aln to a "file" which is actually a scalar in clustalw format
14:31 deafferret then as you print to your html you'd also just dump that IO::Scalar
14:32 bioperl_noob i want to out in clustalw
14:32 deafferret ok. are you wanting just the alignment part? or the whole clustalw file format (headers, footers, etc)
14:32 bioperl_noob ok... being new to perl and all... can you give an example?
14:33 bioperl_noob just the alignment part
14:33 deafferret so you have an $aln object, right?
14:35 deafferret gak   svn: Decompression of svndiff data failed
14:35 * deafferret activates his rbuels violence bot
14:36 bioperl_noob brb
14:38 deafferret bioperl_noob: http://gist.github.com/223096
14:39 deafferret so you could use that to get *exactly* clustalw, or use a simpler version with fewer bells/whistles
14:40 * deafferret wonders if this can be intercepted into IO::Scalar ...
14:41 deafferret 'clustalw' format specification is *everything*, including all the headers/footers/etc. That's what BioPerl does for you in 1 line of code.
14:41 deafferret but I'm not sure that BioPerl really snags just the alignment out of the middle
14:42 * deafferret wonders if he can trick IO::Scalar to do that
14:51 kyanardag_ joined #bioperl
14:52 deafferret hey cool, it works  :)
14:55 deafferret bioperl_noob: http://gist.github.com/223096
14:55 deafferret the only thing wrong with that is the header line
14:56 deafferret I guess you'd have to grep that out or something   (perldoc -f grep)
14:56 deafferret &  commuting, back later
15:43 bioperl_noob sorry - got visitors :-D perfect!! it works like a charm!!
15:43 bioperl_noob thanks!!
16:14 deafferret :)
19:37 ptl joined #bioperl
22:11 kyanardag joined #bioperl

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