Package pal.alignment
Class StrippedAnnotatedAlignment
java.lang.Object
pal.alignment.AbstractAlignment
pal.alignment.StrippedAlignment
pal.alignment.StrippedAnnotatedAlignment
- All Implemented Interfaces:
Serializable,Alignment,AnnotationAlignment,IdGroup,Report
This is the stripped implementation of the Annotation interface, which is designed to
provide stripped and annotated alignments. This annotation can
include information on chromosomal location, site positions, locus name, and the
type of position (exon, intron, etc.)
This class also add some methods for stripping sites based on frequency, count, and a
range of positions.
- Version:
- $Id: StrippedAnnotatedAlignment.java,v 1
- Author:
- Ed Buckler
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface pal.misc.IdGroup
IdGroup.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected doubleFields inherited from class pal.alignment.StrippedAlignment
alias, notDroppedFields inherited from class pal.alignment.AbstractAlignment
idGroup, numSeqs, numSites -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetChromosome(int site) Returns chromosomefloatgetChromosomePosition(int site) Return the position along chromosomegetDataType(int site) Returns the datatypegetLocusName(int site) Returns the name of the locusintgetLocusPosition(int site) Return the position along the locus (ignores gaps)chargetPositionType(int site) Returns position type (eg.floatgetWeightedLocusPosition(int site) Return the weighted position along the gene (handles gaps)voidremove constant sites but ignore gaps and missing data (- and ?)voidremoveSitesBasedOnFreqIgnoreGapsMissing(double minimumProportion, int minimumCount) remove sites based on minimum frequency (the count of good bases) and based on the proportion of good sites different from consensusvoidremoveSitesOutsideRange(int firstSite, int lastSite) Remove sites based on site position (excluded sites arelastSite) This not effect any prior exclusions. voidreport(PrintWriter out) print human readable report (e.g., on parameters and associated model)Methods inherited from class pal.alignment.StrippedAlignment
dropSite, getData, removeConstantSites, removeGaps, removeNoninformativeSites, removeSites, removeUnknownsMethods inherited from class pal.alignment.AbstractAlignment
getAlignedSequenceString, getChar, getDataType, getIdCount, getIdentifier, getLength, getSequenceCount, getSiteCount, getState, getStates, guessDataType, isGap, isUnknownState, setDataType, setIdentifier, toString, whichIdNumberMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface pal.alignment.Alignment
getAlignedSequenceString, getData, getDataType, getSequenceCount, getSiteCountMethods inherited from interface pal.misc.IdGroup
getIdCount, getIdentifier, setIdentifier, whichIdNumber
-
Field Details
-
minimumProportion
protected double minimumProportion -
minimumCount
protected int minimumCount -
firstSite
protected int firstSite -
lastSite
protected int lastSite
-
-
Constructor Details
-
StrippedAnnotatedAlignment
Simple constructor
-
-
Method Details
-
getChromosomePosition
public float getChromosomePosition(int site) Return the position along chromosome- Specified by:
getChromosomePositionin interfaceAnnotationAlignment
-
getChromosome
public int getChromosome(int site) Returns chromosome- Specified by:
getChromosomein interfaceAnnotationAlignment
-
getWeightedLocusPosition
public float getWeightedLocusPosition(int site) Return the weighted position along the gene (handles gaps)- Specified by:
getWeightedLocusPositionin interfaceAnnotationAlignment
-
getLocusPosition
public int getLocusPosition(int site) Return the position along the locus (ignores gaps)- Specified by:
getLocusPositionin interfaceAnnotationAlignment
-
getPositionType
public char getPositionType(int site) Returns position type (eg. I=intron, E-exon, P=promoter, 1=first, 2=second, 3=third, etc.- Specified by:
getPositionTypein interfaceAnnotationAlignment
-
getLocusName
Returns the name of the locus- Specified by:
getLocusNamein interfaceAnnotationAlignment
-
getDataType
Returns the datatype- Specified by:
getDataTypein interfaceAnnotationAlignment
-
removeSitesOutsideRange
public void removeSitesOutsideRange(int firstSite, int lastSite) Remove sites based on site position (excluded sites arelastSite) This not effect any prior exclusions. - Parameters:
firstSite- first site to keep in the rangelastSite- last site to keep in the range
-
removeConstantSitesIgnoreGapsMissing
public void removeConstantSitesIgnoreGapsMissing()remove constant sites but ignore gaps and missing data (- and ?) -
removeSitesBasedOnFreqIgnoreGapsMissing
public void removeSitesBasedOnFreqIgnoreGapsMissing(double minimumProportion, int minimumCount) remove sites based on minimum frequency (the count of good bases) and based on the proportion of good sites different from consensus- Parameters:
minimumProportion- minimum proportion of sites different from the consensusminimumCount- minimum number of sequences with a good bases (not - or ?)
-
report
Description copied from interface:Reportprint human readable report (e.g., on parameters and associated model)- Specified by:
reportin interfaceAnnotationAlignment- Specified by:
reportin interfaceReport- Overrides:
reportin classAbstractAlignment- Parameters:
out- output stream
-