Bio::Tools::HMMER Domain
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::Tools::HMMER::Domain - One particular domain hit from HMMER
Package variables
No package variables defined.
Included modules
Bio::SeqFeature::FeaturePair
Bio::SeqFeature::Generic
strict
Inherit
Bio::SeqFeature::FeaturePair
Synopsis
Read the Bio::Tools::HMMER::Results docs
Description
A particular domain score. We reuse the Homol SeqFeature system
here, so this inherits off Homol SeqFeature. As this code
originally came from a separate project, there are some backward
compatibility stuff provided to keep this working with old code.
Don't forget this inherits off Bio::SeqFeature, so all your usual
nice start/end/score stuff is ready for use.
Methods
add_alignment_lineDescriptionCode
bitsDescriptionCode
each_alignment_lineDescriptionCode
end_hmm
No description
Code
end_seq
No description
Code
evalueDescriptionCode
get_nseDescriptionCode
hmm_rangeDescriptionCode
hmmaccDescriptionCode
hmmnameDescriptionCode
new
No description
Code
seq_rangeDescriptionCode
seqbitsDescriptionCode
start_hmm
No description
Code
start_seq
No description
Code
Methods description
add_alignment_linecode    nextTop
 Title   : add_alignment_line
Usage : $domain->add_alignment_line($line_from_hmmer_output);
Function: add an alignment line to this Domain object
Returns : Nothing
Args : scalar
Adds an alignment line, mainly for storing the HMMER alignments as flat text which can be reguritated. You're right. This is *not nice* and not the right way to do it. C'est la vie.
bitscodeprevnextTop
 Title   : bits
Usage :
Function: backward compatibility. Same as score
Example :
Returns :
Args :
each_alignment_linecodeprevnextTop
 Title   : each_alignment_line
Usage : foreach $line ( $domain->each_alignment_line )
Function: reguritates the alignment lines as they were fed in.
only useful realistically for printing.
Example :
Returns :
Args : None
evaluecodeprevnextTop
 Title   : evalue
Usage :
Function: $domain->evalue($value);
Example :
Returns :
Args :
get_nsecodeprevnextTop
 Title   : get_nse
Usage : $domain->get_nse()
Function: Provides a seqname/start-end format, useful
for unique keys. nse stands for name-start-end
It is used alot in Pfam
Example :
Returns : A string
Args : Optional seperator 1 and seperator 2 (default / and -)
hmm_rangecodeprevnextTop
 Title   : hmm_range
Usage :
Function: Throws an exception to catch scripts which need to upgrade
Example :
Returns :
Args :
hmmacccodeprevnextTop
 Title   : hmmacc
Usage : $domain->hmmacc($newacc)
Function: set get for HMM accession number. This is placed in the homol
feature of the HMM
Example :
Returns :
Args :
hmmnamecodeprevnextTop
 Title   : hmmname
Usage : $domain->hmmname($newname)
Function: set get for HMM accession number. This is placed in the homol
feature of the HMM
Example :
Returns :
Args :
seq_rangecodeprevnextTop
 Title   : seq_range
Usage :
Function: Throws an exception to catch scripts which need to upgrade
Example :
Returns :
Args :
seqbitscodeprevnextTop
 Title   : seqbits
Usage :
Function: $domain->seqbits($value);
Example :
Returns :
Args :
Methods code
add_alignment_linedescriptionprevnextTop
sub add_alignment_line {
    my $self = shift;
    my $line = shift;
    push(@{$self->{'alignlines'}},$line);
}
bitsdescriptionprevnextTop
sub bits {
   my ($self,$sc) = @_;

   return $self->score($sc);
}
each_alignment_linedescriptionprevnextTop
sub each_alignment_line {
    my $self = shift;
    return @{$self->{'alignlines'}};
}
end_hmmdescriptionprevnextTop
sub end_hmm {
    my $self = shift;
    my $end = shift;

    $self->warn("Using old domain->end_hmm. Should use domain->hend");
    return $self->hend($end);
}
end_seqdescriptionprevnextTop
sub end_seq {
    my $self = shift;
    my $end = shift;

    $self->warn("Using old domain->end_seq. Should use domain->end");
    return $self->end($end);
}

