Package pal.alignment
Class SimpleAnnotatedAlignment
java.lang.Object
pal.alignment.AbstractAlignment
pal.alignment.SimpleAlignment
pal.alignment.SimpleAnnotatedAlignment
- All Implemented Interfaces:
Serializable,Alignment,AnnotationAlignment,IdGroup,Report
This is the basic implementation of the Annotation interface, which is designed to
provide annotation for an alignment. This annotation can
include information on chromosomal location, site positions, locus name, and the
type of position (exon, intron, etc.) This class is designed for alignments
with a single locus but multiple sites within the locus.
This class does not permit multiple datatypes per alignment.
- Version:
- $Id: SimpleAnnotatedAlignment.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 TypeFieldDescriptionintused to designate chromosomefloatused to designate position along chromosomeused to designate locus namechar[]used to designate position Typefloat[]used to designate weighted position; accounts for gapsFields inherited from class pal.alignment.AbstractAlignment
idGroup, numSeqs, numSites -
Constructor Summary
ConstructorsConstructorDescriptionClone constructor from an unannotated alignment.Clone constructor.SimpleAnnotatedAlignment(AnnotationAlignment a, IdGroup newGroup) This constructor will subset the alignment based on the taxa in IdGroupSimpleAnnotatedAlignment(Identifier[] ids, String[] sequences, String gaps, DataType dt) This constructor creates a basic SimpleAnnotatedAlignment.SimpleAnnotatedAlignment(IdGroup group, String[] sequences, String gaps, DataType dt) This constructor creates a basic SimpleAnnotatedAlignment.SimpleAnnotatedAlignment(IdGroup group, String[] sequences, DataType dt) This constructor creates a basic SimpleAnnotatedAlignment. -
Method Summary
Modifier and TypeMethodDescriptionintgetChromosome(int site) Returns chromosomefloatgetChromosomePosition(int site) Return the position along chromosomegetDataType(int site) Returns the datatype (for SimpleAnnotatedAlignment there is only one datatype)getLocusName(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)voidreport(PrintWriter out) print human readable report (e.g., on parameters and associated model)voidsetChromosome(int chromosome) Sets chromosomevoidsetChromosomePosition(float position) Set the position along chromosomevoidsetLocusName(String locusName) Sets the name of the locusvoidsetPositionType(int site, char posType) Set thes position type (eg.voidsetWeightedLocusPosition(int site, float weightedPos) Sets the weighted position along the gene (handles gaps)Methods inherited from class pal.alignment.SimpleAlignment
getAlignedSequenceString, getDataMethods inherited from class pal.alignment.AbstractAlignment
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
-
chromosomePosition
public float chromosomePositionused to designate position along chromosome -
chromosome
public int chromosomeused to designate chromosome -
weightedPosition
public float[] weightedPositionused to designate weighted position; accounts for gaps -
positionType
public char[] positionTypeused to designate position Type -
locusName
used to designate locus name
-
-
Constructor Details
-
SimpleAnnotatedAlignment
Clone constructor from an unannotated alignment. All annotation is set to defaults -
SimpleAnnotatedAlignment
Clone constructor. -
SimpleAnnotatedAlignment
This constructor will subset the alignment based on the taxa in IdGroup -
SimpleAnnotatedAlignment
This constructor creates a basic SimpleAnnotatedAlignment. The annotation should be added with the set commands. -
SimpleAnnotatedAlignment
This constructor creates a basic SimpleAnnotatedAlignment. The annotation should be added with the set commands. -
SimpleAnnotatedAlignment
This constructor creates a basic SimpleAnnotatedAlignment. The annotation should be added with the set commands.
-
-
Method Details
-
getChromosomePosition
public float getChromosomePosition(int site) Return the position along chromosome- Specified by:
getChromosomePositionin interfaceAnnotationAlignment
-
setChromosomePosition
public void setChromosomePosition(float position) Set the position along chromosome -
getChromosome
public int getChromosome(int site) Returns chromosome- Specified by:
getChromosomein interfaceAnnotationAlignment
-
setChromosome
public void setChromosome(int chromosome) Sets chromosome -
getWeightedLocusPosition
public float getWeightedLocusPosition(int site) Return the weighted position along the gene (handles gaps)- Specified by:
getWeightedLocusPositionin interfaceAnnotationAlignment
-
setWeightedLocusPosition
public void setWeightedLocusPosition(int site, float weightedPos) Sets the weighted position along the gene (handles gaps) -
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
-
setPositionType
public void setPositionType(int site, char posType) Set thes position type (eg. I=intron, E-exon, P=promoter, 1=first, 2=second, 3=third, etc. -
getLocusName
Returns the name of the locus- Specified by:
getLocusNamein interfaceAnnotationAlignment
-
setLocusName
Sets the name of the locus -
getDataType
Returns the datatype (for SimpleAnnotatedAlignment there is only one datatype)- Specified by:
getDataTypein interfaceAnnotationAlignment
-
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
-