[Bioperl-l] Question on integrating Bio::Graphics with Bio::SearchIO::Writer::HTMLResultWriter

Anand Venkatraman bioperlanand at yahoo.com
Wed Apr 23 23:05:27 UTC 2008


Hi Jason,

Thanks for the reply.

I am a little lost with the solution suggested. Is that how slide 60 in the pdf is obtained: http://jason.open-bio.org/Bioperl_Tutorials/NESCENT_2007/CSHL_Bioperl_I.pdf

I guess I am missing something quite obvious, I apologize.

What I have & want is this: I have a directory having say 100 different blast reports & hence I am looking to obtain 100 different bioperl formatted blast html outputs with the respective images just as it would appear in the blast report.

Thanks,

Anand

Jason Stajich <jason at bioperl.org> wrote: 

Basically you want to inject your own IMG tags into the file with these routines:


    $writerhtml->start_report(\&my_start_report);
    $writerhtml->title(\&my_title);
    $writerhtml->hit_link_align(\&my_hit_link_align);
    $writerhtml->hit_link_desc(\&my_hit_link_desc);


fgblast shows a way to do this in part. It relies on Gbrowse to generate the image but you can replace the gbrowse_img reference to your own image generating software.
http://people.genome.duke.edu/~jes12/software/scripts/fgblast




-jason
On Apr 22, 2008, at 11:02 PM, Anand Venkatraman wrote:

Hi everybody,


I would like to use Bio::Graphics in conjunction with Bio::SearchIO::Writer::HTMLResultWriter to obtain a HTML formatted blast report output along with an image of the blast hits as shown on Slide 60 in this pdf: http://jason.open-bio.org/Bioperl_Tutorials/NESCENT_2007/CSHL_Bioperl_I.pdf


I am able to get the HTML output using  "Bio::SearchIO::Writer::HTMLResultWriter" and I am able to get the image using the examples outlined in the Bio::Graphics HOWTO: http://www.bioperl.org/wiki/HOWTO:Graphics


My question: How do I integrate Bio::Graphics with Bio::SearchIO::Writer::HTMLResultWriter to render the blast hits image at the correct position in my BioPerl reformatted html file.


I also found that someone else has asked something similar to whatever I am asking & is listed under the "Orphans, Leftovers" category in the ListSummary:April 26-May 9,2006 document: 
http://www.bioperl.org/wiki/ListSummary:April_26-May_9%2C2006#Orphans.2C_Leftovers


Here is my code so far:
----------------------------------------------------------------
#!/usr/bin/perl -w
# usage: $0 <blast_report>
use strict;
use Bio::SearchIO;
use Bio::SearchIO::Writer::HTMLResultWriter;


my $infile = shift or die $!;


my $searchio = new Bio::SearchIO( -format => 'blast',-file   => $infile);
my $writerhtml = new Bio::SearchIO::Writer::HTMLResultWriter();
my $outhtml = new Bio::SearchIO(-writer => $writerhtml,
                                                  -file   => ">${infile}.html");


$outhtml->write_result($searchio->next_result);
----------------------------------------------------------------


Thanks in advance,


Anand




---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
_______________________________________________
Bioperl-l mailing list
Bioperl-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l
 





       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.



More information about the Bioperl-l mailing list