[Bioperl-l] Bio::SearchIO::axt - getting summary field info

Jason Stajich jason at cgt.duhs.duke.edu
Fri Jan 30 20:14:30 EST 2004


Sorry your 1st sentance didn't make sense - you want the
'values two chromosome name fields'?  The Query sequence name is in
$result->query_name and the hit sequence name is in $hit->name.

Alternatively $hsp->hit->seq_id and $hsp->query->seq_id should also get
you what you want?

So you want to write it like a fasta alignment with gaps?

If you have an HSP you just call
 my $msawriter = Bio::AlignIO->new(-format => 'fasta');

for my $hsp ( $hit->hsps ) {
 # get_aln gives you a Bio::SimpleAlign object
 $msawriter->write_aln($hsp->get_aln);
}

This *should* work, but haven't tested it out.

-jason

On Fri, 30 Jan 2004, Jonathan Lim wrote:

> I'm using Bio::SearchIO::axt to read an axt file and I want to get the values
> two chromosome name fields from the summary lines for each HSP in the axt
> file. I've figured out how to get all the other fields except this one. Which
> method do I call?
>
> Also, is there a simply way, using bioperl, to convert this axt file to
> another format like fasta?
>
> Thanks.
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list