[Bioperl-l] question about $feature->add_sub_SeqFeature and
Bio::Graphics
Lincoln Stein
lstein@cshl.org
Sun, 05 Jan 2003 22:25:35 -0500
Here's how you can do it manually:
my $subfeature = Bio::SeqFeature::Generic->new(-start=>1,-end=>100,
-score => 400);
$feature->add_sub_SeqFeature($subfeature,'EXPAND');
The values of -start, -end and -score depend on the blast hit you want to
represent. Each subfeature corresponds to an HSP.
Lincoln
On Sunday 05 January 2003 10:00 pm, June Tantoolvesm wrote:
> Hello,
>
> I hope this hasn't already been answered elsewhere. Please accept my
> apologies if it has, but I've tried searching and I couldn't find enough
> hints.
>
> I am using the Bio::Graphics package. All the code from the
> Bio::Graphics HOWTO works great (thank you very much), but now I am
> trying to modify code example 4, because I am trying to parse an already
> parsed blast output.
>
> I am having trouble with the following piece of code, from example 4 of
> the HOWTO page:
>
> 45 while( my $hsp = $hit->next_hsp ) {
> 46 $feature->add_sub_SeqFeature($hsp,'EXPAND');
> 47 }
>
> Is there another way I can add $hsp->query->start, $hsp->query->end,
> etc., to the newly-created feature, without calling add_sub_SeqFeature?
> Where can I read more about the exact structure of $hsp? Is there a way
> I can use straight perl to add my data (not from the original blast
> output, but from a parsed blast output) to $hsp?
>
> I tried looking in the module codes themselves but they are too
> complicated.
>
> I hope I'm making some sense. Thank you beforehand for any hints.
>
> Best regards,
> June
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
--
Lincoln Stein
lstein@cshl.org
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)