ABI

 view release on metacpan or  search on metacpan

ABI.pm  view on Meta::CPAN

	} else {
		$self->set_file_handle($file);
	}
	$self->{_sequence}             = "";
	$self->{_sequence_corrected}   = "";
	$self->{_sample}               = "";
	$self->{A}                     = [];
	$self->{T}                     = [];
	$self->{G}                     = [];
	$self->{C}                     = [];
	$self->{_basecalls}            = [];
	$self->{_basecalls_corrected}  = [];
	$self->{_trace_length}         = 0;
	$self->{_seq_length}           = 0;
	$self->{_seq_length_corrected} = 0;
	$self->{_abs_index}            = 26;
	$self->{_index}                = undef;
	$self->{PLOC1}                 = undef;
	$self->{PLOC}                  = undef;
	$self->{_a_start}              = undef;
	$self->{_g_start}              = undef;
	$self->{_c_start}              = undef;

ABI.pm  view on Meta::CPAN

	$self->{SMPL} += $self->{_mac_header};
}

sub _set_base_calls {
	my $self = shift;
	my $buf;
	my $length = $self->{_seq_length} * 2;
	my $fh     = $self->{_fh};
	seek( $fh, $self->{PLOC}, 0 );
	read( $fh, $buf, $length );
	@{ $self->{_basecalls} } = unpack( "n" x $length, $buf );

	# print "@{$self->{_basecalls}}" , "\n";
}

sub _set_corrected_base_calls {
	my $self = shift;
	my $buf;
	my $length = $self->{_seq_length_corrected} * 2;
	my $fh     = $self->{_fh};
	seek( $fh, $self->{PLOC1}, 0 );
	read( $fh, $buf, $length );
	@{ $self->{_basecalls_corrected} } = unpack( "n" x $length, $buf );
}

sub _set_seq {
	my $self = shift;
	my $buf;
	my $length = $self->{_seq_length};
	my $fh     = $self->{_fh};
	seek( $fh, $self->{PBAS2}, 0 );
	read( $fh, $buf, $length );
	$self->{_sequence} = $buf;

ABI.pm  view on Meta::CPAN

sub get_trace_length {
	my $self = shift;
	return $self->{_trace_length};
}

=head2 get_base_calls()

  Title    : get_base_calls()
  Usage    : my @base_calls = $abi->get_base_calls();
  Function : Returns the called bases by the base caller. This method will return the unedited 
  	         original basecalls created by the basecaller.
  Args     : Nothing
  Returns  : An array

=cut

sub get_base_calls {
	my $self = shift;
	return @{ $self->{_basecalls} };
}

=head2 get_corrected_base_calls()

  Title    : get_corrected_base_calls()
  Usage    : my @base_calls = $abi->get_corrected_base_calls();
  Function : If you have edited the trace file you can get the corrected base call 
             with this method
  Args     : Nothing
  Returns  : An array

=cut

sub get_corrected_base_calls {
	my $self = shift;
	return @{ $self->{_basecalls_corrected} };
}

=head2 get_sample_name()

  Title    : get_sample_name()
  Usage    : my $sample = $abi->get_sample_name();
  Function : Returns hard coded sample name
  Args     : Nothing
  Returns  : A scalar

Changes  view on Meta::CPAN

#$Id: Changes,v 1.1.1.1.2.2 2006/11/20 03:18:12 malay Exp $

Revision history for Perl extension ABI.

1.0  Sat Nov  18  04:22:53 2006
	- Changed to Module::Build system
	- Added test data
	- Changed to Test::More
	- Access to user modified sequence
	- Access to user modified basecalls
	

0.01  Thu May  2 04:22:53 2002
	- original version; created by h2xs 1.21 with options
		-XA -n ABI



( run in 1.590 second using v1.01-cache-2.11-cpan-39bf76dae61 )