package BLAST::M9Statistics;
use Carp;
use warnings;
use strict;


###################################################
sub new {
    my $pkg = shift;
    bless {
	pIdentity     => undef, 
	alnLength     => undef, 
	numMismatches => undef, 
	numGapOpens   => undef, 
	eValue        => undef, 
	bitScore      => undef
    }, $pkg;
}


###################################################
sub setPercentIdentity {
    my $self = shift;
    my $pIdentity = shift or croak "Percent identity is not defined.";
    $self->{pIdentity} = $pIdentity;
}


###################################################
sub setAlignmentLength {
    my $self = shift;
    my $alnLength = shift or croak "Alignment length is not defined.";
    $self->{alnLength} = $alnLength;
}


###################################################
sub setNumMismatches {
    my $self = shift;
    my $numMismatches = shift;
    if( !defined($numMismatches) ){ 
	croak "Number of mismatches is not defined.";
    }
    $self->{numMismatches} = $numMismatches;
}


###################################################
sub setNumGapOpens {
    my $self = shift;
    my $numGapOpens = shift;
    if( !defined($numGapOpens) ){
	croak "Number of gap opens is not defined.";
    }
    $self->{numGapOpens} = $numGapOpens;
}


###################################################
sub setEValue {
    my $self = shift;
    my $eValue = shift;
    if( !defined($eValue) ){ croak "E-value is not defined."; }
    $self->{eValue} = $eValue;
}


###################################################
sub setBitScore {
    my $self = shift;
    my $bitScore = shift or croak "Bit score is not defined.";
    $self->{bitScore} = $bitScore;
}


###################################################
sub getPercentIdentity {
    my $self = shift;
    return $self->{pIdentity};
}


###################################################
sub getAlignmentLength {
    my $self = shift;
    return $self->{alnLength};
}


###################################################
sub getNumMismatches {
    my $self = shift;
    return $self->{numMismatches};
}


###################################################
sub getNumGapOpens {
    my $self = shift;
    return $self->{numGapOpens};
}


###################################################
sub getEValue {
    my $self = shift;
    return $self->{eValue};
}


###################################################
sub getBitScore {
    my $self = shift;
    return $self->{bitScore};
}


1;
