Package org.biojava.bio.program.scf
Class SCF
- java.lang.Object
-
- org.biojava.bio.chromatogram.AbstractChromatogram
-
- org.biojava.bio.program.scf.SCF
-
- All Implemented Interfaces:
Chromatogram
public class SCF extends AbstractChromatogram
AChromatogramas loaded from an SCF v2 or v3 file. Also loads and exposes the SCF format's "private data" and "comments" sections. The quality values from the SCF are stored as additional sequences on the base call alignment. The labels are thePROB_* constants in this class. The values areIntegerAlphabet.IntegerSymbolobjects in the range 0 to 255.- Author:
- Rhett Sutphin (UI CBCB)
-
-
Field Summary
Fields Modifier and Type Field Description static intBYTE_MAX_VALUERepresents the maximum unsigned value of a byte for wrapping purposesstatic java.lang.ObjectPROB_NUC_ABase call alignment sequence label for the probability that call should be A.static java.lang.ObjectPROB_NUC_CBase call alignment sequence label for the probability that call should be C.static java.lang.ObjectPROB_NUC_GBase call alignment sequence label for the probability that call should be G.static java.lang.ObjectPROB_NUC_TBase call alignment sequence label for the probability that call should be T.static java.lang.ObjectPROB_OVERCALLBase call alignment sequence label for the overcall probability.static java.lang.ObjectPROB_SUBSTITUTIONBase call alignment sequence label for the substitution probability.static java.lang.ObjectPROB_UNDERCALLBase call alignment sequence label for the undercall probability.static intSHORT_MAX_VALUERepresents the maximum unsigned value of a short for wrapping purposes-
Fields inherited from interface org.biojava.bio.chromatogram.Chromatogram
DNA, OFFSETS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSCF()Creates a new, completely empty SCF.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SCFcreate(java.io.File f)static SCFcreate(java.io.InputStream in, long alreadyRead)java.util.PropertiesgetComments()Returns the comments fields as aPropertiesmapping.static IntegerAlphabet.SubIntegerAlphabetgetProbabilityAlphabet()protected voidload(java.io.File f)protected voidload(java.io.InputStream in, long initOffset)protected SymbolListreverseComplementBaseCallList(java.lang.Object label)OverridesAbstractChromatogram.reverseComplementBaseCallList(java.lang.Object)to support the 7 quality values from the SCF.protected AbstractChromatogramreverseComplementInstance()Returns a new instance of this AbstractChromatogram subclass for use inAbstractChromatogram.reverseComplement().-
Methods inherited from class org.biojava.bio.chromatogram.AbstractChromatogram
clearTraces, createImmutableAlignment, createImmutableSymbolList, getBaseCalls, getMax, getMax, getSequenceLength, getSignificantBits, getTrace, getTraceLength, reverse, reverseComplement, reverseComplementBaseCalls, setBaseCallAlignment, setBits, setTrace
-
-
-
-
Field Detail
-
BYTE_MAX_VALUE
public static final int BYTE_MAX_VALUE
Represents the maximum unsigned value of a byte for wrapping purposes- See Also:
- Constant Field Values
-
SHORT_MAX_VALUE
public static final int SHORT_MAX_VALUE
Represents the maximum unsigned value of a short for wrapping purposes- See Also:
- Constant Field Values
-
PROB_NUC_A
public static final java.lang.Object PROB_NUC_A
Base call alignment sequence label for the probability that call should be A.
-
PROB_NUC_C
public static final java.lang.Object PROB_NUC_C
Base call alignment sequence label for the probability that call should be C.
-
PROB_NUC_G
public static final java.lang.Object PROB_NUC_G
Base call alignment sequence label for the probability that call should be G.
-
PROB_NUC_T
public static final java.lang.Object PROB_NUC_T
Base call alignment sequence label for the probability that call should be T.
-
PROB_SUBSTITUTION
public static final java.lang.Object PROB_SUBSTITUTION
Base call alignment sequence label for the substitution probability. In versions of the SCF spec before 3.10, this is called spareQual[0].
-
PROB_OVERCALL
public static final java.lang.Object PROB_OVERCALL
Base call alignment sequence label for the overcall probability. In versions of the SCF spec before 3.10, this is called spareQual[1].
-
PROB_UNDERCALL
public static final java.lang.Object PROB_UNDERCALL
Base call alignment sequence label for the undercall probability. In versions of the SCF spec before 3.10, this is called spareQual[2].
-
-
Method Detail
-
create
public static SCF create(java.io.File f) throws java.io.IOException, UnsupportedChromatogramFormatException
- Throws:
java.io.IOExceptionUnsupportedChromatogramFormatException
-
create
public static SCF create(java.io.InputStream in, long alreadyRead) throws java.io.IOException, UnsupportedChromatogramFormatException
- Throws:
java.io.IOExceptionUnsupportedChromatogramFormatException
-
load
protected void load(java.io.File f) throws java.io.IOException, UnsupportedChromatogramFormatException- Throws:
java.io.IOExceptionUnsupportedChromatogramFormatException
-
load
protected void load(java.io.InputStream in, long initOffset) throws java.io.IOException, UnsupportedChromatogramFormatException- Throws:
java.io.IOExceptionUnsupportedChromatogramFormatException
-
getComments
public java.util.Properties getComments()
Returns the comments fields as aPropertiesmapping.
-
reverseComplementInstance
protected AbstractChromatogram reverseComplementInstance()
Description copied from class:AbstractChromatogramReturns a new instance of this AbstractChromatogram subclass for use inAbstractChromatogram.reverseComplement().- Specified by:
reverseComplementInstancein classAbstractChromatogram- Returns:
- a reverse-complemented AbstractChromatogram
-
getProbabilityAlphabet
public static IntegerAlphabet.SubIntegerAlphabet getProbabilityAlphabet()
-
reverseComplementBaseCallList
protected SymbolList reverseComplementBaseCallList(java.lang.Object label)
OverridesAbstractChromatogram.reverseComplementBaseCallList(java.lang.Object)to support the 7 quality values from the SCF. These are handled thus:PROB_SUBSTITUTION,PROB_OVERCALL, andPROB_UNDERCALLare just reversed &returned.PROB_NUC_* returns the reverse of the quality sequence for the complement base.
- Overrides:
reverseComplementBaseCallListin classAbstractChromatogram- Parameters:
label- the label Object- Returns:
- an appropriately reverse-complemented SymbolList, or null if the label is unhandled.
-
-