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
37 def initialize(string)
38   header = string.slice(0,128)
39   # read in header info
40   @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")
41   get_traces(string)
42   get_bases_peakIndices_and_qualities(string)
43   get_comments(string)
44   if @comments["DYEP"]
45     @dye_mobility = @comments["DYEP"]
46   else
47     @dye_mobility = "Unnown"
48   end
49 end