#  =head2 start_hmm
# Title : start_hmm
# Usage : Backward compatibility with old HMMER modules, and
# for convience. Equivalent to $self->homol_SeqFeature->start
# Function:
# Example :
# Returns :
# Args :
# =cut
}
evaluedescriptionprevnextTop
sub evalue {
   my ($self,$value) = @_;

   if( defined $value ) {
       $self->add_tag_value('evalue',$value);
   }
   my @vals = $self->each_tag_value('evalue');
   return shift @vals;
}
get_nsedescriptionprevnextTop
sub get_nse {
    my $self = shift;
    my $sep1 = shift;
    my $sep2 = shift;

    if( !defined $sep2 ) {
	$sep2 = "-";
    }
    if( !defined $sep1 ) {
	$sep1 = "/";
    }

    return sprintf("%s%s%d%s%d",$self->seq_id,$sep1,$self->start,$sep2,$self->end);
}


#  =head2 start_seq
# Title : start_seq
# Usage : Backward compatibility with old HMMER modules.
# should use $domain->start
# Function:
# Example :
# Returns :
# Args :
# =cut
}
hmm_rangedescriptionprevnextTop
sub hmm_range {
   my ($self,@args) = @_;

   $self->throw("You have accessed an old method. Please recode your script to the new bioperl HMMER module");
}

1;  # says use was ok
__END__
}
hmmaccdescriptionprevnextTop
sub hmmacc {
   my ($self,$acc) = @_;
   if( defined $acc ) {
       $self->feature2->add_tag_value('accession',$acc);
   }
   my @vals = $self->feature2->each_tag_value('accession');
   return shift @vals;
}
hmmnamedescriptionprevnextTop
sub hmmname {
   my ($self,$hname) = @_;


   if( defined $hname ) {
       $self->hseqname($hname);
   } 

   return $self->hseqname();
}
newdescriptionprevnextTop
sub new {
   my($class,@args) = @_;
  my $self = $class->SUPER::new(@args);

  $self->{'alignlines'} = [];

  my $hmmf1 = Bio::SeqFeature::Generic->new(@args);
  my $hmmf2 = Bio::SeqFeature::Generic->new(@args);

  $self->feature1($hmmf1);
  $self->feature2($hmmf2);

  return $self;
}
seq_rangedescriptionprevnextTop
sub seq_range {
   my ($self,@args) = @_;

   $self->throw("You have accessed an old method. Please recode your script to the new bioperl HMMER module");
}
seqbitsdescriptionprevnextTop
sub seqbits {
   my ($self,$value) = @_;
   if( defined $value ) {
       $self->add_tag_value('seqbits',$value);
   }
   my @vals = $self->each_tag_value('seqbits');
   return shift @vals;
}
start_hmmdescriptionprevnextTop
sub start_hmm {
     my $self = shift; 
    my $start = shift; 
    $self->warn("Using old domain->start_hmm. Should use domain->hstart");
    return $self->hstart($start); 
}

#  =head2 end_hmm
# Title : end_hmm
# Usage : Backward compatibility with old HMMER modules, and
# for convience. Equivalent to $self->homol_SeqFeature->start
# Function:
# Example :
# Returns :
# Args :
# =cut
}
start_seqdescriptionprevnextTop
sub start_seq {
    my $self = shift;
    my $start = shift;
    
    $self->warn("Using old domain->start_seq. Should use domain->start");
    return $self->start($start);
}

#  =head2 end_seq
# Title : end_seq
# Usage : Backward compatibility with old HMMER modules.
# should use $domain->end
# Function:
# Example :
# Returns :
# Args :
# =cut
}
General documentation
CONTACTTop
Ewan Birney, birney@ebi.ac.uk
CONTRIBUTORSTop
Jason Stajich, jason@bioperl.org
APPENDIXTop
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _