Package pal.alignment
Class MultiLocusAnnotatedAlignment
- java.lang.Object
-
- pal.alignment.AbstractAlignment
-
- pal.alignment.SimpleAlignment
-
- pal.alignment.MultiLocusAnnotatedAlignment
-
- All Implemented Interfaces:
java.io.Serializable,Alignment,AnnotationAlignment,IdGroup,Report
public class MultiLocusAnnotatedAlignment extends SimpleAlignment implements AnnotationAlignment
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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface pal.misc.IdGroup
IdGroup.Utils
-
-
Field Summary
Fields Modifier and Type Field Description int[]chromosomeused to designate chromosomefloat[]chromosomePositionused to designate position along chromosomejava.lang.String[]locusNameused to designate locus nameint[]locusPositionused to designate position; do not account for gapschar[]positionTypeused to designate position TypeDataType[]siteDataTypeprovides datatype for each locus separatelyfloat[]weightedPositionused to designate weighted position; accounts for gaps-
Fields inherited from class pal.alignment.AbstractAlignment
idGroup, numSeqs, numSites
-
-
Constructor Summary
Constructors Constructor Description MultiLocusAnnotatedAlignment()null constructor.MultiLocusAnnotatedAlignment(Alignment a)Basic constructor.MultiLocusAnnotatedAlignment(AnnotationAlignment a)Clone constructor for Annotated alignmentMultiLocusAnnotatedAlignment(AnnotationAlignment a, IdGroup newGroup)This constructor will subset the alignment based on the taxa in IdGroupMultiLocusAnnotatedAlignment(Identifier[] ids, java.lang.String[] sequences, java.lang.String gaps, DataType dt)MultiLocusAnnotatedAlignment(IdGroup group, java.lang.String[] sequences, java.lang.String gaps, DataType dt)MultiLocusAnnotatedAlignment(IdGroup group, java.lang.String[] sequences, DataType dt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetChromosome(int site)Returns chromosomefloatgetChromosomePosition(int site)Return the position along chromosomeDataTypegetDataType(int site)Returns the datatypejava.lang.StringgetLocusName(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)protected voidinit(IdGroup group, java.lang.String[] sequences)protected voidinitMatrices()voidsetChromosome(int chromosome, int site)Sets chromosomevoidsetChromosomePosition(float position, int site)Set the position along chromosomevoidsetLocusName(java.lang.String locusName, int site)Sets the name of the locusvoidsetLocusPosition(int position, int site)Set the position within 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, 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 Detail
-
chromosomePosition
public float[] chromosomePosition
used to designate position along chromosome
-
chromosome
public int[] chromosome
used to designate chromosome
-
weightedPosition
public float[] weightedPosition
used to designate weighted position; accounts for gaps
-
locusPosition
public int[] locusPosition
used to designate position; do not account for gaps
-
positionType
public char[] positionType
used to designate position Type
-
locusName
public java.lang.String[] locusName
used to designate locus name
-
siteDataType
public DataType[] siteDataType
provides datatype for each locus separately
-
-
Constructor Detail
-
MultiLocusAnnotatedAlignment
public MultiLocusAnnotatedAlignment(Alignment a)
Basic constructor.
-
MultiLocusAnnotatedAlignment
public MultiLocusAnnotatedAlignment()
null constructor.
-
MultiLocusAnnotatedAlignment
public MultiLocusAnnotatedAlignment(AnnotationAlignment a)
Clone constructor for Annotated alignment
-
MultiLocusAnnotatedAlignment
public MultiLocusAnnotatedAlignment(Identifier[] ids, java.lang.String[] sequences, java.lang.String gaps, DataType dt)
-
MultiLocusAnnotatedAlignment
public MultiLocusAnnotatedAlignment(IdGroup group, java.lang.String[] sequences, DataType dt)
-
MultiLocusAnnotatedAlignment
public MultiLocusAnnotatedAlignment(IdGroup group, java.lang.String[] sequences, java.lang.String gaps, DataType dt)
-
MultiLocusAnnotatedAlignment
public MultiLocusAnnotatedAlignment(AnnotationAlignment a, IdGroup newGroup)
This constructor will subset the alignment based on the taxa in IdGroup
-
-
Method Detail
-
initMatrices
protected void initMatrices()
-
init
protected void init(IdGroup group, java.lang.String[] sequences)
-
getChromosomePosition
public float getChromosomePosition(int site)
Return the position along chromosome- Specified by:
getChromosomePositionin interfaceAnnotationAlignment
-
setChromosomePosition
public void setChromosomePosition(float position, int site)Set the position along chromosome
-
getChromosome
public int getChromosome(int site)
Returns chromosome- Specified by:
getChromosomein 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:
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
-
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:
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
public java.lang.String getLocusName(int site)
Returns the name of the locus- Specified by:
getLocusNamein interfaceAnnotationAlignment
-
setLocusName
public void setLocusName(java.lang.String locusName, int site)Sets the name of the locus
-
getDataType
public DataType getDataType(int site)
Returns the datatype- Specified by:
getDataTypein interfaceAnnotationAlignment
-
-