[Bioperl-guts-l] bioperl-live/Bio/DB/SeqFeature NormalizedFeature.pm, 1.17, 1.18
Lincoln Stein
lstein at dev.open-bio.org
Sun Oct 1 20:09:59 EDT 2006
Update of /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature
In directory dev.open-bio.org:/tmp/cvs-serv21183/Bio/DB/SeqFeature
Modified Files:
NormalizedFeature.pm
Log Message:
output of gff3_string() method now matches input to GFF3 loader
Index: NormalizedFeature.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/SeqFeature/NormalizedFeature.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** NormalizedFeature.pm 1 Oct 2006 17:15:30 -0000 1.17
--- NormalizedFeature.pm 2 Oct 2006 00:09:57 -0000 1.18
***************
*** 456,464 ****
}
if ($min_tstart < $tstart or $max_tend > $tend) {
! $self->{attributes}{Target}[0] = join "\t",($seqid,$min_tstart,$max_tend,$strand||'');
}
}
}
sub _create_subfeatures {
my $self = shift;
--- 456,487 ----
}
if ($min_tstart < $tstart or $max_tend > $tend) {
! $self->{attributes}{Target}[0] = join ' ',($seqid,$min_tstart,$max_tend,$strand||'');
}
}
}
+ # undo the load_id and Target hacks on the way out
+ sub format_attributes {
+ my $self = shift;
+ my $parent = shift;
+ my $load_id = $self->load_id || '';
+ my ($target) = split /\s+/,($self->attributes('Target'))[0];
+ $target ||= '';
+ my @tags = $self->all_tags;
+ my @result;
+ for my $t (@tags) {
+ my @values = $self->each_tag_value($t);
+ @values = grep {$_ ne $load_id && $_ ne $target} @values if $t eq 'Alias';
+ next if defined($load_id) && $t eq 'load_id';
+ push @result,join '=',$self->escape($t),$self->escape($_) foreach @values;
+ }
+ my $id = $self->load_id || $self->primary_id;
+ my $name = $self->display_name;
+ push @result,"ID=".$self->escape($id) if defined $id;
+ push @result,"Parent=".$self->escape($parent->primary_id) if defined $parent;
+ push @result,"Name=".$self->escape($name) if defined $name;
+ return join ';', at result;
+ }
+
sub _create_subfeatures {
my $self = shift;
More information about the Bioperl-guts-l
mailing list