Converting BLAST files to HTMLRe: [Bioperl-l] longest ORF (fwd)

David Schibeci schibeci@arginine.murdoch.edu.au
Tue, 3 Sep 2002 14:42:57 +0800 (WST)


I'm trying to convert a BLAST text file to a HTML file using the following
code:

$searchio = new Bio::SearchIO (-format => 'blast', -file => "$PDIR/seq/$i.bls");
$searchio_writer = new Bio::SearchIO::Writer::HTMLResultWriter();
$searchio_out = new Bio::SearchIO(-writer => $searchio_writer, -file => ">$HTDOCS/$PID/$i.html");
$searchio_out->write_result($searchio->next_result);

It produces a HTML file OK, but the start positions for the alignments are
wrong.

For example, the original version:

Query: 1   MKVTSYSR------AAVGAVV------KADSDYVNAHN-ARSGVGM----WDG--AAYAR 41
           MKVTSYSR      A VGA+V       +  DYVNAHN ARS +G+    WD   AAYAR
Sbjct: 1   MKVTSYSRILIILAALVGALVVPLKAQDSQQDYVNAHNQARSQIGVGPMQWDEGLAAYAR 60

Query: 42  NYAN--KGDCR-VHSRG-YGN--AKSGGD-SGVAAVN-WVN-KANYNYDTNTCNGVCGHY 92
           NYAN  KGDCR VHSRG YG   AKSGGD SGVAAVN WVN KANYNYDTNTCNGVCGHY
Sbjct: 61  NYANQLKGDCRLVHSRGPYGENLAKSGGDLSGVAAVNLWVNEKANYNYDTNTCNGVCGHY
120

Query: 93  T-VVWRNSVR-GCAKVRCNNGGT--SCNYD--GNYANK 124
           T VVWRNSVR GCAKVRCNNGGT  SCNYD  GNYAN+
Sbjct: 121 TQVVWRNSVRLGCAKVRCNNGGTIISCNYDPPGNYANQ 158

becomes:

<pre>
Query: 124 MKVTSYSR------AAVGAVV------KADSDYVNAHN-ARSGVGM----WDG--AAYAR 124
           MKVTSYSR      A VGA+V       +  DYVNAHN ARS +G+    WD   AAYAR
Sbjct: 158 MKVTSYSRILIILAALVGALVVPLKAQDSQQDYVNAHNQARSQIGVGPMQWDEGLAAYAR 158
<p>
Query: 184 MKVTSYSR------AAVGAVV------KADSDYVNAHN-ARSGVGM----WDG--AAYAR 184
           MKVTSYSR      A VGA+V       +  DYVNAHN ARS +G+    WD   AAYAR
Sbjct: 218 MKVTSYSRILIILAALVGALVVPLKAQDSQQDYVNAHNQARSQIGVGPMQWDEGLAAYAR 218
<p>
Query: 244 MKVTSYSR------AAVGAVV------KADSDYVNAHN-ARSGVGM----WDG--AAYAR 244
           MKVTSYSR      A VGA+V       +  DYVNAHN ARS +G+    WD   AAYAR
Sbjct: 278 MKVTSYSRILIILAALVGALVVPLKAQDSQQDYVNAHNQARSQIGVGPMQWDEGLAAYAR 278
<p></pre>

What gives?

Cheers,
David

------------------------------------------------------------------------------
David Schibeci
Systems Administrator/Software Developer
Centre for Bioinformatics and Biological Computing
Murdoch University
South Street
Murdoch WA 6150

Phone: 61 8 9360 2961
Fax: 61 8 9360 7238
E-Mail: schibeci@cbbc.murdoch.edu.au