[Bioperl-l] getting the Sbjct database from a hit

Catherine Letondal letondal@pasteur.fr
Sat, 07 Oct 2000 18:13:55 +0200


Hilmar Lapp writes:
> First, usually you don't create Sbjct objects yourself, but obtain them
> from a Bio::Tools::Blast object created from a BLAST report. As you're
> writing this first, I assume that's in fact what you're doing.
> 
> I'm not sure what you're referring to with the database() method. If you
> want to get the name of the database the sequence was searched against,
> you can simply call $blast->database(). 

Actually I need the database of the subject - since the searched database may be
a non-redundant database containing entries from pir or swissprot :
[...]
sp|P02914|MALK_ECOLI MALTOSE/MALTODEXTRIN TRANSPORT ATP-BINDING ...   738  0.0
pir||MMECMK inner membrane protein malK - Escherichia coli >gi|4...   734  0.0
sp|P19566|MALK_SALTY MALTOSE/MALTODEXTRIN TRANSPORT ATP-BINDING ...   696  0.0
pir||S05329 inner membrane protein malK - Salmonella typhimurium      689  0.0
[...]

> To obtain the database containing
> the hit (i.e., the database part of the identifier for those cases in
> which the identifier is a compound of database and accession) you have to
> interpret $hit->name() yourself, as the documentation tells.
> $hit->database() will only return a dash ('-').

That's right! But the name $hit->name() does *not* return the database in it:

For example, for the hit:

	sp|Q00752|MSMK_STRMU MULTIPLE SUGAR-BINDING TRANSPORT ATP-BINDI...   298  2e-81

This statement: 
	print STDERR "hit name: ",$hit->name,"\n";
prints:
	hit name: Q00752/MSMK_STRMU
The 'sp' has disappeared...

--
Catherine Letondal -- Pasteur Institute Computing Center