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 StringPROB_NUC_ABase call alignment sequence label for the probability that call should be A.static StringPROB_NUC_CBase call alignment sequence label for the probability that call should be C.static StringPROB_NUC_GBase call alignment sequence label for the probability that call should be G.static StringPROB_NUC_TBase call alignment sequence label for the probability that call should be T.static ObjectPROB_OVERCALLBase call alignment sequence label for the overcall probability.static ObjectPROB_SUBSTITUTIONBase call alignment sequence label for the substitution probability.static 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(File f)static SCFcreate(InputStream in, long alreadyRead)PropertiesgetComments()Returns the comments fields as aPropertiesmapping.static IntegerAlphabet.SubIntegerAlphabetgetProbabilityAlphabet()protected voidload(File f)protected voidload(InputStream in, long initOffset)protected SymbolListreverseComplementBaseCallList(String 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, reverseComplementBaseCallList, 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 String PROB_NUC_A
Base call alignment sequence label for the probability that call should be A.- See Also:
- Constant Field Values
-
PROB_NUC_C
public static final String PROB_NUC_C
Base call alignment sequence label for the probability that call should be C.- See Also:
- Constant Field Values
-
PROB_NUC_G
public static final String PROB_NUC_G
Base call alignment sequence label for the probability that call should be G.- See Also:
- Constant Field Values
-
PROB_NUC_T
public static final String PROB_NUC_T
Base call alignment sequence label for the probability that call should be T.- See Also:
- Constant Field Values
-
PROB_SUBSTITUTION
public static final 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 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 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].
-
-
Constructor Detail
-
SCF
protected SCF()
Creates a new, completely empty SCF.
-
-
Method Detail
-
create
public static SCF create(File f) throws IOException, UnsupportedChromatogramFormatException
-
create
public static SCF create(InputStream in, long alreadyRead) throws IOException, UnsupportedChromatogramFormatException
-
load
protected void load(File f) throws IOException, UnsupportedChromatogramFormatException
-
load
protected void load(InputStream in, long initOffset) throws IOException, UnsupportedChromatogramFormatException
-
getComments
public 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(String 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.
-
-