Skip to content

Commit

Permalink
final fixes?
Browse files Browse the repository at this point in the history
svn path=/bioperl-live/branches/branch-06/; revision=1592
  • Loading branch information
birney committed Oct 2, 2000
1 parent 0251bc1 commit 5bd89ee
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 23 deletions.
3 changes: 3 additions & 0 deletions Bio/PrimarySeqI.pm
Expand Up @@ -496,6 +496,9 @@ sub trunc{
codon table id (optional) defaults to 1
Final argument set to 1 means do not edit amino terminal codon
Ok. We screwed up here. The main trunk is now ahead of this with
a cleaner interface EB.
=cut

sub translate {
Expand Down
31 changes: 27 additions & 4 deletions Bio/Seq.pm
Expand Up @@ -572,8 +572,8 @@ sub add_SeqFeature {
$self->throw("$feat is not a SeqFeatureI and that's what we expect...");
}

if( $feat->can("seq") ) {
$fseq = $feat->seq;
if( $feat->can("entire_seq") ) {
$fseq = $feat->entire_seq;
$aseq = $self->primary_seq;

if( defined $aseq ) {
Expand All @@ -588,12 +588,35 @@ sub add_SeqFeature {
}
}
} # end of if aseq
} # end of if the feat can seq
} # end of if the feat can entire_seq

push(@{$self->{'_as_feat'}},$feat);
}
}

=head2 feature_count
Title : feature_count
Usage : $seq-feature_count()
Function: Return the number of SeqFeatures attached to a sequence
Example :
Returns : number of SeqFeatures
Args : none
=cut

sub feature_count {
my ($self) = @_;

if (defined($self-{'_as_feat'})) {
return ($#{$self-{'_as_feat'}} + 1);
} else {
return 0;
}
}



=head2 top_SeqFeatures
Title : top_SeqFeatures
Expand Down Expand Up @@ -738,7 +761,7 @@ sub molecule {
=head2 add_date
Title : add_date
Usage : $self->add_domment($ref)
Usage : $self->add_date($ref)
Function: adds a date
Example :
Returns :
Expand Down
6 changes: 3 additions & 3 deletions Bio/SimpleAlign.pm
Expand Up @@ -958,7 +958,7 @@ sub read_MSF{
# alignment section

while( <$fh> ) {
/^\s+(\S+)\s+(.*)$/ && do {
/^\s*(\S+)\s+(.*)$/ && do {
$name = $1;
$str = $2;
if( ! exists $hash{$name} ) {
Expand Down Expand Up @@ -1585,7 +1585,7 @@ sub write_MSF {
#
# ok - heavy handed, but there you go.
#
print "\n//\n";
print $file "\n//\n";

while( $count < $length ) {

Expand Down Expand Up @@ -1621,7 +1621,7 @@ sub write_MSF {
print $file "\n";
} # end of each sequence

print "\n\n";
print $file "\n\n";

$count = $tempcount;
}
Expand Down
29 changes: 14 additions & 15 deletions Bio/Tools/pSW.pm
@@ -1,4 +1,3 @@
## $Id$

#
# BioPerl module for Bio::Tools::pSW
Expand Down Expand Up @@ -187,8 +186,8 @@ sub pairwise_alignment{
$self->set_memory_and_report();
# create engine objects

$t1 = &Bio::Ext::Align::new_Sequence_from_strings($seq1->id(),$seq1->str());
$t2 = &Bio::Ext::Align::new_Sequence_from_strings($seq2->id(),$seq2->str());
$t1 = &Bio::Ext::Align::new_Sequence_from_strings($seq1->id(),$seq1->seq());
$t2 = &Bio::Ext::Align::new_Sequence_from_strings($seq2->id(),$seq2->seq());
$aln = &Bio::Ext::Align::Align_Sequences_ProteinSmithWaterman($t1,$t2,$self->{'matrix'},-$self->gap,-$self->ext);
if( ! defined $aln || $aln == 0 ) {
$self->throw("Unable to build an alignment");
Expand All @@ -203,8 +202,8 @@ sub pairwise_alignment{

# we are going to need the sequences as arrays for convience

@str1 = $seq1->seq();
@str2 = $seq2->seq();
@str1 = split(//, $seq1->seq());
@str2 = split(//, $seq2->seq());

# get out start points

Expand Down Expand Up @@ -253,17 +252,17 @@ sub pairwise_alignment{

$tstr = join('',@ostr1);
$tid = $seq1->id();
$out->addSeq(Bio::Seq->new( -seq=> $tstr,
-start => $start1,
-end => $end1,
-id=>$tid ));
$out->addSeq(Bio::LocatableSeq->new( -seq=> $tstr,
-start => $start1,
-end => $end1,
-id=>$tid ));

$tstr = join('',@ostr2);
$tid = $seq2->id();
$out->addSeq(Bio::Seq->new( -seq=> $tstr,
-start => $start2,
-end => $end2,
-id=> $tid ));
$out->addSeq(Bio::LocatableSeq->new( -seq=> $tstr,
-start => $start2,
-end => $end2,
-id=> $tid ));

# give'm back the alignment

Expand All @@ -283,9 +282,9 @@ sub align_and_show {

$self->set_memory_and_report();

$t1 = &Bio::Ext::Align::new_Sequence_from_strings($seq1->id(),$seq1->str());
$t1 = &Bio::Ext::Align::new_Sequence_from_strings($seq1->id(),$seq1->seq());

$t2 = &Bio::Ext::Align::new_Sequence_from_strings($seq2->id(),$seq2->str());
$t2 = &Bio::Ext::Align::new_Sequence_from_strings($seq2->id(),$seq2->seq());
$aln = &Bio::Ext::Align::Align_Sequences_ProteinSmithWaterman($t1,$t2,$self->{'matrix'},-$self->gap,-$self->ext);
if( ! defined $aln || $aln == 0 ) {
$self->throw("Unable to build an alignment");
Expand Down
27 changes: 27 additions & 0 deletions Changes
@@ -1,5 +1,32 @@
Revision history for Bioperl core modules

0.6.2

There are very few functionality changes but a large
number of software improvements/bug fixes across the package.

o The EMBL/GenBank parsing are improved.

o The Swissprot reading is improved. Swissprot writing
is disabled as it doesn't work at all. This needs to
wait for 0.7 release

o Old syntax calls have been replaced with more modern syntax

o Modules that did not work at all, in particular the Sim4
set have been removed

o Bio::SeqFeature::Generic and Bio::SeqFeature::FeaturePair
have improved compliance with interface specs and documentation

o Mailing list documentation updated throughout the distribution

o Most minor bug fixes have happened.

o The scripts in /examples now work and have the modern syntax
rather than the deprecated syntax


0.6.1 Sun April 2 2000

o Sequences can have Sequence Features attached to them
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Expand Up @@ -75,7 +75,7 @@ use ExtUtils::MakeMaker;
$do_autoload_finesse = 0;
$NAME = 'Bio';
$DISTNAME = "bioperl";
$VERSION = "0.06.0";
$VERSION = "0.06.2";

if( $do_autoload_finesse == 1 ) {
fatal("Autoload finessing does not work at the moment!");
Expand Down

0 comments on commit 5bd89ee

Please sign in to comment.