Package pal.alignment
Class ConcatenatedAnnotatedAlignment
java.lang.Object
pal.alignment.AbstractAlignment
pal.alignment.ConcatenatedAnnotatedAlignment
- All Implemented Interfaces:
Serializable,Alignment,AnnotationAlignment,IdGroup,Report
public class ConcatenatedAnnotatedAlignment
extends AbstractAlignment
implements AnnotationAlignment
This is an annotation version of the ConcatenatedAlignment
Unlike normal ConcatenatedAlignment, it permits for merges with different numbers
of sequences. It will merge by either union or intersection. Missing taxa will return
missing values on getData.
- Version:
- $Id:
- Author:
- Ed Buckler
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface pal.misc.IdGroup
IdGroup.Utils -
Field Summary
Fields inherited from class pal.alignment.AbstractAlignment
idGroup, numSeqs, numSites -
Constructor Summary
ConstructorsConstructorDescriptionConcatenatedAnnotatedAlignment(AnnotationAlignment[] list, boolean mergeByID, boolean union) concatenate alignments -
Method Summary
Modifier and TypeMethodDescriptionintgetChromosome(int site) Returns chromosomefloatgetChromosomePosition(int site) Return the position along chromosomechargetData(int seq, int site) sequence alignment at (sequence, site)getDataType(int site) Return the datatype for a given site, which can differ between source alignmentsgetLocusName(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)voidsort the sites by chromosome, then by chromosomal location, and final locusPositionMethods 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, getDataType, getSequenceCount, getSiteCountMethods inherited from interface pal.misc.IdGroup
getIdCount, getIdentifier, setIdentifier, whichIdNumber
-
Constructor Details
-
ConcatenatedAnnotatedAlignment
public ConcatenatedAnnotatedAlignment(AnnotationAlignment[] list, boolean mergeByID, boolean union) throws IllegalArgumentException concatenate alignments- Parameters:
list- array with alignments to concatenatemergeByID- if true it will be by ID nameunion- if true it will create the union of the list, if false the intersection will be produced- Throws:
IllegalArgumentException
-
-
Method Details
-
getData
public char getData(int seq, int site) sequence alignment at (sequence, site)- Specified by:
getDatain interfaceAlignment- Specified by:
getDatain classAbstractAlignment
-
getDataType
Return the datatype for a given site, which can differ between source alignments- Specified by:
getDataTypein interfaceAnnotationAlignment
-
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
-
sortSites
public void sortSites()sort the sites by chromosome, then by chromosomal location, and final locusPosition -
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
-