Package pal.alignment
Class MultiLocusAnnotatedAlignment
java.lang.Object
pal.alignment.AbstractAlignment
pal.alignment.SimpleAlignment
pal.alignment.MultiLocusAnnotatedAlignment
- All Implemented Interfaces:
Serializable
,Alignment
,AnnotationAlignment
,IdGroup
,Report
MultiLocusAnnotatedAlignment is an extension of the SimpleAlignment that includes Annotation, and is designed for multiple
loci. Separate annotation information is stored from each sites. This would be good SNP
SSR type of data, but it would be inefficient for single gene data.
- Version:
- $Id:
- Author:
- Ed Buckler
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface pal.misc.IdGroup
IdGroup.Utils
-
Field Summary
FieldsModifier and TypeFieldDescriptionint[]
used to designate chromosomefloat[]
used to designate position along chromosomeString[]
used to designate locus nameint[]
used to designate position; do not account for gapschar[]
used to designate position TypeDataType[]
provides datatype for each locus separatelyfloat[]
used to designate weighted position; accounts for gapsFields inherited from class pal.alignment.AbstractAlignment
idGroup, numSeqs, numSites
-
Constructor Summary
ConstructorsConstructorDescriptionnull constructor.Basic constructor.Clone constructor for Annotated alignmentMultiLocusAnnotatedAlignment
(AnnotationAlignment a, IdGroup newGroup) This constructor will subset the alignment based on the taxa in IdGroupMultiLocusAnnotatedAlignment
(Identifier[] ids, String[] sequences, String gaps, DataType dt) MultiLocusAnnotatedAlignment
(IdGroup group, String[] sequences, String gaps, DataType dt) MultiLocusAnnotatedAlignment
(IdGroup group, String[] sequences, DataType dt) -
Method Summary
Modifier and TypeMethodDescriptionint
getChromosome
(int site) Returns chromosomefloat
getChromosomePosition
(int site) Return the position along chromosomegetDataType
(int site) Returns the datatypegetLocusName
(int site) Returns the name of the locusint
getLocusPosition
(int site) Return the position along the locus (ignores gaps)char
getPositionType
(int site) Returns position type (eg.float
getWeightedLocusPosition
(int site) Return the weighted position along the gene (handles gaps)protected void
protected void
void
setChromosome
(int chromosome, int site) Sets chromosomevoid
setChromosomePosition
(float position, int site) Set the position along chromosomevoid
setLocusName
(String locusName, int site) Sets the name of the locusvoid
setLocusPosition
(int position, int site) Set the position within the locusvoid
setPositionType
(int site, char posType) Set thes position type (eg.void
setWeightedLocusPosition
(int site, float weightedPos) Sets the weighted position along the gene (handles gaps)Methods inherited from class pal.alignment.SimpleAlignment
getAlignedSequenceString, getData
Methods inherited from class pal.alignment.AbstractAlignment
getChar, getDataType, getIdCount, getIdentifier, getLength, getSequenceCount, getSiteCount, getState, getStates, guessDataType, isGap, isUnknownState, report, setDataType, setIdentifier, toString, whichIdNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface pal.alignment.Alignment
getAlignedSequenceString, getData, getDataType, getSequenceCount, getSiteCount
Methods inherited from interface pal.alignment.AnnotationAlignment
report
Methods 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 -
locusPosition
public int[] locusPositionused to designate position; do not account for gaps -
positionType
public char[] positionTypeused to designate position Type -
locusName
used to designate locus name -
siteDataType
provides datatype for each locus separately
-
-
Constructor Details
-
MultiLocusAnnotatedAlignment
Basic constructor. -
MultiLocusAnnotatedAlignment
public MultiLocusAnnotatedAlignment()null constructor. -
MultiLocusAnnotatedAlignment
Clone constructor for Annotated alignment -
MultiLocusAnnotatedAlignment
-
MultiLocusAnnotatedAlignment
-
MultiLocusAnnotatedAlignment
-
MultiLocusAnnotatedAlignment
This constructor will subset the alignment based on the taxa in IdGroup
-
-
Method Details
-
initMatrices
protected void initMatrices() -
init
-
getChromosomePosition
public float getChromosomePosition(int site) Return the position along chromosome- Specified by:
getChromosomePosition
in interfaceAnnotationAlignment
-
setChromosomePosition
public void setChromosomePosition(float position, int site) Set the position along chromosome -
getChromosome
public int getChromosome(int site) Returns chromosome- Specified by:
getChromosome
in interfaceAnnotationAlignment
-
setChromosome
public void setChromosome(int chromosome, int site) Sets chromosome -
getWeightedLocusPosition
public float getWeightedLocusPosition(int site) Return the weighted position along the gene (handles gaps)- Specified by:
getWeightedLocusPosition
in 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:
getLocusPosition
in interfaceAnnotationAlignment
-
setLocusPosition
public void setLocusPosition(int position, int site) Set the position within the locus -
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:
getPositionType
in 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:
getLocusName
in interfaceAnnotationAlignment
-
setLocusName
Sets the name of the locus -
getDataType
Returns the datatype- Specified by:
getDataType
in interfaceAnnotationAlignment
-