class Bio::Scf

Description

This class inherits from the SangerChromatogram superclass. It captures the information contained within an scf format chromatogram file generated by DNA sequencing. See the SangerChromatogram class for usage

Attributes

aqual[RW]

The quality of each base at each position along the length of the sequence is captured by the nqual attributes where n is one of a, c, g or t. Generally the quality will be high for the base that is called at a particular position and low for all the other bases. However at positions of poor sequence quality, more than one base may have similar top scores. By analysing the nqual attributes it may be possible to determine if the base calling was correct or not. The quality of the A base at each sequence position

comments[RW]

A hash of extra information extracted from the chromatogram file

cqual[RW]

The quality of the C base at each sequence position

gqual[RW]

The quality of the G base at each sequence position

tqual[RW]

The quality of the T base at each sequence position

Public Class Methods

new(string) click to toggle source

see SangerChromatogram class for how to create an Scf object and its usage

# File lib/bio/db/sanger_chromatogram/scf.rb, line 37
def initialize(string)
  header = string.slice(0,128)
  # read in header info
  @chromatogram_type, @samples, @sample_offset, @bases, @bases_left_clip, @bases_right_clip, @bases_offset, @comment_size, @comments_offset, @version, @sample_size, @code_set, @header_spare = header.unpack("a4 NNNNNNNN a4 NN N20")
  get_traces(string)
  get_bases_peakIndices_and_qualities(string)
  get_comments(string)
  if @comments["DYEP"]
    @dye_mobility = @comments["DYEP"]
  else
    @dye_mobility = "Unnown"
  end
end